[clang] [Clang] fix range calculation for conditionals with throw expressions (PR #112081)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 28 13:09:39 PDT 2024


================
@@ -9827,6 +9827,9 @@ static IntRange GetExprRange(ASTContext &C, const Expr *E, unsigned MaxWidth,
     return IntRange(BitField->getBitWidthValue(C),
                     BitField->getType()->isUnsignedIntegerOrEnumerationType());
 
+  if (GetExprType(E)->isVoidType())
+    return IntRange{0, true};
----------------
a-tarasyuk wrote:

@AaronBallman @shafik if these changes look good to you, would you mind proceeding with the merge? thanks

https://github.com/llvm/llvm-project/pull/112081


More information about the cfe-commits mailing list