From: Abramo Bagnara Date: Mon, 15 Oct 2012 21:07:44 +0000 (+0000) Subject: Fixed LabelDecl source range. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac7027872b55c43389308b51b36ade04bb50081f;p=clang Fixed LabelDecl source range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165976 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 70ece511d1..f55174e05c 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -371,8 +371,10 @@ Sema::ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, // 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); }