Fixed LabelDecl source range.

llvm-svn: 165976
This commit is contained in:
Abramo Bagnara 2012-10-15 21:07:44 +00:00
parent c76dcbdc0c
commit 598b943410
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}