summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-12-25 01:47:02 +0000
committerAlp Toker <alp@nuanti.com>2013-12-25 01:47:02 +0000
commit5294e6e0944af40e76f9685ee2ac38229aee8923 (patch)
tree9bf47eebddd1a54c421cff1a9100e0502d65b778 /clang/lib
parent38799b1471b211b4bf6db80a7eb3d470f0b1cc95 (diff)
downloadbcm5719-llvm-5294e6e0944af40e76f9685ee2ac38229aee8923.tar.gz
bcm5719-llvm-5294e6e0944af40e76f9685ee2ac38229aee8923.zip
Don't reserve __builtin_types_compatible_p as a C++ keyword
Even g++ considers this a valid C++ identifier and it should only have been visible in C mode. Also drop the associated low-value diagnostic. llvm-svn: 197995
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index a0c123fdaac..2591dbfede6 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -3707,16 +3707,7 @@ static bool evaluateTypeTrait(Sema &S, TypeTrait Kind, SourceLocation KWLoc,
ExprResult Sema::BuildTypeTrait(TypeTrait Kind, SourceLocation KWLoc,
ArrayRef<TypeSourceInfo *> Args,
SourceLocation RParenLoc) {
- QualType ResultType = Context.BoolTy;
- // __builtin_types_compatible_p is a GNU C extension, not a C++ type trait.
- if (Kind == BTT_TypeCompatible) {
- ResultType = Context.IntTy;
- if (getLangOpts().CPlusPlus) {
- Diag(KWLoc, diag::err_types_compatible_p_in_cplusplus)
- << SourceRange(KWLoc, RParenLoc);
- return ExprError();
- }
- }
+ QualType ResultType = Context.getLogicalOperationType();
bool Dependent = false;
for (unsigned I = 0, N = Args.size(); I != N; ++I) {
OpenPOWER on IntegriCloud