From 17e15f18c557d3d2a6f56e9a26b892d17e6ed612 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 25 Oct 2009 17:16:46 +0000 Subject: simplify Sema::getTypeName a bit: if control gets out of the switch, IIDecl cannot be null. There is no need to check for both C++ mode and presence of CXXRecordDecl. ObjC interfaces can't have ScopeSpecs. llvm-svn: 85057 --- clang/lib/Parse/ParseExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Parse/ParseExpr.cpp') diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 8ebb7c01d85..477e6fb005a 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -345,7 +345,7 @@ Parser::ParseRHSOfBinaryExpression(OwningExprResult LHS, unsigned MinPrec) { && Tok.is(tok::identifier)) { CXXScopeSpec SS; if (Actions.getTypeName(*Tok.getIdentifierInfo(), - Tok.getLocation(), CurScope, &SS)) { + Tok.getLocation(), CurScope, &SS)) { const char *Opc = OpToken.is(tok::periodstar) ? "'.*'" : "'->*'"; Diag(OpToken, diag::err_pointer_to_member_type) << Opc; return ExprError(); -- cgit v1.2.3