diff options
author | Erik Verbruggen <erikjv@me.com> | 2011-10-13 09:41:32 +0000 |
---|---|---|
committer | Erik Verbruggen <erikjv@me.com> | 2011-10-13 09:41:32 +0000 |
commit | 5f1c822def3efffe1d8f7299fbbbc3b1cdd4833d (patch) | |
tree | f9892894bbd6903cc41b73a0a414853a0169d62c /test/Parser/access-spec-attrs.cpp | |
parent | 13f8daf70637f8f295134ac8e089dd7721e09085 (diff) |
Allow for annotate attributes after access specifiers. When such
attributes are found, propagate them to subsequent declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/access-spec-attrs.cpp')
-rw-r--r-- | test/Parser/access-spec-attrs.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Parser/access-spec-attrs.cpp b/test/Parser/access-spec-attrs.cpp new file mode 100644 index 0000000000..4fa5975811 --- /dev/null +++ b/test/Parser/access-spec-attrs.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify + +struct X { +public __attribute__((unavailable)): // expected-error {{access specifier can only have annotation attributes}} + void foo(); +private __attribute__((annotate("foobar"))): + void bar(); +}; + +void f(X x) { + x.foo(); +} |