[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)
commitaeac909329a76993314c26ec1a1973c07a79db81
treeaf2603ecc3f036c07e5c6a3179b6f9f953b93308
parentc8916258d5a9f6cdf1d6125b3aa3e68b91e61a98
[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

llvm-svn: 367006
clang/lib/StaticAnalyzer/Core/CMakeLists.txt
clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
clang/test/Analysis/Inputs/plist-macros-ctu.c [new file with mode: 0644]
clang/test/Analysis/Inputs/plist-macros-ctu.h [new file with mode: 0644]
clang/test/Analysis/Inputs/plist-macros-with-expansion-ctu.c.externalDefMap.txt [new file with mode: 0644]
clang/test/Analysis/plist-macros-with-expansion-ctu.c [new file with mode: 0644]