diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-07 12:24:14 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-07 12:24:14 +0000 |
commit | 0b6a06a3353eca29ef8935944a5da18ac34fc2c6 (patch) | |
tree | 71f8a6a92c472488801fb285a946aed426c02ba4 /clang/lib/Checker | |
parent | 568bc8456288b97f77164288ce0e0f3a9bbc73d5 (diff) | |
download | bcm5719-llvm-0b6a06a3353eca29ef8935944a5da18ac34fc2c6.tar.gz bcm5719-llvm-0b6a06a3353eca29ef8935944a5da18ac34fc2c6.zip |
Simplify code and remove comment that is no longer relevant.
llvm-svn: 107772
Diffstat (limited to 'clang/lib/Checker')
-rw-r--r-- | clang/lib/Checker/PathDiagnostic.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/clang/lib/Checker/PathDiagnostic.cpp b/clang/lib/Checker/PathDiagnostic.cpp index 6e6c7496f1d..cf05a7df67f 100644 --- a/clang/lib/Checker/PathDiagnostic.cpp +++ b/clang/lib/Checker/PathDiagnostic.cpp @@ -181,15 +181,8 @@ PathDiagnosticRange PathDiagnosticLocation::asRange() const { 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(); |