mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-11 21:46:06 +00:00

C++ handle anonymous structs/unions in the same way. Addresses several bugs: <rdar://problem/6259534> <rdar://problem/6481130> <rdar://problem/6483159> The test case in PR clang/1750 now passes with -fsyntax-only, but CodeGen for inline assembler still fails. llvm-svn: 62112
39 lines
533 B
C++
39 lines
533 B
C++
// RUN: clang -parse-noop -verify %s
|
|
class C;
|
|
class C {
|
|
public:
|
|
protected:
|
|
typedef int A,B;
|
|
static int sf(), u;
|
|
|
|
struct S {};
|
|
enum {};
|
|
int; // expected-error {{declaration does not declare anything}}
|
|
int : 1, : 2;
|
|
|
|
public:
|
|
void m() {
|
|
int l = 2;
|
|
}
|
|
virtual int vf() const volatile = 0;
|
|
|
|
private:
|
|
int x,f(),y,g();
|
|
inline int h();
|
|
static const int sci = 10;
|
|
mutable int mi;
|
|
};
|
|
void glo()
|
|
{
|
|
struct local {};
|
|
}
|
|
|
|
// PR3177
|
|
typedef union {
|
|
__extension__ union {
|
|
int a;
|
|
float b;
|
|
} y;
|
|
} bug3177;
|
|
|