[cfe-commits] r165256 - /cfe/trunk/lib/Sema/SemaDecl.cpp

Abramo Bagnara abramo.bagnara at bugseng.com
Thu Oct 4 14:38:30 PDT 2012


Author: abramo
Date: Thu Oct  4 16:38:29 2012
New Revision: 165256

URL: http://llvm.org/viewvc/llvm-project?rev=165256&view=rev
Log:
Fixed ParamDecl source range for implicit typed k&r parameters.

Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=165256&r1=165255&r2=165256&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Oct  4 16:38:29 2012
@@ -7574,6 +7574,9 @@
         unsigned DiagID; // unused
         DS.SetTypeSpecType(DeclSpec::TST_int, FTI.ArgInfo[i].IdentLoc,
                            PrevSpec, DiagID);
+        // Use the identifier location for the type source range.
+        DS.SetRangeStart(FTI.ArgInfo[i].IdentLoc);
+        DS.SetRangeEnd(FTI.ArgInfo[i].IdentLoc);
         Declarator ParamD(DS, Declarator::KNRTypeListContext);
         ParamD.SetIdentifier(FTI.ArgInfo[i].Ident, FTI.ArgInfo[i].IdentLoc);
         FTI.ArgInfo[i].Param = ActOnParamDeclarator(S, ParamD);





More information about the cfe-commits mailing list