llvm-capstone/clang/unittests/Sema
Chuanqi Xu 60eb1da315 [Modules] [Sema] Don't try to getAcceptableDecls during the iteration of noload_lookups
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.
2023-06-09 11:32:06 +08:00
..
CMakeLists.txt [Modules] [Sema] Don't try to getAcceptableDecls during the iteration of noload_lookups 2023-06-09 11:32:06 +08:00
CodeCompleteTest.cpp [test] Split out Annotations from TestingSupport 2023-01-12 13:40:47 -08:00
ExternalSemaSourceTest.cpp [clang] Add [is|set]Nested methods to NamespaceDecl 2022-11-24 12:44:35 +00:00
GslOwnerPointerInference.cpp
SemaLookupTest.cpp
SemaNoloadLookupTest.cpp [Modules] [Sema] Don't try to getAcceptableDecls during the iteration of noload_lookups 2023-06-09 11:32:06 +08:00