diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-01-19 09:00:28 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-01-19 09:00:28 +0000 |
commit | 2dc8146643856d29c33880b86506141d30d5866f (patch) | |
tree | 6480c97086c09f0160678b9284effd8ea01c864c /clang/test/Misc/ast-dump-attr.cpp | |
parent | 0540f4141fb187d6f5cb2d871bd5fbc27e1f4512 (diff) | |
download | bcm5719-llvm-2dc8146643856d29c33880b86506141d30d5866f.tar.gz bcm5719-llvm-2dc8146643856d29c33880b86506141d30d5866f.zip |
Sema: Variable definitions cannot be __attribute__((alias))
Things that are OK:
extern int var1 __attribute((alias("v1")));
static int var2 __attribute((alias("v2")));
Things that are not OK:
int var3 __attribute((alias("v3")));
extern int var4 __attribute((alias("v4"))) = 4;
We choose to accpet:
struct S { static int var5 __attribute((alias("v5"))); };
This code causes assertion failues in GCC 4.8 and ICC 13.0.1, we have
no reason to reject it.
This partially fixes PR22217.
llvm-svn: 226436
Diffstat (limited to 'clang/test/Misc/ast-dump-attr.cpp')
-rw-r--r-- | clang/test/Misc/ast-dump-attr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Misc/ast-dump-attr.cpp b/clang/test/Misc/ast-dump-attr.cpp index 446f0fa692f..ed6d1f5781d 100644 --- a/clang/test/Misc/ast-dump-attr.cpp +++ b/clang/test/Misc/ast-dump-attr.cpp @@ -79,7 +79,7 @@ void TestInt(void) __attribute__((constructor(123))); // CHECK: FunctionDecl{{.*}}TestInt // CHECK-NEXT: ConstructorAttr{{.*}} 123 -int TestString __attribute__((alias("alias1"))); +static int TestString __attribute__((alias("alias1"))); // CHECK: VarDecl{{.*}}TestString // CHECK-NEXT: AliasAttr{{.*}} "alias1" |