summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/attr-after-definition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/attr-after-definition.cpp')
-rw-r--r--clang/test/SemaCXX/attr-after-definition.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/attr-after-definition.cpp b/clang/test/SemaCXX/attr-after-definition.cpp
new file mode 100644
index 0000000..148a63e
--- /dev/null
+++ b/clang/test/SemaCXX/attr-after-definition.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+struct X { };
+struct Y { };
+
+bool f0(X) { return true; } // expected-note{{definition}}
+bool f1(X) { return true; }
+
+__attribute__ ((__visibility__("hidden"))) bool f0(X); // expected-warning{{attribute}}
+__attribute__ ((__visibility__("hidden"))) bool f1(Y);