diff options
Diffstat (limited to 'test/SemaCXX/attr-weakref.cpp')
-rw-r--r-- | test/SemaCXX/attr-weakref.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/SemaCXX/attr-weakref.cpp b/test/SemaCXX/attr-weakref.cpp index 0c3f1d20e7f7..46ca5ab20682 100644 --- a/test/SemaCXX/attr-weakref.cpp +++ b/test/SemaCXX/attr-weakref.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify -std=c++11 %s // GCC will accept anything as the argument of weakref. Should we // check for an existing decl? @@ -34,3 +34,5 @@ static int a10(); int a10() __attribute__((weakref ("foo"))); static int v __attribute__((weakref(a1), alias("foo"))); // expected-error {{'weakref' attribute requires a string}} + +__attribute__((weakref ("foo"))) auto a11 = 1; // expected-error {{weakref declaration must have internal linkage}} |