]> granicus.if.org Git - clang/commitdiff
During parsing, update the range of the Declarator to include the identifier.
authorRichard Trieu <rtrieu@google.com>
Mon, 5 May 2014 22:06:50 +0000 (22:06 +0000)
committerRichard Trieu <rtrieu@google.com>
Mon, 5 May 2014 22:06:50 +0000 (22:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208011 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseDecl.cpp

index 51b99060a1481f439468f28d891f5fceeee3dd7c..42369bfbc928a5549c9018e5b971d0e0e90bb40e 100644 (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()) {