summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2012-05-20 01:27:21 +0000
committerNico Weber <nicolasweber@gmx.de>2012-05-20 01:27:21 +0000
commit1b7f39de3d58627fa263118a4bca4dda5a5d4bf7 (patch)
treeeddbeb687eee50f46b485af2e08b6f1026a85399 /clang/test
parent022900079ba10ebc64b6f3bea1ee5807ce39b3e2 (diff)
downloadbcm5719-llvm-1b7f39de3d58627fa263118a4bca4dda5a5d4bf7.tar.gz
bcm5719-llvm-1b7f39de3d58627fa263118a4bca4dda5a5d4bf7.zip
Error when using typeid() with -fno-rtti. PR 12888.
llvm-svn: 157139
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/no-rtti.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/no-rtti.cpp b/clang/test/SemaCXX/no-rtti.cpp
new file mode 100644
index 00000000000..75167050dca
--- /dev/null
+++ b/clang/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}}
+}
OpenPOWER on IntegriCloud