summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/BugReporter.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-09-16 01:25:47 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-09-16 01:25:47 +0000
commit2cd7a78c760d1c8052fed67317de2abf2844c5ef (patch)
tree00cd6b740cd87f2ef4fe0ccd5c8478ef6bfa100c /clang/lib/Checker/BugReporter.cpp
parent7ce490c6b5670448b6ee95254d054e8fcf34441f (diff)
downloadbcm5719-llvm-2cd7a78c760d1c8052fed67317de2abf2844c5ef.tar.gz
bcm5719-llvm-2cd7a78c760d1c8052fed67317de2abf2844c5ef.zip
Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch
and discussions with Ted and Jordy. llvm-svn: 114056
Diffstat (limited to 'clang/lib/Checker/BugReporter.cpp')
-rw-r--r--clang/lib/Checker/BugReporter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Checker/BugReporter.cpp b/clang/lib/Checker/BugReporter.cpp
index 5043d905265..a3f4f032a28 100644
--- a/clang/lib/Checker/BugReporter.cpp
+++ b/clang/lib/Checker/BugReporter.cpp
@@ -1165,15 +1165,15 @@ static void GenerateExtensivePathDiagnostic(PathDiagnostic& PD,
}
if (const BlockEntrance *BE = dyn_cast<BlockEntrance>(&P)) {
- if (const Stmt* S = BE->getFirstStmt()) {
- if (IsControlFlowExpr(S)) {
- // Add the proper context for '&&', '||', and '?'.
- EB.addContext(S);
- }
- else
- EB.addExtendedContext(PDB.getEnclosingStmtLocation(S).asStmt());
+ if (CFGStmt S = BE->getFirstElement().getAs<CFGStmt>()) {
+ if (IsControlFlowExpr(S)) {
+ // Add the proper context for '&&', '||', and '?'.
+ EB.addContext(S);
+ }
+ else
+ EB.addExtendedContext(PDB.getEnclosingStmtLocation(S).asStmt());
}
-
+
break;
}
} while (0);
OpenPOWER on IntegriCloud