[cfe-commits] r50884 - /cfe/trunk/lib/Parse/ParseExpr.cpp
Chris Lattner
sabre at nondot.org
Thu May 8 22:28:21 PDT 2008
Author: lattner
Date: Fri May 9 00:28:21 2008
New Revision: 50884
URL: http://llvm.org/viewvc/llvm-project?rev=50884&view=rev
Log:
Don't call into objc front-end when not parsing objc code. This avoids
crashes because objc types aren't set up right.
Modified:
cfe/trunk/lib/Parse/ParseExpr.cpp
Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=50884&r1=50883&r2=50884&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Fri May 9 00:28:21 2008
@@ -586,7 +586,9 @@
}
case tok::l_square:
// These can be followed by postfix-expr pieces.
- return ParsePostfixExpressionSuffix(ParseObjCMessageExpression());
+ if (getLang().ObjC1)
+ return ParsePostfixExpressionSuffix(ParseObjCMessageExpression());
+ // FALL THROUGH.
default:
Diag(Tok, diag::err_expected_expression);
return ExprResult(true);
More information about the cfe-commits
mailing list