Carson Radtke 1e7efca659
[clang] fix crash when template with constructor attribute is instantiated without a priority (#169282)
fixes: https://github.com/llvm/llvm-project/issues/169072

The current implementation expects the priority argument to be provided
to `[[gnu::constructor(<priority>)]]`, but the argument is really
optional. This was causing a segfault when instantiating the
function-template because we were trying to fold an `Expr*` that was a
nullptr.

This change skips the evaluation of the priority argument when it is
missing; this will instantiate a function declaration with the default
priority (65535).
2025-11-28 15:26:43 +08:00
..
2025-03-29 20:54:15 +01:00
2025-11-07 08:57:18 -08:00

See llvm/docs/README.txt