Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

If the declarator doesn't already have a VarDecl associated with it, …

…then it

may not be a usable declarator. Let the higher levels handle this situation.
  • Loading branch information...
commit 15c85630482f84f951df4504466f3b26e74f0e79 1 parent dd16cf4
Bill Wendling authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/Parse/ParseExpr.cpp
View
2  lib/Parse/ParseExpr.cpp
@@ -504,6 +504,8 @@ ExprResult Parser::ParseDesignator() {
// name
const IdentifierInfo *IDInfo = Tok.getIdentifierInfo();
VarDecl *VD = IDInfo->getFETokenInfo<VarDecl>();
+ if (!VD) return ExprResult();
+
E = VarExpr::Create(Context, Tok.getLocation(), VD);
Lex();
Please sign in to comment.
Something went wrong with that request. Please try again.