aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/types_compatible_p.cpp
blob: 29e06405adeae1fd1cd64d6a68db437a99b76f9a (plain) (blame)
1
2
3
4
5
6
7
8
9
// RUN: %clang_cc1 -fsyntax-only -verify -x c++ %s
// RUN: %clang_cc1 -fsyntax-only -x c %s

// Test that GNU C extension __builtin_types_compatible_p() is not available in C++ mode.

int f() {
  return __builtin_types_compatible_p(int, const int); // expected-error{{expected '(' for function-style cast or type construction}} \
                                                       // expected-error{{expected expression}}
}