aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-02-06 23:29:57 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-02-06 23:29:57 +0000
commit56ff283a1f8e4e898568426f56e67a096efd1f80 (patch)
tree3440cb2724001da3644104526b19eb41c68839e2 /lib
parent362ed2a95b70aaea4869bfa9ecaf581a6c180b40 (diff)
Fix a minor regression from my potentially-evaluated expression changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaExpr.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index a47421d801..8afe0c25b9 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -9239,6 +9239,14 @@ namespace {
// Make sure we redo semantic analysis
bool AlwaysRebuild() { return true; }
+ // Make sure we handle LabelStmts correctly.
+ // FIXME: This does the right thing, but maybe we need a more general
+ // fix to TreeTransform?
+ StmtResult TransformLabelStmt(LabelStmt *S) {
+ S->getDecl()->setStmt(0);
+ return BaseTransform::TransformLabelStmt(S);
+ }
+
// We need to special-case DeclRefExprs referring to FieldDecls which
// are not part of a member pointer formation; normal TreeTransforming
// doesn't catch this case because of the way we represent them in the AST.