1 // RUN: %clang_extdef_map %s -- | FileCheck --implicit-check-not "c:@y" --implicit-check-not "c:@z" %s
2 // RUN: %clang -emit-ast %s -o %t.ast
3 // RUN: %clang_extdef_map %t.ast -- | FileCheck --implicit-check-not "c:@y" --implicit-check-not "c:@z" %s
8 // CHECK-DAG: 9:c:@F@f#I#
10 extern const int x
= 5;
13 // Non-const variables should not be collected.
16 // In C++, const implies internal linkage, so not collected.
22 extern S
const s
= {.a
= 2};
28 extern const SF sf
= {.a
= 2};
32 static const int a
= 4;
35 // CHECK-DAG: 14:c:@S@SStatic@a
37 extern int const arr
[5] = { 0, 1 };
38 // CHECK-DAG: 6:c:@arr
44 extern const U u
= {.a
= 6};
47 // No USR can be generated for this.
48 // Check for no crash in this case.
54 void f(int (*)(char));
55 void f(bool (*)(char));
59 f([](char) -> int { return 42; });
60 // CHECK-DAG: 41:c:@S@G@F@G#@Sa@F@operator int (*)(char)#1
61 f([](char) -> bool { return true; });
62 // CHECK-DAG: 42:c:@S@G@F@G#@Sa@F@operator bool (*)(char)#1