Error when using typeid() with -fno-rtti. PR 12888.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157139 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/no-rtti.cpp b/test/SemaCXX/no-rtti.cpp
new file mode 100644
index 0000000..75167050
--- /dev/null
+++ b/test/SemaCXX/no-rtti.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -fno-rtti %s
+
+namespace std {
+ class type_info;
+}
+
+void f()
+{
+ (void)typeid(int); // expected-error {{cannot use typeid with -fno-rtti}}
+}