0e2c34f92f00628d48968dfea096d36381f494cb |
|
23-Mar-2015 |
Stephen Hines <srhines@google.com> |
Update aosp/master clang for rebase to r230699. Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
176edba5311f6eff0cad2631449885ddf4fbc9ea |
|
01-Dec-2014 |
Stephen Hines <srhines@google.com> |
Update aosp/master Clang for rebase to r222490. Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
c568f1e98938584c0ef0b12ae5018ff7d90a4072 |
|
21-Jul-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for rebase to r212749. This also fixes a small issue with arm_neon.h not being generated always. Includes a cherry-pick of: r213450 - fixes mac-specific header issue r213126 - removes a default -Bsymbolic on Android Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
64cc0c37f78719f905029a9099445c214cb40ce3 |
|
08-Nov-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Specialize "loop executed 0 times" for for-in and for-range loops. The path note that says "Loop body executed 0 times" has been changed to "Loop body skipped when range is empty" for C++11 for-range loops, and to "Loop body skipped when collection is empty" for Objective-C for-in loops. Part of <rdar://problem/14992886> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d3d0dcfbf784c828c2f07384fd6a3401b0cd4e9e |
|
16-Oct-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Don't draw edges to C++11 in-class member initializers. Since these aren't lexically in the constructor, drawing arrows would be a horrible jump across the body of the class. We could still do better here by skipping over unimportant initializers, but this at least keeps everything within the body of the constructor. <rdar://problem/14960554> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
31b71f3097a338315a144067dde5b160c4e44fc9 |
|
07-Oct-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] ArrayRef-ize BugReporter::EmitBasicReport. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
edcc199f5861dd8ad1ec3ad1b83512d2a92e515a |
|
04-Oct-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Replace bug category magic strings with shared constants, take 2. Re-commit r191910 (reverted in r191936) with layering violation fixed, by moving the bug categories to StaticAnalyzerCore instead of ...Checkers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
344472ebeded2fca2ed5013b9e87f81d09bfa908 |
|
23-Aug-2013 |
Robert Wilhelm <robert.wilhelm@gmx.net> |
Use pop_back_val() instead of both back() and pop_back(). No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
24146975f1af8c1b4b14e8545f218129d0e7dfeb |
|
22-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Split isFromMainFile into two functions. Basically, isInMainFile considers line markers, and isWrittenInMainFile doesn't. Distinguishing between the two is useful when dealing with files which are preprocessed files or rewritten with -frewrite-includes (so we don't, for example, print useless warnings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
edc45d5a91f83d1135bc218f3c377e347ab0251f |
|
05-Aug-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Clarify that r187624 is a hack and should be fixed better later. Tracked by <rdar://problem/14648821>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
cd007b18ba218925923a82ad4462fecf903f4a93 |
|
02-Aug-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Silently drop all reports within synthesized bodies. Much of our diagnostic machinery is set up to assume that the report end path location is valid. Moreover, the user may be quite confused when something goes wrong in our BodyFarm-synthesized function bodies, which may be simplified or modified from the real implementations. Rather than try to make this all work somehow, just drop the report so that we don't try to go on with an invalid source location. Note that we still handle reports whose /paths/ go through invalid locations, just not those that are reported in one. We do have to be careful not to lose warnings because of this. The impetus for this change was an autorelease being processed within the synthesized body, and there may be other possible issues that are worth reporting in some way. We'll take these as they come, however. <rdar://problem/14611722> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
0a9350f2411926f4faaeb2ce7d7a9bc1f27751e9 |
|
16-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Fix formatting. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
6afc66dc25f9b28d129f8bc842d43af0b0c71196 |
|
16-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Add 'const' qualifiers to static const char* variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
09d19efaa147762f84aed55efa7930bb3616a4e5 |
|
04-Jul-2013 |
Craig Topper <craig.topper@gmail.com> |
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
cff15128c6c089bd6fae841b80680e6f5afbf0bf |
|
17-Jun-2013 |
Reid Kleckner <reid@kleckner.net> |
[AST] Don't include RecursiveASTVisitor.h in ASTContext.h The untemplated implementation of getParents() doesn't need to be in a header file. RecursiveASTVisitor.h is full of repeated macro expansion. Moving this include to ASTContext.cpp speeds up compilation of LambdaMangleContext.cpp, a small C++ file with few includes, from 3.7s to 2.8s for me locally. I haven't measured a full build, but it can't hurt. I had to fix a few static analyzer files that were depending on transitive includes of C++ AST headers. Reviewers: rsmith, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
a3f5a5afefca7653349a88472d5ce01ba7226e27 |
|
08-Jun-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer; alternate edges] Fix the edge locations in presence of macros. We drew the diagnostic edges to wrong statements in cases the note was on a macro. The fix is simple, but seems to work just fine for a whole bunch of test cases (plist-macros.cpp). Also, removes an unnecessary edge in edges-new.mm, when function signature starts with a macro. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
57c8736e7dce5e63b4e1665d2c4fcf6e6ef959d0 |
|
07-Jun-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Address Jordan’s code review for r183451 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
6838710779a23ea5dfdb5764ad7b7a7451b00bf8 |
|
07-Jun-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Ensure that pieces with invalid locations always get removed from the BugReport The function in which we were doing it used to be conditionalized. Add a new unconditional cleanup step. This fixes PR16227 (radar://14073870) - a crash when generating html output for one of the test files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
49a246f4fad959888bb0164c624c3c2b03078e91 |
|
06-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Simplify edges in a C++11 for-range loop. Previously our edges were completely broken here; now, the final result is a very simple set of edges in most cases: one up to the "for" keyword for context, and one into the body of the loop. This matches the behavior for ObjC for-in loops. In the AST, however, CXXForRangeStmts are handled very differently from ObjCForCollectionStmts. Since they are specified in terms of equivalent statements in the C++ standard, we actually have implicit AST nodes for all of the semantic statements. This makes evaluation very easy, but diagnostic locations a bit trickier. Fortunately, the problem can be generally defined away by marking all of the implicit statements as part of the top-level for-range statement. One of the implicit statements in a for-range statement is the declaration of implicit iterators __begin and __end. The CFG synthesizes two separate DeclStmts to match each of these decls, but until now these synthetic DeclStmts weren't in the function's ParentMap. Now, the CFG keeps track of its synthetic statements, and the AnalysisDeclContext will make sure to add them to the ParentMap. <rdar://problem/14038483> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183449 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
632182d0e2011a6e21cf9abe34eef5a1f037e7ef |
|
06-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Improve debug output for PathDiagnosticPieces. You can now dump a single PathDiagnosticPiece or PathDiagnosticLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
1089a57a88051f84aca66f3d8c92bda32a3a5c49 |
|
06-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Don't crash if the top-level entry edge is missing. We previously asserted that there was a top-level function entry edge, but if the function decl's location is invalid (or within a macro) this edge might not exist. Change the assertion to an actual check, and don't drop the first path piece if it doesn't match. <rdar://problem/14070304> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
574c7cf6d0c8e8f8ecda360ae271d5391c404534 |
|
06-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Ignore self-edges, not all edges with the same location. The edge optimizer needs to see edges for, say, implicit casts (which have the same source location as their operand) to uniformly simplify the entire path. However, we still don't want to produce edges from a statement to /itself/, which could occur when two nodes in a row have the same statement location. This necessitated moving the check for redundant notes to after edge optimization, since the check relies on notes being adjacent in the path. <rdar://problem/14061675> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
048eeea6852043990c87e52938b53b5337bd098e |
|
04-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Enable the new edge algorithm by default. ...but don't yet migrate over the existing plist tests. Some of these would be trivial to migrate; others could use a bit of inspection first. In any case, though, the new edge algorithm seems to have proven itself, and we'd like more coverage (and more usage) of it going forwards. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
e624524705ab660eb8d1feb9870ef2989fb2bdf4 |
|
04-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Omit subexpression back-edges that span multiple lines. A.1 -> A -> B becomes A.1 -> B This only applies if there's an edge from a subexpression to its parent expression, and that is immediately followed by another edge from the parent expression to a subsequent expression. Normally this is useful for bringing the edges back to the left side of the code, but when the subexpression is on a different line the backedge ends up looking strange, and may even obscure code. In these cases, it's better to just continue to the next top-level statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
22b0ad2d2a9c723bcdc94525a091fdbfbaa480fa |
|
04-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Don't eliminate subexpr edge cycles if the line is long. Specifically, if the line is over 80 characters, or if the top-level statement spans mulitple lines, we should preserve sub-expression edges even if they form a simple cycle as described in the last commit, because it's harder to infer what's going on than it is for shorter lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3b5977e690b3d4476938a548bbd6f66c4a4a6dcd |
|
04-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Eliminate "cycle edges" for a single subexpression. Generating context arrows can result in quite a few arrows surrounding a relatively simple expression, often containing only a single path note. | 1 +--2---+ v/ v auto m = new m // 3 (the path note) |\ | 5 +--4---+ v Note also that 5 and 1 are two ends of the "same" arrow, i.e. they go from event to event. 3 is not an arrow but the path note itself. Now, if we see a pair of edges like 2 and 4---where 4 is the reverse of 2 and there is optionally a single path note between them---we will eliminate /both/ edges. Anything more complicated will be left as is (more edges involved, an inlined call, etc). The next commit will refine this to preserve the arrows in a larger expression, so that we don't lose all context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
9d9b494aa36ceeb823c48acf04d2d7677174be88 |
|
04-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Improve enclosing contexts for logical expressions. The old edge builder didn't have a notion of nested statement contexts, so there was no special treatment of a logical operator inside an if (or inside another logical operator). The new edge builder always tries to establish the full context up to the top-level statement, so it's important to know how much context has been established already rather than just checking the innermost context. This restores some of the old behavior for the old edge generation: the context of a logical operator's non-controlling expression is the subexpression in the old edge algorithm, but the entire operator expression in the new algorithm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
96f1061fbe59faff5b266a3a04061cefcfe03e2f |
|
04-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Include context for edges to sub-expressions. The current edge-generation algorithm sometimes creates edges from a top-level statement A to a sub-expression B.1 that's not at the start of B. This creates a "swoosh" effect where the arrow is drawn on top of the text at the start of B. In these cases, the results are clearer if we see an edge from A to B, then another one from B to B.1. Admittedly, this does create a /lot/ of arrows, some of which merely hop into a subexpression and then out again for a single note. The next commit will eliminate these if the subexpression is simple enough. This updates and reuses some of the infrastructure from the old edge- generation algorithm to find the "enclosing statement" context for a given expression. One change in particular marks the context of the LHS or RHS of a logical binary operator (&&, ||) as the entire operator expression, rather than the subexpression itself. This matches our behavior for ?:, and allows us to handle nested context information. <rdar://problem/13902816> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
01f1ff79f70b3e042995a43b29ccbf0fffc77d5f |
|
04-Jun-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Include a top-level function entry edge while optimizing. Although we don't want to show a function entry edge for a top-level path, having it makes optimizing edges a little more uniform. This does not affect any edges now, but will affect context edge generation (next commit). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
f94cb007d03031bcf3d1b02f6a683a189e934953 |
|
31-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; new edges] add simplifySimpleBranches() to reduce edges for branches. In many cases, the edge from the "if" to the condition, followed by an edge from the branch condition to the target code, is uninteresting. In such cases, we should fold the two edges into one from the "if" to the target. This also applies to loops. Implements <rdar://problem/14034763>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
042ca3de1e8d723cb73ee4d9984509e4489a6bb7 |
|
31-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; new edges] in splitBranchConditionEdges() do not check that predecessor edge has source in the same lexical scope as the target branch. Fixes <rdar://problem/14031292>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
34d1a0a1522c7bcc7bf431f5b9a92cde3f2315fd |
|
31-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate arrows] Rename 'adjustBranchEdges' to 'splitBranchConditionEdges'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
904fd08edbedeb18b16875dd54b3f1edb049e9b9 |
|
30-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
Revert "[analyzer; alternate edges] don't add an edge incoming from the start of a function" ...and make this work correctly in the current codebase. After living on this for a while, it turns out to look very strange for inlined functions that have only a single statement, and somewhat strange for inlined functions in general (since they are still conceptually in the middle of the path, and there is a function-entry path note). It's worth noting that this only affects inlined functions; in the new arrow generation algorithm, the top-level function still starts at the first real statement in the function body, not the enclosing CompoundStmt. This reverts r182078 / dbfa950abe0e55b173286a306ee620eff5f72ea. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3e8a85fcfc3d264e4c5b21fbdd741bbc0c24a266 |
|
30-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] In for(;;), use the ForStmt itself for loop notes. Most loop notes (like "entering loop body") are attached to the condition expression guarding a loop or its equivalent. For loops may not have a condition expression, though. Rather than crashing, just use the entire ForStmt as the location. This is probably the best we can do. <rdar://problem/14016063> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d474da062565596015558856333423199aed5eb1 |
|
24-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Treat analyzer-synthesized function bodies like implicit bodies. When generating path notes, implicit function bodies are shown at the call site, so that, say, copying a POD type in C++ doesn't jump you to a header file. This is especially important when the synthesized function itself calls another function (or block), in which case we should try to jump the user around as little as possible. By checking whether a called function has a body in the AST, we can tell if the analyzer synthesized the body, and if we should therefore collapse the call down to the call site like a true implicitly-defined function. <rdar://problem/13978414> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
5a6fb20841220488f8be7254fbea8ba7233ebcd3 |
|
24-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer; new edges] Properly set location after exiting an inlined call. The new edge algorithm would keep track of the previous location in each location context, so that it could draw arrows coming in and out of each inlined call. However, it tried to access the location of the call before it was actually set (at the CallEnter node). This only affected unterminated calls at the end of a path; calls with visible exit nodes already had a valid location. This patch ditches the location context map, since we're processing the nodes in order anyway, and just unconditionally updates the PrevLoc variable after popping out of an inlined call. <rdar://problem/13983470> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b1a4d37c0549501fe12907bc6ffa81bc5d04b98a |
|
23-May-2013 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helper functions static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
0fa3504acfc7c20a87973c58ad3474adc94dd97d |
|
23-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate edges] fix type that was causing the wrong path piece to get removed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
34bd3331b5ed34cc9027ee00e1aaabfecff8f742 |
|
22-May-2013 |
Pete Cooper <peter_cooper@apple.com> |
Insert explicit casts to try appease overload resolution in the buildbots git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
13feb9201e3a44d5e6159c67914c76d583a12769 |
|
22-May-2013 |
Ted Kremenek <kremenek@apple.com> |
Use scope-resolution operator to hopefully unbreak Windows builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
a705980a7c3315b7c72d99ce675342ad91b50642 |
|
22-May-2013 |
Ted Kremenek <kremenek@apple.com> |
Simplifiy code using return value of erase(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
1d85a9e8fb4e6ac513467b5fa825bd53e6fcba56 |
|
22-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] remove redundant adjacent "events" with the same text. Fixes <rdar://problem/13949982> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
de7bc0d997cc69bd5c337ab82665c2f7ed989138 |
|
22-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate edges] remove puny edges on the same line that span less than 3 columns. These are legitimate control-flow edges, but visually they add no value. Implements <rdar://problem/13941325>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
ddf6e840ca0678c305d5d1c493a66d4cda554e5e |
|
22-May-2013 |
Ted Kremenek <kremenek@apple.com> |
Remove unnecessary assignment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
52f926cc32e4f4969f767e98d98f0137358d5f12 |
|
21-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate edges] prune out extra edges to a subexpression where we dive-in and out of a subexpression. Fixes <rdar://problem/13941891>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
a327bb12b1cd0c142eb06e30b4f6018b96d5babf |
|
21-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternated edges] look through expressions just like Environment does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
e86ee1a213d244bb66b7eef3e9ab2266908cf4af |
|
21-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] optimize edges for ObjC fast enumeration loops. Fixes <rdar://problem/13942300>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
6d0da608c144eb57b7dd22f71b363191a4a1b2c0 |
|
18-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] New edges: include an edge to the end-of-path location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d1913d89e2ff3b38bb6293833cfd9d8ead76348e |
|
18-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Add a debug dump for PathPieces, a list of PathDiagnosticPieces. Originally implemented by Ted, extended by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
bb518991ce4298d8662235fc8cb13813f011c18d |
|
18-May-2013 |
Jordan Rose <jordan_rose@apple.com> |
Revert "[analyzer; alternate edges] improve support for edges with PseudoObjectExprs." Ted and I spent a long time discussing this today and found out that neither the existing code nor the new code was doing what either of us thought it was, which is never good. The good news is we found a much simpler way to fix the motivating test case (an ObjCSubscriptExpr). This reverts r182083, but pieces of it will come back in subsequent commits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
e9aae62e8bca3abfc1dc36f67845444291171e13 |
|
17-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] improve support for edges with PseudoObjectExprs. This optimizes some spurious edges resulting from PseudoObjectExprs. This required far more changes than I anticipated. The current ParentMap does not record any hierarchy information between a PseudoObjectExpr and its *semantic* expressions that may be wrapped in OpaqueValueExprs, which are the expressions actually laid out in the CFG. This means the arrow pruning logic could not map from an expression to its containing PseudoObjectExprs. To solve this, this patch adds a variant of ParentMap that returns the "semantic" parentage of expressions (essentially as they are viewed by the CFG). This alternate ParentMap is then used by the arrow reducing logic to identify edges into pseudo object expressions, and then eliminate them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
a40983460cc3f8f583cd968ac2e4647dc30c83f5 |
|
17-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] treat 'if' statements the same way we do as 'for' or 'while'. This means adding an extra edge from the 'if' to the condition, which aesthetically looks more pleasing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
dbfa950abe0e55b173286a306ee620eff5f72ea8 |
|
17-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] don't add an edge incoming from the start of a function for a nested call. This matches what we do with the first stack frame. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d95b70175646829c26344d5f0bda1ec3009f2a5b |
|
17-May-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Add an option to use the last location in the main source file as the report location. Previously, we’ve used the last location of the analyzer issue path as the location of the report. This might not provide the best user experience, when one analyzer a source file and the issue appears in the header. Introduce an option to use the last location of the path that is in the main source file as the report location. New option can be enabled with -analyzer-config report-in-main-source-file=true. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
afde200cdae9731aa5826c6178eae9e7fef74475 |
|
09-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] for "loop back" edges add back the extra edge to the closing '}' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
8841c532f217d938f47f4feaa3707b929cd71181 |
|
09-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate arrows] adapt 'for' loop aesthetic cleanup to 'while' loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
aecda966174516c0ac7c05ceb40e88fc99bcf27c |
|
08-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] insert an extra edge for 'for' statements to conditions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
8484b37a2b7720c016d27a672343b1c67bd2e731 |
|
08-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate edges] edges from subexpressions of "?:" are important to retain git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
be0b207c4916f823497d31cbf5083efb4e374163 |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate arrows] Fix inconsistencies in recorded location context when handling interprocedural paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
f4bbb1d8c2aa8b6630110827361ee0655e731548 |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] add back recording whether we visited the first edge. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b17c2f79093317a0bf3017350347170dd1061f49 |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] remove pruning of loop diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
03194fb1bbf2b2d17ff7e3d61ddb9d73e9297fdc |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] include logical '||' and '&&' as anchors for edges. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
bc0fd8129626ff4e485388311b081e76d0f96795 |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] include an edge from the "break" or "continue" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
98fb1cca0eccb9cd8b40756907f0c27c9be791be |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] the extra edge to the closing '}' in a loop adds no value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
96b8134337883908fcc45484486fe200d6b3e32f |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] the initializer of a ForStmt isn't interesting either. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
e2f7337958f21802e98777f441fe20ef7ba2adff |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] The ForStmt increment is not a critical anchor for arrows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
a399f776ee29e099da33eaf7f9d585b4edc4b61d |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] simplify optimization rules to look at control-flow conditions to prune edges. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d0f5faf319550b0504b2f8f822d06a6b0279285b |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] use the terminator condition as the location for 'entering loop body' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b097a57f58672a825c99fdfb668b04e921e363b9 |
|
07-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] provide a diagnostic for entering a loop for the first time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
481da5554d03271b0d87b695449963f7728c5895 |
|
06-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate arrows] don't increment the path iterator when we just deleted the next iterator. This is an optimization. It is possible that by deleting the next edge we will pattern match again at the current spot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
15676bec6fa9ad9466d93c163f2d1b8a3f559b3a |
|
04-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate edges] start experimenting with control flow "barriers" to prevent an edge being optimized away. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
e644ed5308ab22e4bcb5f821fe7ea9dae324a0a8 |
|
04-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate edges] ignore parentheses when determining edge levels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
f468fa16e37fc8fa6a915fe36aee8f0434709789 |
|
04-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] - eliminate unnecessary edges where between parents and subexpressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b9e13d555fc9f3e5515e2b1fa6f720e6f10bb076 |
|
04-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] - merge control edges where we descend to a subexpression and pop back out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
bb521b8f14ca29ee4e17ae1f9877586ef0bf8378 |
|
04-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer; alternate edges] prune edges whose end/begin locations have the same statement parents. This change required some minor changes to LocationContextMap to have it map from PathPieces to LocationContexts instead of PathDiagnosticCallPieces to LocationContexts. These changes are in the other diagnostic generation logic as well, but are functionally equivalent. Interestingly, this optimize requires delaying "cleanUpLocation()" until later; possibly after all edges have been optimized. This is because we need PathDiagnosticLocations to refer to the semantic entity (e.g. a statement) as long as possible. Raw source locations tell us nothing about the semantic relationship between two locations in a path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
cd389d8cc9abeffb1416b70dd58148e66e5d822b |
|
04-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer;alternate edges] - add in events (loop iterations, etc) These were being dropped due a transcription mistake from the original algorithm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
af2836593979d4973bec5bd21f10eb6cc0d0f3e3 |
|
03-May-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Start hacking up alternate control-flow edge generation. WIP. Not guaranteed to do anything useful yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
e19229be18725bd856410b478c0e63d81ab8e4f5 |
|
03-May-2013 |
Ted Kremenek <kremenek@apple.com> |
Make cleanUpLocation() a self-contained function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d306a530fca74e40916121f5583e0545e470b3c4 |
|
03-May-2013 |
Ted Kremenek <kremenek@apple.com> |
Re-apply 180974 with the build error fixed. This was the result of a weird merge error with git. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
ae8c50552df2498130dd33a940d98e0dc4ec26b9 |
|
03-May-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert "Change LocationContextMap to be a temporary instead of shared variable in BugReporter." This reverts commit 180974. It broke the build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
c70fac3c52092013b08163187f034b73c94bf3d0 |
|
03-May-2013 |
Ted Kremenek <kremenek@apple.com> |
Change LocationContextMap to be a temporary instead of shared variable in BugReporter. BugReporter is used to process ALL bug reports. By using a shared map, we are having mappings from different PathDiagnosticPieces to LocationContexts well beyond the point where we are processing a given report. This state is inherently error prone, and is analogous to using a global variable. Instead, just create a temporary map, one per report, and when we are done with it we throw it away. No extra state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
ed866e73bab7733f5226f84c52edefe23d694b2f |
|
30-Apr-2013 |
Ted Kremenek <kremenek@apple.com> |
Revert "[analyzer] Change PathPieces to be a wrapper around an ilist of (through indirection) PathDiagnosticPieces." Jordan rightly pointed out that we can do the same with std::list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
7651e53997e20f1e627ffce25ce613f79c48e3e3 |
|
30-Apr-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Change PathPieces to be a wrapper around an ilist of (through indirection) PathDiagnosticPieces. Much of this patch outside of PathDiagnostics.h are just minor syntactic changes due to the return type for operator* and the like changing for the iterator, so the real focus should be on PathPieces itself. This change is motivated so that we can do efficient insertion and removal of individual pieces from within a PathPiece, just like this was a kind of "IR" for static analyzer diagnostics. We currently implement path transformations by iterating over an entire PathPiece and making a copy. This isn't very natural for some algorithms. We use an ilist here instead of std::list because we want operations to rip out/insert nodes in place, just like IR manipulation. This isn't being used yet, but opens the door for more powerful transformation algorithms on diagnostic paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
0f8579274a010f360a371b53101859d9d6052314 |
|
24-Apr-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Refactor BugReport::getLocation and PathDiagnosticLocation::createEndOfPath for greater code reuse The 2 functions were computing the same location using different logic (each one had edge case bugs that the other one did not). Refactor them to rely on the same logic. The location of the warning reported in text/command line output format will now match that of the plist file. There is one change in the plist output as well. When reporting an error on a BinaryOperator, we use the location of the operator instead of the beginning of the BinaryOperator expression. This matches our output on command line and looks better in most cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3ea09a802f973c2726b2a489ae08a4bded93410b |
|
12-Apr-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Don't emit extra context arrow after returning from an inlined call. In this code int getZero() { return 0; } void test() { int problem = 1 / getZero(); // expected-warning {{Division by zero}} } we generate these arrows: +-----------------+ | v int problem = 1 / getZero(); ^ | +---+ where the top one represents the control flow up to the first call, and the bottom one represents the flow to the division.* It turns out, however, that we were generating the top arrow twice, as if attempting to "set up context" after we had already returned from the call. This resulted in poor highlighting in Xcode. * Arguably the best location for the division is the '/', but that's a different problem. <rdar://problem/13326040> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3e5ebf1a05603e08f2d0b2b2a5fa9406fe4cfb22 |
|
06-Apr-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] When creating a trimmed graph, preserve whether a node is a sink. This is important because sometimes two nodes are identical, except the second one is a sink. This bug has probably been around for a while, but it wouldn't have been an issue in the old report graph algorithm. I'm ashamed to say I actually looked at this the first time around and thought it would never be a problem...and then didn't include an assertion to back that up. PR15684 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
0f3a34fb7fea37ebfbcba8b400ccb697b9559b49 |
|
22-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
Revert "[analyzer] Break cycles (optionally) when trimming an ExplodedGraph." The algorithm used here was ridiculously slow when a potential back-edge pointed to a node that already had a lot of successors. The previous commit makes this feature unnecessary anyway. This reverts r177468 / f4cf6b10f863b9bc716a09b2b2a8c497dcc6aa9b. Conflicts: lib/StaticAnalyzer/Core/BugReporter.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
228094a28f81ddba94427239dea5c6e59ff6aabc |
|
22-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Use a forward BFS instead of a reverse BFS to find shortest paths. For a given bug equivalence class, we'd like to emit the report with the shortest path. So far to do this we've been trimming the ExplodedGraph to only contain relevant nodes, then doing a reverse BFS (starting at all the error nodes) to find the shortest paths from the root. However, this is fairly expensive when we are suppressing many bug reports in the same equivalence class. r177468-9 tried to solve this problem by breaking cycles during graph trimming, then updating the BFS priorities after each suppressed report instead of recomputing the whole thing. However, breaking cycles is not a cheap operation because an analysis graph minus cycles is still a DAG, not a tree. This fix changes the algorithm to do a single forward BFS (starting from the root) and to use that to choose the report with the shortest path by looking at the error nodes with the lowest BFS priorities. This was Anna's idea, and has the added advantage of requiring no update step: we can just pick the error node with the next lowest priority to produce the next bug report. <rdar://problem/13474689> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
2110350909701fcd6b55c636e24a675f0a905fea |
|
20-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Re-apply "Do part of the work to find shortest bug paths up front". With the assurance that the trimmed graph does not contain cycles, this patch is safe (with a few tweaks), and provides the performance boost it was intended to. Part of performance work for <rdar://problem/13433687>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
f4cf6b10f863b9bc716a09b2b2a8c497dcc6aa9b |
|
20-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Break cycles (optionally) when trimming an ExplodedGraph. Having a trimmed graph with no cycles (a DAG) is much more convenient for trying to find shortest paths, which is exactly what BugReporter needs to do. Part of the performance work for <rdar://problem/13433687>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
239b6e47d282bd66c8b559ac47b8b42b34da619e |
|
19-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
Revert "[analyzer] Do part of the work to find shortest bug paths up front." The whole reason we were doing a BFS in the first place is because an ExplodedGraph can have cycles. Unfortunately, my removeErrorNode "update" doesn't work at all if there are cycles. I'd still like to be able to avoid doing the BFS every time, but I'll come back to it later. This reverts r177353 / 481fa5071c203bc8ba4f88d929780f8d0f8837ba. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
a5f80b2ea6d30c5055c067530d63bb0dcaf937d0 |
|
19-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Do part of the work to find shortest bug paths up front. Splitting the graph trimming and the path-finding (r177216) already recovered quite a bit of performance lost to increased suppression. We can still do better by also performing the reverse BFS up front (needed for shortest-path-finding) and only walking the shortest path for each report. This does mean we have to walk back up the path and invalidate all the BFS numbers if the report turns out to be invalid, but it's probably still faster than redoing the full BFS every time. More performance work for <rdar://problem/13433687> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
1efffab67364f5afcc25f5f5f77e0f7ba5d41055 |
|
16-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Separate graph trimming from creating the single-path graph. When we generate a path diagnostic for a bug report, we have to take the full ExplodedGraph and limit it down to a single path. We do this in two steps: "trimming", which limits the graph to all the paths that lead to this particular bug, and "creating the report graph", which finds the shortest path in the trimmed path to any error node. With BugReporterVisitor false positive suppression, this becomes more expensive: it's possible for some paths through the trimmed graph to be invalid (i.e. likely false positives) but others to be valid. Therefore we have to run the visitors over each path in the graph until we find one that is valid, or until we've ruled them all out. This can become quite expensive. This commit separates out graph trimming from creating the report graph, performing the first only once per bug equivalence class and the second once per bug report. It also cleans up that portion of the code by introducing some wrapper classes. This seems to recover most of the performance regression described in my last commit. <rdar://problem/13433687> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
c9963132736782d0c9178c744b3e2307cfb98a08 |
|
16-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Eliminate InterExplodedGraphMap class and NodeBackMap typedef. ...in favor of this typedef: typedef llvm::DenseMap<const ExplodedNode *, const ExplodedNode *> InterExplodedGraphMap; Use this everywhere the previous class and typedef were used. Took the opportunity to ArrayRef-ize ExplodedGraph::trim while I'm at it. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
9a9fe4068eed2fc72ec985e5ae393fb79a8fb9ad |
|
16-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Don't repeat a bug equivalence class if every report is invalid. I removed this check in the recursion->iteration commit, but forgot that generatePathDiagnostic may be called multiple times if there are multiple PathDiagnosticConsumers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
2f13eb116e62161c5e4d198f7831f226e5cea9da |
|
15-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Make GRBugReporter::generatePathDiagnostic iterative, not recursive. The previous generatePathDiagnostic() was intended to be tail-recursive, restarting and trying again if a report was marked invalid. However: (1) this leaked all the cloned visitors, which weren't being deleted, and (2) this wasn't actually tail-recursive because some local variables had non-trivial destructors. This was causing us to overflow the stack on inputs with large numbers of reports in the same equivalence class, such as sqlite3.c. Being iterative at least prevents us from blowing out the stack, but doesn't solve the performance issue: suppressing thousands (yes, thousands) of paths in the same equivalence class is expensive. I'm looking into that now. <rdar://problem/13423498> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
cc08ca9b3cd2b715a699bcc772ce2e83a502915a |
|
15-Mar-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Collect stats on the max # of bug reports in an equivalence class. We discovered that sqlite3.c currently has 2600 reports in a single equivalence class; it would be good to know if this is a recent development or what. (For the curious, the different reports in an equivalence class represent the same bug found along different paths. When we're suppressing false positives, we need to go through /every/ path to make sure there isn't a valid path to a bug. This is a flaw in our after-the-fact suppression, made worse by the fact that that function isn't particularly optimized.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
1b125665bec87c85921c92ebec1d3f60404d1d86 |
|
13-Mar-2013 |
Ted Kremenek <kremenek@apple.com> |
Remove stray space. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
c5b9c8bc6d77175f6d41d898511b1e7b1e2f86f8 |
|
13-Mar-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Handle Objc Fast enumeration for "loop is executed 0 times". Fixes <rdar://problem/12322528> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b07805485c603be3d8011f72611465324c9e664b |
|
23-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Remove the CFGElement "Invalid" state. Use Optional<CFG*> where invalid states were needed previously. In the one case where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy CFGAutomaticObjDtor. Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek and Doug Gregor. Post commit code review feedback on r175796 by Ted Kremenek. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b04a2387ac23adfa063de03844cb16c0d77fb405 |
|
22-Feb-2013 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Implement "Loop executed 0 times" diagnostic correctly. Fixes <rdar://problem/13236549> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
7a95de68c093991047ed8d339479ccad51b88663 |
|
21-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Replace ProgramPoint llvm::cast support to be well-defined. See r175462 for another example/more details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
fdf6a279c9a75c778eba382d9a156697092982a1 |
|
21-Feb-2013 |
David Blaikie <dblaikie@gmail.com> |
Replace CFGElement llvm::cast support to be well-defined. See r175462 for another example/more details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
f07e815823e03c046bbc186ec2b41d656e9cac7f |
|
09-Feb-2013 |
NAKAMURA Takumi <geek4civic@gmail.com> |
clang/lib/StaticAnalyzer/Core/BugReporter.cpp: Appease old msvc in std::pair(0, 0). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
8185674528423e2504a1fae35c28c24104846510 |
|
08-Feb-2013 |
Ted Kremenek <kremenek@apple.com> |
Teach BugReporter (extensive diagnostics) to emit a diagnostic when a loop body is skipped. Fixes <rdar://problem/12322528>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
19df705c75ba341b3ae8f2ff3e3f411d5f49887c |
|
08-Feb-2013 |
Ted Kremenek <kremenek@apple.com> |
Remove stale instance variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
86ff12c8a8a356ca284ca7687749216fbfd74519 |
|
30-Jan-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Move report false positive suppression to report visitors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
aeca2cc3a6f486abff3fdfb4e82903cd3ca4267e |
|
26-Jan-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Add 'prune-paths' config option to disable path pruning. This should be used for testing only. Path pruning is still on by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
187f8bd88bfc92cf3fea62b7d8db5f92edce410a |
|
21-Jan-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Show notes inside implicit calls at the last explicit call site. Before: struct Wrapper { <-- 2. Calling default constructor for 'NonTrivial'. NonTrivial m; }; Wrapper w; <-- 1. Calling implicit default constructor for 'Wrapper'. After: struct Wrapper { NonTrivial m; }; Wrapper w; <-- 1. Calling implicit default constructor for 'Wrapper'. ^-- 2. Calling default constructor for 'NonTrivial'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
1dfebd9f995066a229c34516eb14bc69c6bcde2c |
|
19-Jan-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Suppress warnings coming out of macros defined in sys/queue.h Suppress the warning by just not emitting the report. The sink node would get generated, which is fine since we did reach a bad state. Motivation Due to the way code is structured in some of these macros, we do not reason correctly about it and report false positives. Specifically, the following loop reports a use-after-free. Because of the way the code is structured inside of the macro, the analyzer assumes that the list can have cycles, so you end up with use-after-free in the loop, that is safely deleting elements of the list. (The user does not have a way to teach the analyzer about shape of data structures.) SLIST_FOREACH_SAFE(item, &ctx->example_list, example_le, tmpitem) { if (item->index == 3) { // if you remove each time, no complaints assert((&ctx->example_list)->slh_first == item); SLIST_REMOVE(&ctx->example_list, item, example_s, example_le); free(item); } } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
97bfb558f69c09b01a5c1510f08dc91eb62329a7 |
|
08-Jan-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Include the bug uniqueing location in the issue_hash. The issue here is that if we have 2 leaks reported at the same line for which we cannot print the corresponding region info, they will get treated as the same by issue_hash+description. We need to AUGMENT the issue_hash with the allocation info to differentiate the two issues. Add the "hash" (offset from the beginning of a function) representing allocation site to solve the issue. We might want to generalize solution in the future when we decide to track more than just the 2 locations from the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171825 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
afa7cae15b117c4b75794c6c32424953d94b4359 |
|
07-Dec-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Fix r168019 to work with unpruned paths as well. This is the case where the analyzer tries to print out source locations for code within a synthesized function body, which of course does not have a valid source location. The previous fix attempted to do this during diagnostic path pruning, but some diagnostics have pruning disabled, and so any diagnostic with a path that goes through a synthesized body will either hit an assertion or emit invalid output. <rdar://problem/12657843> (again) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
55fc873017f10f6f566b182b70f6fc22aefa3464 |
|
04-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Sort all of Clang's files under 'lib', and fix up the broken headers uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
84e1513beb8450f31d9589dcdfc33b0890405ab6 |
|
15-Nov-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Fix a use-after-free introduced in r168019. In code like this: void foo() { bar(); baz(); } ...the location for the call to 'bar()' was being used as a backup location for the call to 'baz()'. This is fine unless the call to 'bar()' is deemed uninteresting and that part of the path deleted. (This looks like a logic error as well, but in practice the only way 'baz()' could have an invalid location is if the entire body of 'foo()' is synthesized, meaning the call to 'bar()' will be using the location of the call to 'foo()' anyway. Nevertheless, the new version better matches the intent of the code.) Found by Matt Beaumont-Gay using ASan. Thanks, Matt! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
63bc186d6ac0b44ba4ec6fccb5f471b05c79b666 |
|
15-Nov-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Report leaks at the closing brace of a function body. This fixes a few cases where we'd emit path notes like this: +---+ 1| v p = malloc(len); ^ |2 +---+ In general this should make path notes more consistent and more correct, especially in cases where the leak happens on the false branch of an if that jumps directly to the end of the function. There are a couple places where the leak is reported farther away from the cause; these are usually cases where there are several levels of nested braces before the end of the function. This still matches our current behavior for when there /is/ a statement after all the braces, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
368f3b070e8cb657a65bfa443d60256676d269e7 |
|
15-Nov-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Make sure calls in synthesized functions have valid path locations. We do this by using the "most recent" good location: if a synthesized function 'A' calls another function 'B', the path notes for the call to 'B' will be placed at the same location as the path note for calling 'A'. Similarly, the call to 'A' will have a note saying "Entered call from...", and now we just don't emit that (since the user doesn't have a body to look at anyway). Previously, we were doing this for the "Calling..." notes, but not for the "Entered call from..." or "Returning to caller". This caused a crash when the path entered and then exiting a call within a synthesized body. <rdar://problem/12657843> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
785950e59424dca7ce0081bebf13c0acd2c4fff6 |
|
02-Nov-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Rename 'EmitReport' to 'emitReport'. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3800165e56107df7430520aa98afdf7065db2dd2 |
|
26-Oct-2012 |
Ted Kremenek <kremenek@apple.com> |
Add comments for RemoveRedundantMsgs, rename it to removeRedundantMsgs() per Jordan's feedback. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b85cce094887ab5cf1c47acfe306e2fb1d3cfbb1 |
|
26-Oct-2012 |
Ted Kremenek <kremenek@apple.com> |
TrackConstraintBRVisitor and ConditionBRVisitor can emit similar path notes for cases where a value may be assumed to be null, etc. Instead of having redundant diagnostics, do a pass over the generated PathDiagnostic pieces and remove notes from TrackConstraintBRVisitor that are already covered by ConditionBRVisitor, whose notes tend to be better. Fixes <rdar://problem/12252783> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d632d6fc606f0be438c3b6fe5c43f1b3f5db98b1 |
|
22-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Always allow BugReporterVisitors to see the bug path. Before, PathDiagnosticConsumers that did not support actual path output would (sensibly) cause the generation of the full path to be skipped. However, BugReporterVisitors may want to see the path in order to mark a BugReport as invalid. Now, even for a path generation scheme of 'None' we will still create a trimmed graph and walk backwards through the bug path, doing no work other than passing the nodes to the BugReporterVisitors. This isn't cheap, but it's necessary to properly do suppression when the first path consumer does not support path notes. In the future, we should try only generating the path and visitor-provided path notes once, or at least only creating the trimmed graph once. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
8347d3d45e6f128bba19821f0d2f54cadd4d49bb |
|
22-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Allow a BugReport to be marked "invalid" during path generation. This is intended to allow visitors to make decisions about whether a BugReport is likely a false positive. Currently there are no visitors making use of this feature, so there are no tests. When a BugReport is marked invalid, the invalidator must provide a key that identifies the invaliation (intended to be the visitor type and a context pointer of some kind). This allows us to reverse the decision later on. Being able to reverse a decision about invalidation gives us more flexibility, and allows us to formulate conditions like "this report is invalid UNLESS the original argument is 'foo'". We can use this to fine-tune our false-positive suppression (coming soon). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
a43df9539644bf1c258e12710cd69d79b0b078cd |
|
21-Sep-2012 |
Ted Kremenek <kremenek@apple.com> |
Implement faux-body-synthesis of well-known functions in the static analyzer when their implementations are unavailable. Start by simulating dispatch_sync(). This change is largely a bunch of plumbing around something very simple. We use AnalysisDeclContext to conjure up a fake function body (using the current ASTContext) when one does not exist. This is controlled under the analyzer-config option "faux-bodies", which is off by default. The plumbing in this patch is largely to pass the necessary machinery around. CallEvent needs the AnalysisDeclContextManager to get the function definition, as one may get conjured up lazily. BugReporter and PathDiagnosticLocation needed to be relaxed to handle invalid locations, as the conjured body has no real source locations. We do some primitive recovery in diagnostic generation to generate some reasonable locations (for arrows and events), but it can be improved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
1a7bcc41efb73d80fd45eb71494b073f388d333c |
|
13-Sep-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Fix another use of the address of a temporary, like r163402. Again, GCC is more aggressive about reusing temporary space than we are, leading to Release build crashes for this undefined behavior. PR13710 (though it may not be the only problem there) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
f57a2aa02c0578c5bd834fec0d44c16ad9908620 |
|
12-Sep-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix regression where "looping back to the head of" PathDiagnosticEvents were not emitted. Fixes <rdar://problem/12280665>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
22505ef15e32db31a4f834a387cf73a913bc8f66 |
|
08-Sep-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix bug in BugReporter::RemoveUneededCalls() where "prunable" PathDiagnosticEventPieces were *always* pruned. Instead, they are suppose to only be pruned if the entire call gets pruned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3a46f5fd1709f6df03bbb8b0abf84052dc0f39ff |
|
31-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Ensure that PathDiagnostics profile the same regardless of path. PathDiagnostics are actually profiled and uniqued independently of the path on which the bug occurred. This is used to merge diagnostics that refer to the same issue along different paths, as well as by the plist diagnostics to reference files created by the HTML diagnostics. However, there are two problems with the current implementation: 1) The bug description is included in the profile, but some PathDiagnosticConsumers prefer abbreviated descriptions and some prefer verbose descriptions. Fixed by including both descriptions in the PathDiagnostic objects and always using the verbose one in the profile. 2) The "minimal" path generation scheme provides extra information about which events came from macros that the "extensive" scheme does not. This resulted not only in different locations for the plist and HTML diagnostics, but also in diagnostics being uniqued in the plist output but not in the HTML output. Fixed by storing the "end path" location explicitly in the PathDiagnostic object, rather than trying to find the last piece of the path when the diagnostic is requested. This should hopefully finish unsticking our internal buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
80de487e03dd0f44e4572e2122ebc1aa6a3961f5 |
|
29-Aug-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Improved diagnostic pruning for calls initializing values. This heuristic addresses the case when a pointer (or ref) is passed to a function, which initializes the variable (or sets it to something other than '0'). On the branch where the inlined function does not set the value, we report use of undefined value (or NULL pointer dereference). The access happens in the caller and the path through the callee would get pruned away with regular path pruning. To solve this issue, we previously disabled diagnostic pruning completely on undefined and null pointer dereference checks, which entailed very verbose diagnostics in most cases. Furthermore, not all of the undef value checks had the diagnostic pruning disabled. This patch implements the following heuristic: if we pass a pointer (or ref) to the region (on which the error is reported) into a function and it's value is either undef or 'NULL' (and is a pointer), do not prune the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
c4bac8e376b98d633bb00ee5f510d5e58449753c |
|
16-Aug-2012 |
Ted Kremenek <kremenek@apple.com> |
Allow multiple PathDiagnosticConsumers to be used with a BugReporter at the same time. This fixes several issues: - removes egregious hack where PlistDiagnosticConsumer would forward to HTMLDiagnosticConsumer, but diagnostics wouldn't be generated consistently in the same way if PlistDiagnosticConsumer was used by itself. - emitting diagnostics to the terminal (using clang's diagnostic machinery) is no longer a special case, just another PathDiagnosticConsumer. This also magically resolved some duplicate warnings, as we now use PathDiagnosticConsumer's diagnostic pruning, which has scope for the entire translation unit, not just the scope of a BugReporter (which is limited to a particular ExprEngine). As an interesting side-effect, diagnostics emitted to the terminal also have their trailing "." stripped, just like with diagnostics emitted to plists and HTML. This required some tests to be updated, but now the tests have higher fidelity with what users will see. There are some inefficiencies in this patch. We currently generate the report graph (from the ExplodedGraph) once per PathDiagnosticConsumer, which is a bit wasteful, but that could be pulled up higher in the logic stack. There is some intended duplication, however, as we now generate different PathDiagnostics (for the same issue) for different PathDiagnosticConsumers. This is necessary to produce the diagnostics that a particular consumer expects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d015f4febe85d3e3340172d70042840c51bbd836 |
|
03-Aug-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Solve another source of non-determinism in the diagnostic engine. The code that was supposed to split the tie in a deterministic way is not deterministic. Most likely one of the profile methods uses a pointer. After this change we do finally get the consistent diagnostic output. Testing this requires running the analyzer on large code bases and diffing the results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
0eb6c37dd4e4ad8fa2363003dea270f9fd6c2969 |
|
02-Aug-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Flush bug reports in deterministic order. This makes the diagnostic output order deterministic. 1) This makes order of text diagnostics consistent from run to run. 2) Also resulted in different bugs being reported (from one run to another) with plist-html output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
183ba8e19d49ab1ae25d3cdd0a19591369c5ab9f |
|
26-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Show paths for destructor calls. This modifies BugReporter and friends to handle CallEnter and CallExitEnd program points that came from implicit call CFG nodes (read: destructors). This required some extra handling for nested implicit calls. For example, the added multiple-inheritance test case has a call graph that looks like this: testMultipleInheritance3 ~MultipleInheritance ~SmartPointer ~Subclass ~SmartPointer ***bug here*** In this case we correctly notice that we started in an inlined function when we reach the CallEnter program point for the second ~SmartPointer. However, when we reach the next CallEnter (for ~Subclass), we were accidentally re-using the inner ~SmartPointer call in the diagnostics. Rather than guess if we saw the corresponding CallExitEnd based on the contents of the active path, we now just ask the PathDiagnostic if there's any known stack before popping off the top path. (A similar issue could have occured without multiple inheritance, but there wasn't a test case for it.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
852aa0d2c5d2d1faf2d77b5aa3c0848068a342c5 |
|
11-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Make CallEnter, CallExitBegin, and CallExitEnd not be StmtPoints These ProgramPoints are used in inlining calls, and not all calls have associated statements anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
ed7948b55fa4b2505f240cc5287137f451172b4c |
|
31-May-2012 |
Ted Kremenek <kremenek@apple.com> |
Allow some BugReports to opt-out of PathDiagnostic callstack pruning until we have significantly improved the pruning heuristics. The current heuristics are pretty good, but they make diagnostics for uninitialized variables warnings particularly useless in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
11abcecc8c919673237cf37384290a1ef1943976 |
|
02-May-2012 |
Ted Kremenek <kremenek@apple.com> |
Refine analyzer diagnostics by adding an expression "cone-of-influence" to reverse track interesting values through interesting expressions. This allows us to map from interesting values in a caller to interesting values in a caller, thus recovering some precision in diagnostics lost from IPA. Fixes <rdar://problem/11327497> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
0b3ade86a1c60cf0c7b56aa238aff458eb7f5974 |
|
20-Apr-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Run remove dead bindings right before leaving a function. This is needed to ensure that we always report issues in the correct function. For example, leaks are identified when we call remove dead bindings. In order to make sure we report a callee's leak in the callee, we have to run the operation in the callee's context. This change required quite a bit of infrastructure work since: - We used to only run remove dead bindings before a given statement; here we need to run it after the last statement in the function. For this, we added additional Program Point and special mode in the SymbolReaper to remove all symbols in context lower than the current one. - The call exit operation turned into a sequence of nodes, which are now guarded by CallExitBegin and CallExitEnd nodes for clarity and convenience. (Sorry for the long diff.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
6fd4505ad67a186da8cc26fdb493c93fe4937555 |
|
05-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Require that all static analyzer issues have a category. As part of this change, consolidate some commonly used category strings into global references (more of this can be done, I just did a few). Fixes <rdar://problem/11191537>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
07189521a15d9c088216b943649cb9fe231cbb57 |
|
04-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Include the "issue context" (e.g. function or method) where a static analyzer issue occurred in the plist output. Fixes <rdar://problem/11004527> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
88fc18120ca14b82bef695d6440f51e4c468916c |
|
04-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Change BugReporter's usage of IsCachedDiagnostic to only impact pruning diagnostics emitted to the console, and leave it up to PathDiagnosticConsumer to unique reports with the shortest path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
4a5f724538cbc275370c9504e8169ce92503256c |
|
01-Apr-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Analyzer: Store BugReports directly in a ilist instead of adding another layer of inderection with std::list git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
6488dc31153be6f98b404c7860be6c66bb4ec917 |
|
28-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix suspicious comparison reported by PVS-Studio! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3bc75ca0a636efdc93471c9b6bad43085a22bf3a |
|
24-Mar-2012 |
Jordy Rose <jediknil@belkadan.com> |
[analyzer] Restart path diagnostic generation if any of the visitors change the report configuration while walking the path. This required adding a change count token to BugReport, but also allowed us to ditch ImmutableList as the BugReporterVisitor data type. Also, remove the hack from MallocChecker, now that visitors appear in the opposite order. This is not exactly a fix, but the common case -- custom diagnostics after generic ones -- is now the default behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
8fe4525680ce72e90cee3e58b5654e3ae955447f |
|
17-Mar-2012 |
NAKAMURA Takumi <geek4civic@gmail.com> |
StaticAnalyzer: Fix abuse of StringRef in r152962. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
56a938ff85a444eb3d30d2634d92ce5b1f6fae56 |
|
17-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Create symbol-aware stack hints (building upon r152837). The symbol-aware stack hint combines the checker-provided message with the information about how the symbol was passed to the callee: as a parameter or a return value. For malloc, the generated messages look like this : "Returning from 'foo'; released memory via 1st parameter" "Returning from 'foo'; allocated memory via 1st parameter" "Returning from 'foo'; allocated memory returned" "Returning from 'foo'; reallocation of 1st parameter failed" (We are yet to handle cases when the symbol is a field in a struct or an array element.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
8ec588e2ac57311604cf80608c7d4b3fb3b022f7 |
|
15-Mar-2012 |
Jordy Rose <jediknil@belkadan.com> |
[analyzer] If a metadata symbol is interesting, its region is interesting as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
368a0d565f078666ca5bfb7fe08d04648688e4bc |
|
15-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Allow checkers to supply call stack diagnostic hints for the BugVisitor DiagnosticPieces. When checkers create a DiagnosticPieceEvent, they can supply an extra string, which will be concatenated with the call exit message for every call on the stack between the diagnostic event and the final bug report. (This is a simple version, which could be/will be further enhanced.) For example, this is used in Malloc checker to produce the ", which allocated memory" in the following example: static char *malloc_wrapper() { // 2. Entered call from 'use' return malloc(12); // 3. Memory is allocated } void use() { char *v; v = malloc_wrapper(); // 1. Calling 'malloc_wrappers' // 4. Returning from 'malloc_wrapper', which allocated memory } // 5. Memory is never released; potential memory leak git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
9373937945e1e075dfa08169eaccc1ad0b31f699 |
|
14-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Diagnostics: Supply Caller information even if the bug occurs in the callee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
76aadc346c3a4c363238a1e1232f324c3355d9e0 |
|
09-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Implement basic path diagnostic pruning based on "interesting" symbols and regions. Essentially, a bug centers around a story for various symbols and regions. We should only include the path diagnostic events that relate to those symbols and regions. The pruning is done by associating a set of interesting symbols and regions with a BugReporter, which can be modified at BugReport creation or by BugReporterVisitors. This patch reduces the diagnostics emitted in several of our test cases. I've vetted these as having desired behavior. The only regression is a missing null check diagnostic for the return value of realloc() in test/Analysis/malloc-plist.c. This will require some investigation to fix, and I have added a FIXME to the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
097ebb3d8ce55d1f78a3f1e7a0978dbde5ee2898 |
|
06-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] add a diagnostic event when entering a call via inlining, within the callee, and add an edge. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
2dd17abf11ae64339fa6bfaa57d76e13a5fbe5b8 |
|
06-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] 'Looping back to the head of the loop' diagnostics are prunable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
4ba86bc53bb280ba46a08459eda7d283d513b61f |
|
02-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
[analyzer diagnostics] flush locations *before* popping the current path when visiting a CallEnter. Fixes <rdar://problem/10967815> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
77d09441e59d3bced6c3d55505eb3a67a784fe02 |
|
02-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
[analyzer diagnostics] Change CompactPathDiagnostic to recursively compact diagnostics in calls into macro pieces. Also fix handling of macros within calls in the HTMLDiagnostics. This also adds a test case for r151774. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3edf02f66d339a3ae6d06aeb96c78d9089b53bc1 |
|
01-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Diagnostics - do not try to cleanup the path with macros, it will be done by the general cleanup later on. A Patch by Ted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
725167443808efdc39a99f4eb132a0ae64ac5118 |
|
01-Mar-2012 |
Ted Kremenek <kremenek@apple.com> |
Change if...else if...else if... to a switch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
c89f4b05721f53cfbaf32fc0c4919a4616e68440 |
|
29-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
[analyzer diagnostics] start prototyping stripping PathDiagnostics of unnecessary cruft caused by path inlining. This introduces a concept of a "prunable" PathDiagnosticEvent. Currently this is a flag, but we may evolve the concept to make this more dynamically inferred. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
59950d3aa54ca5066b1fb08a8c79ebfe10e0919b |
|
24-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Make PathDiagnosticBuilder sensitive to varying LocationContexts, thus fixing a bug in the inlining diagnostics where the wrong location could be used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
2042fc1f36d471f437023e8899f0c4fadded2341 |
|
24-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Reapply r151317, but when computing the PathDiagnostic profile and size keep into account the nested structure. Also fix a problem with how inlining impacted Plist diagnostics, and adjust some ranges in the Plist output due to richer information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
68fbb3ee8ae374b6505885e907af92b30eef707f |
|
24-Feb-2012 |
Chad Rosier <mcrosier@apple.com> |
Revert r151317 - Rework PathDiagnostics creation.. - to appease buildbots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
4970ef8e3527ac356c3e9fde0710561fcb63e424 |
|
24-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Rework PathDiagnostic creation so that call stacks are captured by a nested PathDiagnosticCallPiece. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
ca8e36eb637e232475ef31c3f22d5da907390917 |
|
23-Feb-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Malloc: unique leak reports by allocation site. When we find two leak reports with the same allocation site, report only one of them. Provide a helper method to BugReporter to facilitate this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
c93dc7889644293e318e19d82830ea2acc45b678 |
|
20-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import IntrusiveRefCntPtr<> into clang namespace The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
af84f8fea486dde096466e85f4bca7c8d3ff4571 |
|
08-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Remove explicit delete of PathDiagnosticMacroPiece, as it is now reference counted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
802e02463b880f53a6e645bde78cc412481ce9e0 |
|
08-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Change PathDiagnosticPieces to be reference counted (simplifying their management), and introduce 'PathPieces' as a common container for PathDiagnosticPieces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d7a3e2c5f61cd4893f95b69a424fe4def3aa0f69 |
|
07-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
5de4fdb8de700f95b0b863a9e5a4a508de17a034 |
|
07-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Tweak BugReporter extensive diagnostics to not add edges between function calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
0cf3d471546251b12bdceff360f66c079c40526c |
|
07-Feb-2012 |
Ted Kremenek <kremenek@apple.com> |
Add basic BugReporter support for CallEnter/CallExit. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
f7ccbad5d9949e7ddd1cbef43d482553b811e026 |
|
05-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import SmallString<> into clang namespace (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
6f42b62b6194f53bcbc349f5d17388e1936535d7 |
|
05-Feb-2012 |
Dylan Noblesmith <nobled@dreamwidth.org> |
Basic: import OwningPtr<> into clang namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
8fe83e1df954d72c0f4ffc15d20a5222ec151c21 |
|
04-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move a method from IdentifierTable.h out of line and remove the SmallString include. Fix all the transitive include users. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
00bd44d5677783527d7517c1ffe45e4d75a0f56f |
|
04-Feb-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h. Fix all the files that depended on transitive includes of Diagnostic.h. With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
c35fb7d67d515659ad2325b4f6ec97c9fe64fb63 |
|
28-Jan-2012 |
Benjamin Kramer <benny.kra@googlemail.com> |
StaticAnalyzer: Move ObjC- and CXX-specific methods out of line so checkers that don't care about the language don't have to pull in all the headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
8bef8238181a30e52dea380789a7e2d760eac532 |
|
26-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
Change references to 'const ProgramState *' to typedef 'ProgramStateRef'. At this point this is largely cosmetic, but it opens the door to replace ProgramStateRef with a smart pointer that more eagerly acts in the role of reclaiming unused ProgramState objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
5eca482fe895ea57bc82410222e6426c09e63284 |
|
06-Jan-2012 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Make the entries in 'Environment' context-sensitive by making entries map from (Stmt*,LocationContext*) pairs to SVals instead of Stmt* to SVals. This is needed to support basic IPA via inlining. Without this, we cannot tell if a Stmt* binding is part of the current analysis scope (StackFrameContext) or part of a parent context. This change introduces an uglification of the use of getSVal(), and thus takes two steps forward and one step back. There are also potential performance implications of enlarging the Environment. Both can be addressed going forward by refactoring the APIs and optimizing the internal representation of Environment. This patch mainly introduces the functionality upon when we want to build upon (and clean up). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
99ba9e3bd70671f3441fb974895f226a83ce0e66 |
|
20-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b8989f27f116ff2400e92a52c067a69846119eb5 |
|
14-Oct-2011 |
Benjamin Kramer <benny.kra@googlemail.com> |
Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
a6b8b2c09610b8bc4330e948ece8b940c2386406 |
|
10-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Constant expression evaluation refactoring: - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
ef3643fbbbf66247c5e205497fae0f46e240c143 |
|
26-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Rename PathDiagnosticClient to PathDiagnosticConsumer as per issue 5397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
d6471f7c1921c7802804ce3ff6fe9768310f72b9 |
|
26-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Rename Diagnostic to DiagnosticsEngine as per issue 5397 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 |
|
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Removing a bunch of dead returns/breaks after llvm_unreachables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 |
|
23-Sep-2011 |
David Blaikie <dblaikie@gmail.com> |
Switch assert(0/false) llvm_unreachable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
590dd8e0959d8df5621827768987c4792b74fc06 |
|
20-Sep-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Refactor PathDiagnosticLocation: Make PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation. (Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
23803374d8db054192ea6fcb766b87e04f26c8fb |
|
20-Sep-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Remove LocationContext and a dependency from PathDiagnosticLoaction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
1531bb0c69d9afff6a6434e4cadf345eb628b287 |
|
20-Sep-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Use more create methods in the PathDiagnostic, cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
4522e2a9e7fa0313e8e5a388d8f0ab66feccc6af |
|
20-Sep-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] BugReport has a profile method, so reuse it here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
0cd59482abd8aec9ed1eaad11f5fe9c1e42639f6 |
|
16-Sep-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 5 of ?): - Get rid of PathDiagnosticLocation(SourceRange r,..) constructor by providing a bunch of create methods. - The PathDiagnosticLocation(SourceLocation L,..), which is used by crate methods, will eventually become private. - Test difference is in the case when the report starts at the beginning of the function. We used to represent that point as a range of the very first token in the first statement. Now, it's just a single location representing the first character of the first statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
220ac8c175cb1bf9b18d82eefe036995d7a2164d |
|
15-Sep-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 2 of ?): - Modify all PathDiagnosticLocation constructors that take Stmt to also requre LocationContext. - Add a constructor which should be used in case there is no valid statement/location (it will grab the location of the enclosing function). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
14924267950e75c6c1f6fcea39fa507b7168bc39 |
|
24-Aug-2011 |
Anna Zaks <ganna@apple.com> |
[analyzer] Allow checker writes to specify that no region should be accosiated with the report. (Useful when we report an error on endOfPath or deadSymbols, when the range of the last expression might have nothing to do with the error.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
7f2531cb41448852ec78de90fc1d3c0149c95d7d |
|
22-Aug-2011 |
Anna Zaks <ganna@apple.com> |
Static Analyzer Diagnostics: Allow checkers to add ExtraDescriptiveText, now renamed into ExtraText, to the diagnostic without subclassing BugReport. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
7df1234c2e62b2a23dc4417e527f941c20ebe858 |
|
21-Aug-2011 |
Jordy Rose <jediknil@belkadan.com> |
[analyzer] Replace calls to getNameAsString() with StringRef equivalents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
23f395ee1bf4e4aa76b310d896a951799eaca94a |
|
20-Aug-2011 |
Anna Zaks <ganna@apple.com> |
Static Analyzer Diagnostics: Move the responsibility for generating the endOfPath diagnostic piece from BugReport to BugReporterVisitor. Switch CFRefCount to use visitors in order to generate the endOfPath piece. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
dc757b049796949e4b11646445a6598f0bdabd7a |
|
20-Aug-2011 |
Anna Zaks <ganna@apple.com> |
Static Analyzer Diagnostics: Switch CFRefCount to using the new visitor API. BugReport no longer needs to inherit from BugReporterVisitor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
50bbc165b063155cc23c360deb7b865502e068e2 |
|
20-Aug-2011 |
Anna Zaks <ganna@apple.com> |
Static Analyzer Diagnostics: Kill the addVisitorCreator(callbackTy, void*) API in favor of addVisitor(BugReporterVisitor*). 1) Create a header file to expose the predefined visitors. And move the parent(BugReporterVisitor) there as well. 2) Remove the registerXXXVisitor functions - the Visitor constructors/getters can be used now to create the object. One exception is registerVarDeclsLastStore(), which registers more then one visitor, so make it static member of FindLastStoreBRVisitor. 3) Modify all the checkers to use the new API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3b030a28cda2b953758507769c1d436bec5ec45e |
|
19-Aug-2011 |
Anna Zaks <ganna@apple.com> |
Fix a memory leak in the analyzer - BugReports didn't get freed. Plus, remove invalid assert from the destructor which wasn't called previously due to the leak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
8e6431adab313e283a992698f6fc7afe62420999 |
|
19-Aug-2011 |
Anna Zaks <ganna@apple.com> |
Static Analyzer Diagnostics: Move custom diagnostic visitors from BugReporterContext to BugReport. One API change: I added BugReporter as an additional parameter to the BugReporterVisitor::VisitNode() method to allow visitors register other visitors with the report on the fly (while processing a node). This functionality is used by NilReceiverVisitor, which registers TrackNullOrUndefValue when the receiver is null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
b7530a4ca9a7ef62350682bbb374a06de6fdaa9f |
|
18-Aug-2011 |
Anna Zaks <ganna@apple.com> |
Remove DiagBugReport by pulling it into its parent BugReport. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
e172e8b9e7fc67d7d03589af7e92fe777afcf33a |
|
18-Aug-2011 |
Anna Zaks <ganna@apple.com> |
Remove EnhancedBugReport and RangedBugReport - pull all the extra functionality they provided into their parent BugReport. The only functional changes are: made getRanges() non const - it adds default range to Ranges if none are supplied, made getStmt() private, which was another FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
18c66fdc3c4008d335885695fe36fb5353c5f672 |
|
16-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Rename GRState to ProgramState, and cleanup some code formatting along the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
9c378f705405d37f49795d5e915989de774fe11f |
|
13-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
993124ecdd44ec1430a3b7f01b22f65bbaadb586 |
|
06-Aug-2011 |
Ted Kremenek <kremenek@apple.com> |
[analyzer] Start sketching out a new BugReporterVisitor that inspects branches and other expressions to generate interesting path events in diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
eb3058a114edd3a3bff1011554aafc95b529a975 |
|
03-Aug-2011 |
Anna Zaks <ganna@apple.com> |
Static Analyzer diagnostics visualization: when the last location on a path is end of the function, the arrow should point to the closing brace, not the statement before it. Patch by Ted Kremenek. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
642116259e8df6286063a17361c20e95b5017a0a |
|
25-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rename getInstantiationLineNumber to getExpansionLineNumber in both SourceManager and FullSourceLoc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
a77c031cb66f75d22672070052cc6e0205289ff8 |
|
25-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Rename getInstantiationColumnNumber to getExpansionColumnNumber in both SourceManager and FullSourceLoc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
402785357ab053dd53f4fdd858b9630a5e0f8bad |
|
25-Jul-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Mechanically rename SourceManager::getInstantiationLoc and FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
5f9e272e632e951b1efe824cd16acb4d96077930 |
|
23-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
fc8f0e14ad142ed811e90fbd9a30e419e301c717 |
|
15-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
fix a bunch of comment typos found by codespell. Patch by Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
f111d935722ed488144600cea5ed03a6b5069e8f |
|
15-Apr-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
C1X: implement generic selections As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
3c0349e87cdbd7316d06d2411d86ee1086e717a5 |
|
01-Mar-2011 |
Ted Kremenek <kremenek@apple.com> |
In preparation for fixing PR 6884, rework CFGElement to have getAs<> return pointers instead of fresh CFGElements. - Also, consoldiate getDtorKind() and getKind() into one "kind". - Add empty getDestructorDecl() method to CFGImplicitDtor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
404fc3ad6bd844bf8ce70cbf9974ab297704a122 |
|
23-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[analyzer] Refactor BugTypes and their ownership model. -In general, don't have the BugReporter deleting BugTypes, BugTypes will eventually become owned by checkers and outlive the BugReporter. In the meantime, there will be some leaks since some checkers assume that the BugTypes they create will be destroyed by the BugReporter. -Have BugReporter::EmitBasicReport create BugTypes that are reused if the same name & category strings are passed to EmitBasicReport. These BugTypes are owned and destroyed by the BugReporter. This allows bugs reported through EmitBasicReport to be coalesced. -Remove the llvm::FoldingSet<BugReportEquivClass> from BugType and move it into the BugReporter. For uniquing BugReportEquivClass also use the BugType* so that we can iterate over all of them using only one set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
56ca35d396d8692c384c785f9aeebcf22563fe1e |
|
17-Feb-2011 |
John McCall <rjmccall@apple.com> |
Change the representation of GNU ?: expressions to use a different expression class and to bind the shared value using OpaqueValueExpr. This fixes an unnoticed problem with deserialization of these expressions where the deserialized form would lose the vital pointer-equality trait; or rather, it fixes it because this patch also does the right thing for deserializing OVEs. Change OVEs to not be a "temporary object" in the sense that copy elision is permitted. This new representation is not totally unawkward to work with, but I think that's really part and parcel with the semantics we're modelling here. In particular, it's much easier to fix things like the copy elision bug and to make the CFG look right. I've tried to update the analyzer to deal with this in at least some obvious cases, and I think we get a much better CFG out, but the printing of OpaqueValueExprs probably needs some work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
7dfc9420babe83e236a47e752f8723bd06070d9d |
|
16-Feb-2011 |
Zhanyong Wan <wan@google.com> |
Makes most methods in SVals.h conform to the naming guide. Reviewed by kremenek. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
9b663716449b618ba0390b1dbebc54fa8e971124 |
|
10-Feb-2011 |
Ted Kremenek <kremenek@apple.com> |
Split 'include/clang/StaticAnalyzer' into 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'. This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|
811d75ee35b8b061a9b10a4e7b81e0c0eaf739c3 |
|
08-Feb-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[analyzer] Move the files in lib/StaticAnalyzer to lib/StaticAnalyzer/Core. Eventually there will also be a lib/StaticAnalyzer/Frontend that will handle initialization and checker registration. Yet another library to avoid cyclic dependencies between Core and Checkers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
|