aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
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
commit2d6ceab0ad062989ecb7b8666c85e58a2fcd95ce (patch)
tree488b4c2421b33117fb324712bf5c39b642552efd /lib/Sema/SemaChecking.cpp
parent2332c117b1ab498322eb99c238630f28c32c7b14 (diff)
Improve unreachable code warnings for with respect to dead functional casts in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 018132c368..b792ea8071 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/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;