JonasToth added a comment. In D54943#2956218 <https://reviews.llvm.org/D54943#2956218>, @tiagoma wrote:
> I am getting false positives with > > struct S{}; > > void f(__unaligned S*); > > void scope() > { > S s; > f(&s); > } This godbolt link has the AST for the example. https://godbolt.org/z/8EvsM3Eqe The `ExprMutAnalyzer` ignores 'NoOp' casts as modifications, because in our testing the 'adding const' to an argument was a NoOp-cast. In this case, this is a NoOp-Cast, too, but not adding const. This shadows marking the pointer as mutated and results in the false positive. I would leave this out of this patch, but make a separate fix. Other forms of NoOp-casting are affected too. https://bugs.llvm.org/show_bug.cgi?id=51756 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54943/new/ https://reviews.llvm.org/D54943 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits