summaryrefslogtreecommitdiffstats
path: root/test/PCH/cxx-typeid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/cxx-typeid.cpp')
-rw-r--r--test/PCH/cxx-typeid.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/PCH/cxx-typeid.cpp b/test/PCH/cxx-typeid.cpp
new file mode 100644
index 0000000..41dd544
--- /dev/null
+++ b/test/PCH/cxx-typeid.cpp
@@ -0,0 +1,9 @@
+// Test this without pch.
+// RUN: %clang -include %S/cxx-typeid.h -fsyntax-only -Xclang -verify %s
+
+// RUN: %clang -ccc-pch-is-pch -x c++-header -o %t.gch %S/cxx-typeid.h
+// RUN: %clang -ccc-pch-is-pch -include %t -fsyntax-only -Xclang -verify %s
+
+void f() {
+ (void)typeid(int);
+}
OpenPOWER on IntegriCloud