diff options
Diffstat (limited to 'clang/test/SemaCXX/no-rtti.cpp')
| -rw-r--r-- | clang/test/SemaCXX/no-rtti.cpp | 10 |
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}} +} |

