[cfe-commits] r107772 - /cfe/trunk/lib/Checker/PathDiagnostic.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Jul 7 05:24:14 PDT 2010


Author: akirtzidis
Date: Wed Jul  7 07:24:14 2010
New Revision: 107772

URL: http://llvm.org/viewvc/llvm-project?rev=107772&view=rev
Log:
Simplify code and remove comment that is no longer relevant.

Modified:
    cfe/trunk/lib/Checker/PathDiagnostic.cpp

Modified: cfe/trunk/lib/Checker/PathDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/PathDiagnostic.cpp?rev=107772&r1=107771&r2=107772&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/PathDiagnostic.cpp (original)
+++ cfe/trunk/lib/Checker/PathDiagnostic.cpp Wed Jul  7 07:24:14 2010
@@ -181,15 +181,8 @@
       if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D))
         return MD->getSourceRange();
       if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
-        // FIXME: We would like to always get the function body, even
-        // when it needs to be de-serialized, but getting the
-        // ASTContext here requires significant changes.
-        if (Stmt *Body = FD->getBody()) {
-          if (CompoundStmt *CS = dyn_cast<CompoundStmt>(Body))
-            return CS->getSourceRange();
-          else
-            return cast<CXXTryStmt>(Body)->getSourceRange();
-        }
+        if (Stmt *Body = FD->getBody())
+          return Body->getSourceRange();
       }
       else {
         SourceLocation L = D->getLocation();





More information about the cfe-commits mailing list