================
----------------
steakhal wrote:
DeclWithIssue can never be the TUDecl unless the bug report didn't set it in
the first place (which is impossible for path-sensitive bug reports), but
sometimes BasicBugReports forget to set it (see Webkit stuff). This is a bug
itself, but not worth investigating why we don't set it in some rare cases.
Remember, the loop body looks like this:
```
const Decl *Parent =
dyn_cast_or_null<Decl>(DeclWithIssue->getLexicalDeclContext());
if (Parent == nullptr || isa<TranslationUnitDecl>(Parent))
break;
DeclWithIssue = Parent;
```
In other words, we look at the lexical parent and only propagate it to
DeclWithIssue if it's not the TUDecl! So we always stop before reaching the
TUDecl.
https://github.com/llvm/llvm-project/pull/178441
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits