Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121298 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 65b6249..47b60b5 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -728,7 +728,6 @@
case tok::kw___builtin_va_arg:
case tok::kw___builtin_offsetof:
case tok::kw___builtin_choose_expr:
- case tok::kw___builtin_types_compatible_p:
return ParseBuiltinPrimaryExpression();
case tok::kw___null:
return Actions.ActOnGNUNullExpr(ConsumeToken());
@@ -987,6 +986,7 @@
case tok::kw___has_virtual_destructor:
return ParseUnaryTypeTrait();
+ case tok::kw___builtin_types_compatible_p:
case tok::kw___is_base_of:
return ParseBinaryTypeTrait();
@@ -1477,25 +1477,6 @@
Expr2.take(), ConsumeParen());
break;
}
- case tok::kw___builtin_types_compatible_p:
- TypeResult Ty1 = ParseTypeName();
-
- if (ExpectAndConsume(tok::comma, diag::err_expected_comma, "",tok::r_paren))
- return ExprError();
-
- TypeResult Ty2 = ParseTypeName();
-
- if (Tok.isNot(tok::r_paren)) {
- Diag(Tok, diag::err_expected_rparen);
- return ExprError();
- }
-
- if (Ty1.isInvalid() || Ty2.isInvalid())
- Res = ExprError();
- else
- Res = Actions.ActOnTypesCompatibleExpr(StartLoc, Ty1.get(), Ty2.get(),
- ConsumeParen());
- break;
}
if (Res.isInvalid())