summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/typeid-ref.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/typeid-ref.cpp')
-rw-r--r--test/SemaCXX/typeid-ref.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/typeid-ref.cpp b/test/SemaCXX/typeid-ref.cpp
new file mode 100644
index 0000000..da00169
--- /dev/null
+++ b/test/SemaCXX/typeid-ref.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+namespace std {
+ class type_info;
+}
+
+struct X { };
+
+void f() {
+ // CHECK: @_ZTS1X = weak_odr constant
+ // CHECK: @_ZTI1X = weak_odr constant
+ (void)typeid(X&);
+}
OpenPOWER on IntegriCloud