diff options
| author | Alp Toker <alp@nuanti.com> | 2013-12-25 01:47:02 +0000 |
|---|---|---|
| committer | Alp Toker <alp@nuanti.com> | 2013-12-25 01:47:02 +0000 |
| commit | 5294e6e0944af40e76f9685ee2ac38229aee8923 (patch) | |
| tree | 9bf47eebddd1a54c421cff1a9100e0502d65b778 /clang/lib | |
| parent | 38799b1471b211b4bf6db80a7eb3d470f0b1cc95 (diff) | |
| download | bcm5719-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.cpp | 11 |
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) { |

