diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-10-25 17:16:46 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-10-25 17:16:46 +0000 |
| commit | 17e15f18c557d3d2a6f56e9a26b892d17e6ed612 (patch) | |
| tree | 0aee07db62796deda5d7583be56f2f64332268eb /clang/lib/Parse/ParseExpr.cpp | |
| parent | 5566290b341e42a2db22ffe3fad927568995111c (diff) | |
| download | bcm5719-llvm-17e15f18c557d3d2a6f56e9a26b892d17e6ed612.tar.gz bcm5719-llvm-17e15f18c557d3d2a6f56e9a26b892d17e6ed612.zip | |
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
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |

