summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-08-28 00:19:02 +0000
committerTed Kremenek <kremenek@apple.com>2010-08-28 00:19:02 +0000
commit82bfc867928ab296275d7216830aa3bf897cc346 (patch)
tree311ef34230f4c164aad65da9e3cdf764640dedcb /clang/lib/Analysis/CFG.cpp
parentb6aba3ef28ee71b9d8d9a84e3e998e05996ea73b (diff)
downloadbcm5719-llvm-82bfc867928ab296275d7216830aa3bf897cc346.tar.gz
bcm5719-llvm-82bfc867928ab296275d7216830aa3bf897cc346.zip
Explicitly handle CXXExprWithTemporaries during CFG construction by just visiting the subexpression. While we don't do anything intelligent right now, this obviates a bogus -Wunreahable-code warning reported in PR 6130.
llvm-svn: 112334
Diffstat (limited to 'clang/lib/Analysis/CFG.cpp')
-rw-r--r--clang/lib/Analysis/CFG.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 3720d20c288..78979a4feeb 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -390,6 +390,12 @@ tryAgain:
case Stmt::CXXCatchStmtClass:
return VisitCXXCatchStmt(cast<CXXCatchStmt>(S));
+ case Stmt::CXXExprWithTemporariesClass: {
+ // FIXME: Handle temporaries. For now, just visit the subexpression
+ // so we don't artificially create extra blocks.
+ return Visit(cast<CXXExprWithTemporaries>(S)->getSubExpr());
+ }
+
case Stmt::CXXMemberCallExprClass:
return VisitCXXMemberCallExpr(cast<CXXMemberCallExpr>(S), asc);
OpenPOWER on IntegriCloud