| commit | 1b7f39de3d58627fa263118a4bca4dda5a5d4bf7 | [log] [tgz] |
|---|---|---|
| author | Nico Weber <nicolasweber@gmx.de> | Sun May 20 01:27:21 2012 +0000 |
| committer | Nico Weber <nicolasweber@gmx.de> | Sun May 20 01:27:21 2012 +0000 |
| tree | eddbeb687eee50f46b485af2e08b6f1026a85399 | |
| parent | 022900079ba10ebc64b6f3bea1ee5807ce39b3e2 [diff] [blame] |
Error when using typeid() with -fno-rtti. PR 12888. llvm-svn: 157139
diff --git a/clang/test/SemaCXX/no-rtti.cpp b/clang/test/SemaCXX/no-rtti.cpp new file mode 100644 index 0000000..75167050 --- /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}} +}