efriedma added a comment. > and it seems to involve a lot of AST traversal
I was thinking we'd just call into SemaChecking in appropriate places. I guess there's a little AST traversal to figure whether an expression forms an array address. Your idea seems simpler. > remove elements from the list of deferred warnings when handling an & operator For C++, I think you might also need to handle discarded-value expressions? Maybe it's okay if we warn anyway in that case. :) > This would lose the warnings on *&x[n], but I don't think that's a disaster And more generally `*(x+n)`, although I guess that isn't implemented now anyway. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71714/new/ https://reviews.llvm.org/D71714 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits