From: Richard Trieu Date: Mon, 5 May 2014 22:06:50 +0000 (+0000) Subject: During parsing, update the range of the Declarator to include the identifier. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74dd271c07187617951618548a8dfeb58c03dcca;p=clang During parsing, update the range of the Declarator to include the identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208011 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 51b99060a1..42369bfbc9 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -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()) {