vsapsai added a comment.

>> Are there any known signs for mixing lexical and semantic `DeclContext`? I 
>> plan to test the change on our internal codebase, hopefully it'll help to 
>> catch any remaining issues.
>
> The kinds of things I saw go wrong when we were bringing this up on the C++ 
> side were generally in code that would walk the list of (say) fields of a 
> record building up some information, and then attempt to look up a given 
> `FieldDecl*` in that data structure. That can fail if fields get merged, 
> because the lookup key may be a different redeclaration of the same field 
> than the one found by walking the class's members.  The fix is usually to add 
> `getCanonicalDecl` calls in the right places. The sign of this kind of bug 
> happening was usually a crash or assert, usually pretty close to where the 
> problem was.

Thanks, that's helpful.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106994/new/

https://reviews.llvm.org/D106994

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to