diff options
Diffstat (limited to 'test/SemaCXX/no-rtti.cpp')
-rw-r--r-- | test/SemaCXX/no-rtti.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/no-rtti.cpp b/test/SemaCXX/no-rtti.cpp new file mode 100644 index 0000000..7516705 --- /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}} +} |