aaron.ballman added a comment.

Precommit CI is still failing on test/SemaCXX/constant-expression-cxx2a.cpp 
with a false positive warning. You'll need to investigate why that's happening, 
but I suspect that the warning logic isn't aware that `dynamic_cast` can return 
null.



================
Comment at: clang/lib/Sema/SemaChecking.cpp:14726
 
-  if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) {
+  if (UnaryOperator *UO = dyn_cast<UnaryOperator>(E->IgnoreParenCasts())) {
     if (UO->getOpcode() != UO_AddrOf)
----------------



================
Comment at: clang/test/Sema/warn-tautological-compare.c:97-100
+void test4(void)
+{
+int *a = (void *) 0;
+int b = (&a) == ((void *) 0); // expected-warning {{comparison of address of 
'a' equal to a null pointer is always false}}
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149000

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to