blob: 3cc476dc2893c1629d0a0e34bc1a1b7dda27a91c [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only %s
Douglas Gregor119b0c72009-09-04 05:53:02 +00002
Douglas Gregor01e09d92010-04-08 18:16:15 +00003// This is a test for an egregious hack in Clang that works around
4// issues with GCC's evolution. libstdc++ 4.2.x uses __is_pod as an
5// identifier (to declare a struct template like the one below), while
6// GCC 4.3 and newer make __is_pod a keyword. Clang treats __is_pod as
7// a keyword *unless* it is introduced following the struct keyword.
8
Douglas Gregor119b0c72009-09-04 05:53:02 +00009template<typename T>
10struct __is_pod {
11};
12
13__is_pod<int> ipi;
Douglas Gregor06873092011-04-28 15:48:45 +000014
15// Another, similar egregious hack for __is_signed, which is a type
16// trait in Embarcadero's compiler but is used as an identifier in
17// libstdc++.
18struct test_is_signed {
19 static const bool __is_signed = true;
20};
21
22bool check_signed = test_is_signed::__is_signed;