erichkeane added inline comments.

================
Comment at: clang/lib/Sema/SemaChecking.cpp:12328
       return IntRange::forValueOfType(C, GetExprType(E));
 
+    case UO_Not:
----------------
Richard mentions UO_PreInc, UO_PreDec, UO_Minus, and UO_Not.  What about the 
other 3?


================
Comment at: clang/lib/Sema/SemaChecking.cpp:12330
+    case UO_Not:
+      // unary not promotes boolean to integer
+      if (UO->getSubExpr()->isKnownToHaveBooleanValue())
----------------



================
Comment at: clang/lib/Sema/SemaChecking.cpp:12332
+      if (UO->getSubExpr()->isKnownToHaveBooleanValue())
+        return IntRange(MaxWidth, false);
+
----------------
Can you trace what MaxWidth ends up being every time?  Are we sure this will 
always just be int-width and not long long or something?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126960

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

Reply via email to