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
diff --git a/test/Parser/access-spec-attrs.cpp b/test/Parser/access-spec-attrs.cpp
new file mode 100644
index 0000000..4fa5975
--- /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();
+}