Codesbyusman added a comment. In D130510#3698415 <https://reviews.llvm.org/D130510#3698415>, @rtrieu wrote:
> Can you add my earlier test case or something like it to > SemaCXX/warn-bitwise-compare.cpp ? > > template <int I, class T> > void foo(int x) { > bool b1 = (x & sizeof(T)) == 8; > bool b2 = (x & I) == 8; > bool b3 = (x & 4) == 8; // only warn here > } > > void run(int x) { > foo<4, int>(8); > } Yes sure, will update you ================ Comment at: clang/lib/Analysis/CFG.cpp:58 #include <cassert> +#include <iostream> #include <memory> ---------------- rtrieu wrote: > For debugging? > > Have you tried `llvm::errs() << "message";` ? A few streams are provided by > LLVM support which most places have already, so no extra header is needed to > make it work. > For debugging? > Yes. I just forget to remove them. Will updaye them. > Have you tried llvm::errs() << "message"; ? A few streams are provided by > LLVM support which most places have already, so no extra header is needed to > make it work. > > okay, Great. Will use in future. Thank you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130510/new/ https://reviews.llvm.org/D130510 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits