diff options
Diffstat (limited to 'test/Lexer/has_feature_rtti.cpp')
-rw-r--r-- | test/Lexer/has_feature_rtti.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Lexer/has_feature_rtti.cpp b/test/Lexer/has_feature_rtti.cpp new file mode 100644 index 0000000..cc01f61 --- /dev/null +++ b/test/Lexer/has_feature_rtti.cpp @@ -0,0 +1,11 @@ +// RUN: clang -E -frtti %s -o - | FileCheck --check-prefix=CHECK-RTTI %s +// RUN: clang -E -fno-rtti %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s + +#if __has_feature(cxx_rtti) +int foo(); +#else +int bar(); +#endif + +// CHECK-RTTI: foo +// CHECK-NO-RTTI: bar |