diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-03 18:24:14 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-03 18:24:14 +0000 |
commit | 203548ba4b72e7e59320d352afc1eb0b5ab131de (patch) | |
tree | 6f42c316fb3723c23233ba3547002bd4831502de /lib/Sema/SemaStmt.cpp | |
parent | 48b89590f61575cbf365ba996a2bd1ba1561a4ab (diff) |
Fixed source range for LabelDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index a45fa3b7d1..ca37df9438 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -245,11 +245,10 @@ Sema::ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, } // Otherwise, things are good. Fill in the declaration and return it. - TheDecl->setLocation(IdentLoc); - LabelStmt *LS = new (Context) LabelStmt(IdentLoc, TheDecl, SubStmt); TheDecl->setStmt(LS); - TheDecl->setLocation(IdentLoc); + if (!TheDecl->isGnuLocal()) + TheDecl->setLocation(IdentLoc); return Owned(LS); } |