mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
60eb1da315
I found this during the support of modules for clangd. The reason for the issue is that the iterator returned by noload_lookups is fast-fail after the lookup table changes by the design of llvm::DenseMap. And originally the lookup will try to use getAcceptableDecl to filter the invisible decls. The key point here is that the function "getAcceptableDecl" wouldn't stop after it find the specific decl is invisble. It will continue to visit its redecls to find a visible one. However, such process involves loading decls from external sources, which results the invalidation. Note that the use of "noload_lookups" is rare. It is only used in tools like FixTypos and CodeCompletions. So it is completely fine for the tranditional compiler. This is the reason why I can't reproduce it by a lit test. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
CodeCompleteTest.cpp | ||
ExternalSemaSourceTest.cpp | ||
GslOwnerPointerInference.cpp | ||
SemaLookupTest.cpp | ||
SemaNoloadLookupTest.cpp |