aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/pragma-multiple-attributes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/AST/pragma-multiple-attributes.cpp')
-rw-r--r--clang/test/AST/pragma-multiple-attributes.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/AST/pragma-multiple-attributes.cpp b/clang/test/AST/pragma-multiple-attributes.cpp
new file mode 100644
index 0000000..b717b3a
--- /dev/null
+++ b/clang/test/AST/pragma-multiple-attributes.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s
+
+#pragma clang attribute push (__attribute__((disable_sanitizer_instrumentation, annotate("test1"))), apply_to=variable(is_global))
+int var1;
+#pragma clang attribute pop
+// CHECK: VarDecl {{.*}} var1
+// CHECK-NEXT: DisableSanitizerInstrumentationAttr {{.*}}
+// CHECK-NEXT: AnnotateAttr {{.*}} "test1"
+
+#pragma clang attribute push ([[clang::disable_sanitizer_instrumentation, clang::annotate("test2")]], apply_to=variable(is_global))
+int var2;
+#pragma clang attribute pop
+// CHECK: VarDecl {{.*}} var2
+// CHECK-NEXT: DisableSanitizerInstrumentationAttr {{.*}}
+// CHECK-NEXT: AnnotateAttr {{.*}} "test2"