-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang-tidy][modernize-use-using]fix function pointer typedef correctly #65558
[clang-tidy][modernize-use-using]fix function pointer typedef correctly #65558
Conversation
clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp
Outdated
Show resolved
Hide resolved
clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
This is weird issues because it always happen when two typedefs are one after other.
I would personally thing more that LastReplacementEnd is to big, not too small.
But if tests check this properly, then I'm fine with it.
typedef void (*ISSUE_65055_1)(int);
typedef bool (*ISSUE_65055_2)(int);
typedef void VOID; The typedef matcher will match following position:
That means typedef normal type is from |
…ly (llvm#65558) Fixed llvm#65055 For normal type, typedef is from typedef to the end of original type, but for function pointer it is from typedef to the end. So it needs to consider alias name length for normal type.
Fixed #65055
For normal type, typedef is from typedef to the end of original type, but for function pointer it is from typedef to the end.
So it needs to consider alias name length for normal type.