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

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 13:03:27 PDT 2024


================
@@ -9827,6 +9827,9 @@ static IntRange GetExprRange(ASTContext &C, const Expr *E, unsigned MaxWidth,
     return IntRange(BitField->getBitWidthValue(C),
                     BitField->getType()->isUnsignedIntegerOrEnumerationType());
 
----------------
shafik wrote:

So why doesn't this `if` statement handle it?

https://github.com/llvm/llvm-project/blob/ed3d05178274890fb804f43ae1bcdfd33b5fd8f0/clang/lib/Sema/SemaChecking.cpp#L9625

Is this line not handling it correctly? 

https://github.com/llvm/llvm-project/blob/ed3d05178274890fb804f43ae1bcdfd33b5fd8f0/clang/lib/Sema/SemaChecking.cpp#L9637

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


More information about the cfe-commits mailing list