forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-tidy] fix insertion location for function pointers in cppcoreg…
…uidelines-init-variables Previously, the insertion location for the `= nullptr` fix would be after the variable name. However, if the variable is of type function pointer that is not an alias, then the insertion would happen inside the type specification: `void (*a1)(void*);` -> `void (*a1 = nullptr)(void*);`. With this change, the insertion location will be at the next 'terminator'. That is, at the next `,` or `;`, as that will finish the current declaration: `void (a1)(void*) = nullptr;`. Fixes llvm#112089
- Loading branch information
Showing
3 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters