]> granicus.if.org Git - clang/commit
[CrossTU] Fix plist macro expansion if macro in other file.
authorBalazs Keri <1.int32@gmail.com>
Thu, 25 Jul 2019 10:53:22 +0000 (10:53 +0000)
committerBalazs Keri <1.int32@gmail.com>
Thu, 25 Jul 2019 10:53:22 +0000 (10:53 +0000)
commit802ae91fa793b40d0af3e1779c8e46dfc6cc2bc0
tree9ffc2933a0fd63707b11c013487f8b402bd6b1f4
parentd50f7341d4d4c33277f73db8c52a6d584ffe2e93
[CrossTU] Fix plist macro expansion if macro in other file.

Summary:
When cross TU analysis is used it is possible that a macro expansion
is generated for a macro that is defined (and used) in other than
the main translation unit. To get the expansion for it the source
location in the original source file and original preprocessor
is needed.

Reviewers: martong, xazax.hun, Szelethus, ilya-biryukov

Reviewed By: Szelethus

Subscribers: mgorny, NoQ, ilya-biryukov, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64638

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367006 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/CMakeLists.txt
lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
test/Analysis/Inputs/plist-macros-ctu.c [new file with mode: 0644]
test/Analysis/Inputs/plist-macros-ctu.h [new file with mode: 0644]
test/Analysis/Inputs/plist-macros-with-expansion-ctu.c.externalDefMap.txt [new file with mode: 0644]
test/Analysis/plist-macros-with-expansion-ctu.c [new file with mode: 0644]