[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 21 07:51:08 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 thanks for the feedback. Do you mean the [following changes](https://github.com/llvm/llvm-project/pull/112081/commits/9c2a745ed365449be45cd062f29c89cabde0f514)?

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


More information about the cfe-commits mailing list