In some cases non-null non-constant yet valid expression may reach point where
ConditionResult is created. For example, typo correction mechanism can return
such expression, so double check before evaluating it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/include/clang/Sema/Sema.h | ||
---|---|---|
12852 | Oof, this adds quite a bit of expense to this constructor -- isIntegerConstantExpr() is implemented by evaluating the constant expression and throwing away the computed result... which we then recompute when setting KnownValue one line later. It'd be better to only do this computation once and use the computed value to initialize both members. |
clang/include/clang/Sema/Sema.h | ||
---|---|---|
12852 | Oops, now it is evaluated only one time. |
clang/test/SemaCXX/invalid-if-constexpr.cpp | ||
---|---|---|
8 | Hi, why did you mean '__sync_swap' is not reported in riscv target? So it's failed in check-all. |
clang/test/SemaCXX/invalid-if-constexpr.cpp | ||
---|---|---|
8 | I haven't seen any buildbot issues with the issue like this. |
Oof, this adds quite a bit of expense to this constructor -- isIntegerConstantExpr() is implemented by evaluating the constant expression and throwing away the computed result... which we then recompute when setting KnownValue one line later. It'd be better to only do this computation once and use the computed value to initialize both members.