During parsing, update the range of the Declarator to include the identifier.

llvm-svn: 208011
This commit is contained in:
Richard Trieu 2014-05-05 22:06:50 +00:00
parent fbed044fa3
commit 2664dc184e
1 changed files with 1 additions and 0 deletions

View File

@ -4785,6 +4785,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) {
"There's a C++-specific check for tok::identifier above");
assert(Tok.getIdentifierInfo() && "Not an identifier?");
D.SetIdentifier(Tok.getIdentifierInfo(), Tok.getLocation());
D.SetRangeEnd(Tok.getLocation());
ConsumeToken();
goto PastIdentifier;
} else if (Tok.is(tok::identifier) && D.diagnoseIdentifier()) {