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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 16 05:58:38 PDT 2024


AaronBallman wrote:

> CC @AaronBallman for an opinion about the AST represenation

This is a bit awkward in that it's only used for the `annotate` attributes' argument lists, which should pass all of their arguments down to LLVM IR. However, we don't typically generate LLVM IR for discarded value statements in other circumstances. So I'm not certain *what* we should pass down to LLVM IR in this case. The arguments could be used positionally, so in that case we'd want to pass *something* down so the arguments line up to the source. The arguments could be used semantically, so in that case, there's nothing to pass down because there are no semantics.

(CC @erichkeane for more opinions)

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


More information about the cfe-commits mailing list