summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/ProgramPoint.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Display cast kinds in program point dumps.Artem Dergachev2019-10-171-1/+5
| | | | | | | Because cast expressions have their own hierarchy, it's extremely useful to have some information about what kind of casts are we dealing with. llvm-svn: 375185
* [analyzer] exploded-graph-rewriter: Improve source location dumps.Artem Dergachev2019-07-121-21/+11
| | | | | | | | - Correctly display macro expansion and spelling locations. - Use the same procedure to display location context call site locations. - Display statement IDs for program points. llvm-svn: 365861
* [analyzer] print() JSONify: ProgramPoint revisionCsaba Dabis2019-06-241-1/+2
| | | | | | | | | | | | | | | | | Summary: Now we also print out the filename with its path. Reviewers: NoQ Reviewed By: NoQ Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63438 llvm-svn: 364197
* [analyzer] ProgramPoint: more explicit printJson()Csaba Dabis2019-06-121-17/+26
| | | | | | | | | | | | | | | | | Summary: Now we print out every possible kinds of ProgramPoints. Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62946 llvm-svn: 363187
* [analyzer] print() JSONify: CFG implementationCsaba Dabis2019-05-291-5/+8
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62496 llvm-svn: 362003
* [analyzer] print() JSONify: Decl revisionCsaba Dabis2019-05-291-6/+4
| | | | | | | | | | | | | | | | | Summary: - Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62495 llvm-svn: 362002
* [analyzer][AST] print() JSONify: Stmt implementationCsaba Dabis2019-05-291-27/+22
| | | | | | | | | | | | | | | | | | | | Summary: This patch also adds a function called `JsonFormat()` which: - Flattens the string so removes the new-lines. - Escapes double quotes. Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62494 llvm-svn: 362000
* [analyzer] print() JSONify: getNodeLabel implementationCsaba Dabis2019-05-291-93/+109
| | | | | | | | | | | | | | | | | Summary: This patch also rewrites the ProgramPoint printing. Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus Reviewed By: NoQ Subscribers: cfe-commits, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp Tags: #clang Differential Revision: https://reviews.llvm.org/D62346 llvm-svn: 361997
* [CFG] NFC: Remove implicit conversion from CFGTerminator to Stmt *.Artem Dergachev2019-05-241-1/+1
| | | | | | | | | | | Turn it into a variant class instead. This conversion does indeed save some code but there's a plan to add support for more kinds of terminators that aren't necessarily based on statements, and with those in mind it becomes more and more confusing to have CFGTerminators implicitly convertible to a Stmt *. Differential Revision: https://reviews.llvm.org/D61814 llvm-svn: 361586
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Fix linkage error on ProgramPoint's dump method.Eric Fiselier2018-09-301-0/+4
| | | | | | | | | | | | Currently, ProgramPoint::dump calls the out-of-line function ProgramPoint::print. This causes libraries which include ProgramPoint.h to become dependent on libclangAnalysis, which in turn causes missing symbol link error when building with -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_MODULES=ON. The breakage was introduced in r343160. This patch fixes the issues by moving ProgramPoint::dump's declaration out of line. llvm-svn: 343420
* [analyzer] [NFC] Move the code for dumping the program point to ProgramPointGeorge Karpenkov2018-09-271-0/+171
| | | | | | | | So we can dump them outside of viewing the exploded grpah. Differential Revision: https://reviews.llvm.org/D52583 llvm-svn: 343160
* Remove trailing spaceFangrui Song2018-07-301-1/+1
| | | | | | sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291
* Roll-back r250822.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 llvm-svn: 250827
* Apply modernize-use-default to clang.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 llvm-svn: 250822
* [analyzer] Improved checker naming in CFG dump.Anton Yartsev2014-02-171-3/+4
| | | | | | This implements FIXME from Checker.cpp (FIXME: We want to return the package + name of the checker here.) and replaces hardcoded checker names with the new ones obtained via getCheckName().getName(). llvm-svn: 201525
* [analyzer] Run remove dead bindings right before leaving a function.Anna Zaks2012-04-201-2/+4
| | | | | | | | | | | | | | | | | | | | | 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.) llvm-svn: 155244
* [analyzer] Malloc: Utter the name of the leaked variable.Anna Zaks2012-03-211-2/+0
| | | | | | | | | | | | | | | Specifically, we use the last store of the leaked symbol in the leak diagnostic. (No support for struct fields since the malloc checker doesn't track those yet.) + Infrastructure to track the regions used in store evaluations. This approach is more precise than iterating the store to obtain the region bound to the symbol, which is used in RetainCount checker. The region corresponds to what is uttered in the code in the last store and we do not rely on the store implementation to support this functionality. llvm-svn: 153212
* ProgramPoint cleanup after the previous commit r141408 (remove the copy ↵Anna Zaks2011-10-071-0/+25
| | | | | | | | constructor, mark withTag const). Move getProgramPoint() utility from CoreEngine.cpp into ProgramPoint. llvm-svn: 141414
* [analyzer] change "tag" in ProgramPoint from "void*" to a ProgramPointTag*.Ted Kremenek2011-08-121-0/+26
| | | | | | | Having a notion of an actual ProgramPointTag will aid in introspection of the analyzer's behavior. For example, the GraphViz output of the analyzer will pretty-print the tags in a useful manner. llvm-svn: 137529
* ProgramPoint now takes the space of two pointers instead of one. This change wasTed Kremenek2008-09-161-64/+0
| | | | | | | | | motivated because it became clear that the number of subclasses of ProgramPoint would expand and we ran out of bits to represent a pointer variant. As a plus of this change, BlockEdge program points can now be represented explicitly without using a cache of CFGBlock* pairs in CFG. llvm-svn: 56245
* Make assertions for all addresses passed to ProgramPoint that they have at ↵Argyrios Kyrtzidis2008-04-261-4/+3
| | | | | | least an 8-byte alignment. llvm-svn: 50310
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+65
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
OpenPOWER on IntegriCloud