summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2010-01-21 22:12:18 +0000
committerMike Stump <mrs@apple.com>2010-01-21 22:12:18 +0000
commitfcd6f94ba713356b40aa7618560e4eb435edab04 (patch)
treee4da18a713191c1d1033c3a172776640c1c9364c /clang/lib/Sema
parent32bfe1e837dd0b73c2878b9ef0eb58e585fbef1f (diff)
downloadbcm5719-llvm-fcd6f94ba713356b40aa7618560e4eb435edab04.tar.gz
bcm5719-llvm-fcd6f94ba713356b40aa7618560e4eb435edab04.zip
Improve unreachable code warnings for with respect to dead functional casts in C++.
llvm-svn: 94106
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 018132c3681..b792ea8071c 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -2121,6 +2121,11 @@ static SourceLocation GetUnreachableLoc(CFGBlock &b, SourceRange &R1,
R1 = CSC->getSubExpr()->getSourceRange();
return CSC->getLParenLoc();
}
+ case Expr::CXXFunctionalCastExprClass: {
+ const CXXFunctionalCastExpr *CE = cast <CXXFunctionalCastExpr>(S);
+ R1 = CE->getSubExpr()->getSourceRange();
+ return CE->getTypeBeginLoc();
+ }
case Expr::ImplicitCastExprClass:
++sn;
goto top;
OpenPOWER on IntegriCloud