xref: /llvm-project/clang/test/SemaCXX/types_compatible_p.cpp (revision 22db4824b9e03fe8c2e9217d6832b71ac23c175f)
1 // RUN: %clang_cc1 -fsyntax-only -verify -x c++ %s
2 // RUN: %clang_cc1 -fsyntax-only -x c %s
3 
4 // Test that GNU C extension __builtin_types_compatible_p() is not available in C++ mode.
5 
f(void)6 int f(void) {
7   return __builtin_types_compatible_p(int, const int); // expected-error{{expected '(' for function-style cast or type construction}} \
8                                                        // expected-error{{expected expression}}
9 }
10