summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2019-08-06 11:37:50 +0000
committerIlya Biryukov <ibiryukov@google.com>2019-08-06 11:37:50 +0000
commit56bdb0c5082547229ff668405bde2ef5254ee817 (patch)
tree5a8e82a0e567d29a9d45a8288be0f045b917b36f /clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp
parent2836cf0b72aa84e67998e0db7105e783f3a111dc (diff)
downloadbcm5719-llvm-56bdb0c5082547229ff668405bde2ef5254ee817.tar.gz
bcm5719-llvm-56bdb0c5082547229ff668405bde2ef5254ee817.zip
[clangd] Compute scopes eagerly in IncludeFixer
Summary: Computing lazily leads to crashes. In particular, computing scopes may produce diagnostics (from inside template instantiations) and we currently do it when processing another diagnostic, which leads to crashes. Moreover, we remember and access 'Scope*' when computing scopes. This might lead to invalid memory access if the Scope is deleted by the time we run the delayed computation. We did not actually construct an example when this happens, though. From the VCS and review history, it seems the optimization was introduced in the initial version without a mention of any performance benchmarks justifying the performance gains. This led me to a conclusion that the optimization was premature, so removing it to avoid crashes seems like the right trade-off at that point. Reviewers: sammccall Reviewed By: sammccall Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65796 llvm-svn: 368019
Diffstat (limited to 'clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud