diff options
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 3f99c684b89..bb85455ddca 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -5022,6 +5022,12 @@ Sema::OwningExprResult Sema::ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc, assert((!argT1.isNull() && !argT2.isNull()) && "Missing type argument(s)"); + if (getLangOptions().CPlusPlus) { + Diag(BuiltinLoc, diag::err_types_compatible_p_in_cplusplus) + << SourceRange(BuiltinLoc, RPLoc); + return ExprError(); + } + return Owned(new (Context) TypesCompatibleExpr(Context.IntTy, BuiltinLoc, argT1, argT2, RPLoc)); } |

