aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorAdam Czachorowski <adamcz@google.com>2020-05-25 14:43:43 +0200
committerAdam Czachorowski <adamcz@google.com>2020-08-10 18:42:57 +0200
commit4061d9e42cff621462931ac7df9666806c77a237 (patch)
tree78107d9ad0fcb69fd3b73c71b476be6b16a083e7 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parentb8ff0daeac0752689ffca9345686845d1b7cfed8 (diff)
downloadllvm-4061d9e42cff621462931ac7df9666806c77a237.zip
llvm-4061d9e42cff621462931ac7df9666806c77a237.tar.gz
llvm-4061d9e42cff621462931ac7df9666806c77a237.tar.bz2
[clangd] Fix crash-bug in preamble indexing when using modules.
Summary: When preamble contains #undef, indexing code finds the matching #define and uses that during indexing. However, it would only look for local definitions. If the macro was defined in a module, MacroInfo would be nullptr and clangd would crash. This change makes clangd ignore any #undef without a matching #define inside the same TU. The indexing of macros happens for preamble only, so then #undef must be in the preamble, which is why we need two .h files in a test. Note that clangd is currently not ready for module support, but this brings us one step closer. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80525
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions