Teach CFG building how to deal with CXXMemberCallExprs and BoundMemberTy,
then teach -Wreturn-type to handle the same.  Net effect:  we now correctly
handle noreturn attributes on member calls in the CFG.

llvm-svn: 131178
diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp
index e482172..9efae61 100644
--- a/clang/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp
@@ -196,7 +196,12 @@
         continue;
       }
       Expr *CEE = C->getCallee()->IgnoreParenCasts();
-      if (getFunctionExtInfo(CEE->getType()).getNoReturn()) {
+      QualType calleeType = CEE->getType();
+      if (calleeType == AC.getASTContext().BoundMemberTy) {
+        calleeType = Expr::findBoundMemberType(CEE);
+        assert(!calleeType.isNull() && "analyzing unresolved call?");
+      }
+      if (getFunctionExtInfo(calleeType).getNoReturn()) {
         NoReturnEdge = true;
         HasFakeEdge = true;
       } else if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) {