Files
llvm-project/clang/test/Sema/decl-invalid.c
Douglas Gregor 556877c1e6 This patch adds very basic support for parsing and type-checking class
inheritance in C++. It'll parse the base-specifier list, e.g.,

 class D : public B1, virtual public B2 { };

and do some of the simpler semantic checks (B1 and B2 are classes;
they aren't unions or incomplete types, etc).

llvm-svn: 49623
2008-04-13 21:30:24 +00:00

12 lines
271 B
C

// RUN: clang %s -fsyntax-only -verify
typedef union <anonymous> __mbstate_t; // expected-error: {{declaration of anonymous union must be a definition}}
// PR2017
void x();
int a() {
int r[x()]; // expected-error: {{size of array has non-integer type 'void'}}
}