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

Richard Trieu rtrieu at google.com
Mon May 5 15:06:50 PDT 2014


Author: rtrieu
Date: Mon May  5 17:06:50 2014
New Revision: 208011

URL: http://llvm.org/viewvc/llvm-project?rev=208011&view=rev
Log:
During parsing, update the range of the Declarator to include the identifier.

Modified:
    cfe/trunk/lib/Parse/ParseDecl.cpp

Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=208011&r1=208010&r2=208011&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Mon May  5 17:06:50 2014
@@ -4785,6 +4785,7 @@ void Parser::ParseDirectDeclarator(Decla
            "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()) {





More information about the cfe-commits mailing list