Files
llvm/clang/test/FixIt
Oleksandr T. b1d06058a3 [Clang] adjust caret placement for the suggested attribute location for enum class (#168092)
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 {};
```
2025-12-03 16:20:12 +02:00
..