summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SemaCXX: Don't crash when annotation tokens show up before the tag nameDavid Majnemer2014-12-291-4/+11
| | | | | | | | Clang has a hack to accept definitions of structs with tag names which have the same name as intrinsics. However, this hack didn't guard against annotation tokens showing up in the token stream. llvm-svn: 224909
* Extend the "__is_pod" hack, which demotes various type trait keywordsDouglas Gregor2012-08-301-2/+10
| | | | | | | | | (__is_pod, __is_signed, etc.) to normal identifiers if they are encountered in certain places in the grammar where we know that prior versions of libstdc++ or libc++ use them, to still allow the use of these keywords as type traits. Fixes <rdar://problem/9836262> and PR10184. llvm-svn: 162937
* Turn off __has_feature(is_empty) and __has_feature(is_pod) if theDouglas Gregor2011-07-301-0/+4
| | | | | | | libstdc++ hack has reverted these type traits to keywords. Icky, but fixes <rdar://problem/9836262>. llvm-svn: 136560
* OopsDouglas Gregor2011-04-291-1/+1
| | | | llvm-svn: 130469
* libstdc++ 4.2 also uses __is_same as a struct name, which conflicts with our ↵Douglas Gregor2011-04-291-0/+7
| | | | | | new type trait __is_same llvm-svn: 130468
* libstdc++ 4.4 uses __is_signed as an identifier, while Clang treats itDouglas Gregor2011-04-281-0/+9
| | | | | | | | | | | | | as a keyword for the __is_signed type trait. Cope with this conflict via some hackish recovery: if we see a declaration of the form static const bool __is_signed then we stop treating __is_signed as a keyword and instead treat it as an identifier. It's ugly, but it's better than making the __is_signed type trait conditional on some language flag. Fixes PR9804. llvm-svn: 130399
* Introduce an egregious hack to work around a bug in libstdc++ 4.2.x'sDouglas Gregor2010-04-081-0/+6
| | | | | | | | | <tr1/hashtable> header, where a friend class template std::tr1::__detail::_Map_base is declared with the wrong template parameters. GCC doesn't catch the problem, so Clang does a little back-flip to avoid diagnosing just this one instance of the problem. llvm-svn: 100790
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Introduce an egregious hack to fix PR4828.Douglas Gregor2009-09-041-0/+7
The problem this change addresses is that we treat __is_pod and __is_empty as keywords in C++, because they are built-in type traits in GCC >= 4.3. However, GNU libstdc++ 4.2 (and possibly earlier versions) define implementation-detail struct templates named __is_pod and __is_empty. This commit solves the problem by recognizing struct __is_pod and struct __is_empty as special token sequences. When one of these token sequences is encountered, the keyword (__is_pod or __is_empty) is implicitly downgraded to an identifier so that parsing can continue. This is an egregious hack, but it has the virtue of "just working" whether someone is using libstdc++ 4.2 or not, without the need for special flags. llvm-svn: 80988
OpenPOWER on IntegriCloud