Serosh-commits wrote:

> This seems to be attempting the absolute opposite of what the code is 
> supposed to be doing here. What contexts ARE we getting here that we should 
> be skipping?

i think  here the context is a `RecordDecl` (an anonymous union), which isn’t 
what this part of the code expects because of the malformed input, that union 
ends up being used as the lookup entity inside a `TemplateParamScope` then  
`CppLookupName` hits this 2nd  loop, which is only meant for namespace or 
file-level lookups, so it blows up
since the  member lookup for classes/unions is already handled earlier so i 
thought it will make sense to just skip these cases here
so yeah instead of assuming the parser always gives the right context it’s 
safer to just check the context type here i guess 


https://github.com/llvm/llvm-project/pull/190484
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to