[PATCH] D101790: [clang-tidy] Aliasing: Add support for passing the variable into a function by reference.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 10 11:30:20 PDT 2021


NoQ added a comment.

I completely agree with that as well, these are 100% true positives, which is why I left them as fixmes. The reason why I think we can't have them is that we don't have an appropriate alias analysis implemented. Namely, we have two analyses, one inside the checker that leaves out false positives like the one in `negative_by_val()`, the other is the universal/reusable analysis in Utils that i'm patching up that doesn't support happens-before relation.

I believe the right way forward is to unify these analysis by making the analysis in Utils account for happens-before relation. Ideally this means re-implementing it over the CFG which probably isn't even that hard, it's just a simple graph traversal problem. I may look into it in June or so.


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

https://reviews.llvm.org/D101790



More information about the cfe-commits mailing list