summaryrefslogtreecommitdiffstats
path: root/test/Analysis/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer][tests][NFC] Add EOF newlines, normalize reference expected filesHubert Tong2019-05-011-0/+1
| | | | | | | | | | | | Reference expected files not ending with a newline are normalized to have said newlines. Additionally `plist-macros-with-expansion.cpp.plist` is modified to add a line that is ignored by `%diff_plist`, but not by the more sensitive pattern proposed by http://lists.llvm.org/pipermail/cfe-dev/2019-April/061904.html for `%normalize_plist`. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359692 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix function macro crashKristof Umann2019-03-141-0/+478
| | | | | | | | | Re-commit D57893. Differential Revision: https://reviews.llvm.org/D57893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356142 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[analyzer] Fix function macro crash"Kristof Umann2019-03-121-478/+0
| | | | | | | | | | | Buildbot breaks when LLVm is compiled with memory sanitizer. WARNING: MemorySanitizer: use-of-uninitialized-value #0 0xa3d16d8 in getMacroNameAndPrintExpansion(blahblah) lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:903:11 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355911 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix function macro crashKristof Umann2019-03-121-0/+478
| | | | | | | | | | | | | | | | | | | | When there is a functor-like macro which is passed as parameter to another "function" macro then its parameters are not listed at the place of expansion: #define foo(x) int bar() { return x; } #define hello(fvar) fvar(0) hello(foo) int main() { 1 / bar(); } Expansion of hello(foo) asserted Clang, because it expected an l_paren token in the 3rd line after "foo", since it is a function-like token. Patch by Tibor Brunner! Differential Revision: https://reviews.llvm.org/D57893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355903 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix infinite recursion in printing macrosKristof Umann2019-03-081-0/+134
| | | | | | | | | | | | | | | | | | | | | | In the commited testfile, macro expansion (the one implemented for the plist output) runs into an infinite recursion. The issue originates from the algorithm being faulty, as in #define value REC_MACRO_FUNC(value) the "value" is being (or at least attempted) expanded from the same macro. The solved this issue by gathering already visited macros in a set, which does resolve the crash, but will result in an incorrect macro expansion, that would preferably be fixed down the line. Patch by Tibor Brunner! Differential Revision: https://reviews.llvm.org/D57891 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355705 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer][PlistMacroExpansion] Part 5.: Support for # and ##Kristof Umann2018-11-301-64/+402
| | | | | | | | | | From what I can see, this should be the last patch needed to replicate macro argument expansions. Differential Revision: https://reviews.llvm.org/D52988 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348025 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__Kristof Umann2018-11-291-82/+251
| | | | | | | Differential Revision: https://reviews.llvm.org/D52986 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347888 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer][PlistMacroExpansion] Part 3.: Macro arguments are expandedKristof Umann2018-11-271-80/+3637
| | | | | | | | | This part focuses on expanding macro arguments. Differential Revision: https://reviews.llvm.org/D52795 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347629 91177308-0d34-0410-b5e6-96231b3b80d8
* Reland '[analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name ↵Kristof Umann2018-11-051-5/+1042
| | | | | | and primitive expansion' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346111 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert '[analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name ↵Kristof Umann2018-11-041-1042/+5
| | | | | | and primitive expansion' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346096 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and ↵Kristof Umann2018-11-041-5/+1042
| | | | | | | | | | | | primitive expansion This patch adds a couple new functions to acquire the macro's name, and also expands it, although it doesn't expand the arguments, as seen from the test files Differential Revision: https://reviews.llvm.org/D52794 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346095 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flagKristof Umann2018-10-311-0/+351
This is the first part of the implementation of the inclusion of macro expansions into the plist output. It adds a new flag that adds a new "macro_expansions" entry to each report that has PathDiagnosticPieces that were expanded from a macro. While there's an entry for each macro expansion, both the name of the macro and what it expands to is missing, and will be implemented in followup patches. Differential Revision: https://reviews.llvm.org/D52742 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345724 91177308-0d34-0410-b5e6-96231b3b80d8