summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-03 18:24:14 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-03 18:24:14 +0000
commit124fdf6dd4b1836f421df9af640fe5e574718ffb (patch)
treef1439d04d389e26074a44346ac0550078de49e10 /clang/lib/Sema/SemaStmt.cpp
parent8678f2a192685040c4bb3ee4bb7116dc675c01ce (diff)
downloadbcm5719-llvm-124fdf6dd4b1836f421df9af640fe5e574718ffb.tar.gz
bcm5719-llvm-124fdf6dd4b1836f421df9af640fe5e574718ffb.zip
Fixed source range for LabelDecl.
llvm-svn: 126952
Diffstat (limited to 'clang/lib/Sema/SemaStmt.cpp')
-rw-r--r--clang/lib/Sema/SemaStmt.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index a45fa3b7d1c..ca37df94389 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud