[clang] [clang] Remove an incorrect assertion in ConstantFoldAttrs (PR #105789)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 24 06:37:13 PST 2025
nikic wrote:
> That's an interesting situation! I'm not sure what I'd expect the LLVM IR to be there. For Clang AST, we want to keep around the expression AST nodes. But for LLVM IR, perhaps it makes sense to drop anything without a value rather than mark it as undef?
No strong opinion, I think either way would be okay. Using undef has the very slight advantage that there's still an indication that there was an argument there, even if it doesn't have a value, so `[[clang::annotation("a", (void)1, 2)]]` and `[[clang::annotation("a", 2)]]` can be distinguished.
https://github.com/llvm/llvm-project/pull/105789
More information about the cfe-commits
mailing list