xref: /minix3/external/bsd/llvm/dist/clang/test/Lexer/has_feature_rtti.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-RTTI %s
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -E -fno-rtti %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc #if __has_feature(cxx_rtti)
5*f4a2713aSLionel Sambuc int foo();
6*f4a2713aSLionel Sambuc #else
7*f4a2713aSLionel Sambuc int bar();
8*f4a2713aSLionel Sambuc #endif
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc // CHECK-RTTI: foo
11*f4a2713aSLionel Sambuc // CHECK-NO-RTTI: bar
12