Improve unreachable code warnings for with respect to dead functional casts in C++.
llvm-svn: 94106
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 018132c..b792ea8 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -2121,6 +2121,11 @@
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;