[PATCH] D158601: [Clang] Always constant-evaluate operands of comparisons to nullptr
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 23 07:04:46 PDT 2023
tbaeder added inline comments.
================
Comment at: clang/lib/AST/ExprConstant.cpp:13312
+ !EvaluatePointer(E->getRHS(), Res, Info))
+ return false;
return Success(CmpResult::Equal, E);
----------------
cor3ntin wrote:
> tbaeder wrote:
> > I kinda expected the fix for this bug to simply //remove// a special case... does just falling through to the `DoAfter()` call not work?
> Nope, EvaluateComparisonBinaryOperator does compute the result of the comparison. `DoAfter` only adjust the result.
> Removing that block of codes lead to a whole bunch of test failures
Shame, but ok.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158601/new/
https://reviews.llvm.org/D158601
More information about the cfe-commits
mailing list