2 Commits

Author SHA1 Message Date
Justin Bogner
1c6c01fbde
[Attributes][HLSL] Teach EnumArgument to refer to an external enum (#70835)
Rather than write a bunch of logic to shepherd between enums with the
same sets of values, add the ability for EnumArgument to refer to an
external enum in the first place.
2023-11-01 11:24:48 -07:00
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