[clang] [clang] Remove an incorrect assertion in ConstantFoldAttrs (PR #105789)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 23 22:32:55 PDT 2024


tbaederr wrote:

> > I guess it might make sense to create the `ConstantExpr` in any case, even for a `None` `APValue`?
> 
> The comment above `ConstantFoldAttrArgs` seems to suggest that that’s what’s supposed to happen if the expression isn’t dependent—I don’t know if there’s any code that depends on that, though.

Hm, what comment are you referring to exactly?

We could of course also just reject void expressions, that's closer to the previous behavior I guess.

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


More information about the cfe-commits mailing list