Skip to content

Commit

Permalink
If the declarator doesn't already have a VarDecl associated with it, …
Browse files Browse the repository at this point in the history
…then it

may not be a usable declarator. Let the higher levels handle this situation.
  • Loading branch information
Bill Wendling committed Oct 29, 2011
1 parent dd16cf4 commit 15c8563
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Parse/ParseExpr.cpp
Expand Up @@ -504,6 +504,8 @@ ExprResult Parser::ParseDesignator() {
// name // name
const IdentifierInfo *IDInfo = Tok.getIdentifierInfo(); const IdentifierInfo *IDInfo = Tok.getIdentifierInfo();
VarDecl *VD = IDInfo->getFETokenInfo<VarDecl>(); VarDecl *VD = IDInfo->getFETokenInfo<VarDecl>();
if (!VD) return ExprResult();

E = VarExpr::Create(Context, Tok.getLocation(), VD); E = VarExpr::Create(Context, Tok.getLocation(), VD);
Lex(); Lex();


Expand Down

0 comments on commit 15c8563

Please sign in to comment.