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

@shafik Getting the expression range for a void type isn't handled at this stage

https://github.com/llvm/llvm-project/blob/bf1a554312bd011cb2016a2c9d7e75d6fe3b02af/clang/lib/Sema/SemaChecking.cpp#L9628-L9631

Throw expressions can be handled if `CondResult` isn't treated as a boolean

https://github.com/llvm/llvm-project/blob/bf1a554312bd011cb2016a2c9d7e75d6fe3b02af/clang/lib/Sema/SemaChecking.cpp#L9633-L9644

It seems this case could be handled either before

https://github.com/llvm/llvm-project/blob/bf1a554312bd011cb2016a2c9d7e75d6fe3b02af/clang/lib/Sema/SemaChecking.cpp#L9629-L9631

or by adding a condition in the recursion call to handle void types. Which 
approach do you think is better? Thanks







https://github.com/llvm/llvm-project/pull/112081
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to