mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 07:58:23 +08:00
Fixes #163224 --- This patch addresses the issue by correcting the caret insertion location for attributes incorrectly positioned before an enum. The location is now derived from the associated `EnumDecl`: for named enums, the attribute is placed before the identifier, while for anonymous enum definitions, it is placed before the opening brace, with a fallback to the semicolon when no brace is present. For example: ```cpp [[nodiscard]] enum class E1 {}; ``` is now suggested as: ```cpp enum class [[nodiscard]] E1 {}; ```