aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Parser/diagnose_if.cpp
blob: 52059804c9ef917ab740c068eb09fee580ed0482 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 %s -fsyntax-only -fcxx-exceptions -verify

void t1() __attribute__((__diagnose_if__(baz))) try {} catch(...) {}
// expected-error@-1 {{use of undeclared identifier 'baz'}}

struct A {
  A();
};

A::A() __attribute__((__diagnose_if__(baz))) :;
// expected-error@-1 {{expected class member or base class name}}
// expected-error@-2 {{use of undeclared identifier 'baz'}}