[cfe-commits] r165976 - /cfe/trunk/lib/Sema/SemaStmt.cpp

Abramo Bagnara abramo.bagnara at bugseng.com
Mon Oct 15 14:07:44 PDT 2012


Author: abramo
Date: Mon Oct 15 16:07:44 2012
New Revision: 165976

URL: http://llvm.org/viewvc/llvm-project?rev=165976&view=rev
Log:
Fixed LabelDecl source range.

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

Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=165976&r1=165975&r2=165976&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Mon Oct 15 16:07:44 2012
@@ -371,8 +371,10 @@
   // Otherwise, things are good.  Fill in the declaration and return it.
   LabelStmt *LS = new (Context) LabelStmt(IdentLoc, TheDecl, SubStmt);
   TheDecl->setStmt(LS);
-  if (!TheDecl->isGnuLocal())
+  if (!TheDecl->isGnuLocal()) {
+    TheDecl->setLocStart(IdentLoc);
     TheDecl->setLocation(IdentLoc);
+  }
   return Owned(LS);
 }
 





More information about the cfe-commits mailing list