summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/debug-info-nodebug.cpp16
-rw-r--r--clang/test/Misc/pragma-attribute-supported-attributes-list.test2
-rw-r--r--clang/test/Sema/attr-nodebug.c2
3 files changed, 16 insertions, 4 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-nodebug.cpp b/clang/test/CodeGenCXX/debug-info-nodebug.cpp
index 9f140efaed6..1962b8cf574 100644
--- a/clang/test/CodeGenCXX/debug-info-nodebug.cpp
+++ b/clang/test/CodeGenCXX/debug-info-nodebug.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -DSETNODEBUG=0 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=YESINFO
-// RUN: %clang_cc1 -DSETNODEBUG=1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=NOINFO
+// RUN: %clang_cc1 -DSETNODEBUG=0 -emit-llvm -std=c++14 -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=YESINFO
+// RUN: %clang_cc1 -DSETNODEBUG=1 -emit-llvm -std=c++14 -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=NOINFO
#if SETNODEBUG
#define NODEBUG __attribute__((nodebug))
@@ -53,3 +53,15 @@ void func4() {
// NOINFO-NOT: !DIGlobalVariable(name: "static_local"
// YESINFO-DAG: !DILocalVariable(name: "normal_local"
// NOINFO-NOT: !DILocalVariable(name: "normal_local"
+
+template <typename T>
+using y NODEBUG = int;
+void func5() {
+ NODEBUG typedef int x;
+ x a;
+ y<int> b;
+}
+// YESINFO-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "x"
+// NOINFO-NOT: !DIDerivedType(tag: DW_TAG_typedef, name: "x"
+// YESINFO-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "y<int>"
+// NOINFO-NOT: !DIDerivedType(tag: DW_TAG_typedef, name: "y<int>"
diff --git a/clang/test/Misc/pragma-attribute-supported-attributes-list.test b/clang/test/Misc/pragma-attribute-supported-attributes-list.test
index 6e07e8e8111..aa71e0bc8f5 100644
--- a/clang/test/Misc/pragma-attribute-supported-attributes-list.test
+++ b/clang/test/Misc/pragma-attribute-supported-attributes-list.test
@@ -72,7 +72,7 @@
// CHECK-NEXT: NSConsumesSelf (SubjectMatchRule_objc_method)
// CHECK-NEXT: Naked (SubjectMatchRule_function)
// CHECK-NEXT: NoCommon (SubjectMatchRule_variable)
-// CHECK-NEXT: NoDebug (SubjectMatchRule_hasType_functionType, SubjectMatchRule_objc_method, SubjectMatchRule_variable_not_is_parameter)
+// CHECK-NEXT: NoDebug (SubjectMatchRule_type_alias, SubjectMatchRule_hasType_functionType, SubjectMatchRule_objc_method, SubjectMatchRule_variable_not_is_parameter)
// CHECK-NEXT: NoDestroy (SubjectMatchRule_variable)
// CHECK-NEXT: NoDuplicate (SubjectMatchRule_function)
// CHECK-NEXT: NoEscape (SubjectMatchRule_variable_is_parameter)
diff --git a/clang/test/Sema/attr-nodebug.c b/clang/test/Sema/attr-nodebug.c
index 355778411d3..3ae894a8d0a 100644
--- a/clang/test/Sema/attr-nodebug.c
+++ b/clang/test/Sema/attr-nodebug.c
@@ -2,7 +2,7 @@
int a __attribute__((nodebug));
-void b(int p __attribute__((nodebug))) { // expected-warning {{'nodebug' attribute only applies to functions, function pointers, Objective-C methods, and variables}}
+void b(int p __attribute__((nodebug))) { // expected-warning {{'nodebug' attribute only applies to typedefs, functions, function pointers, Objective-C methods, and variables}}
int b __attribute__((nodebug));
}
OpenPOWER on IntegriCloud