This revision was automatically updated to reflect the committed changes.
Closed by commit rGfff59f48173d: [clang-tidy] Improve
modernize-redundant-void-arg to recognize macro uses (authored by
LegalizeAdulthood).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116425/new/
https://reviews.llvm.org/D116425
___
cfe-commits
LegalizeAdulthood updated this revision to Diff 399076.
LegalizeAdulthood added a comment.
- clang-format
- use `const IdentifierTable &` to avoid accidental modification
- drop braces from simple block statements as per style guide
CHANGES SINCE LAST ACTION
LegalizeAdulthood added inline comments.
Comment at:
clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp:157-161
+ if (ProtoToken.is(tok::TokenKind::l_paren)) {
+State = TokenState::LeftParen;
+ } else if (isMacroIdentifier(Idents, ProtoToken)) {
aaron.ballman added inline comments.
Comment at: clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp:51
this);
- Finder->addMatcher(typedefNameDecl().bind(TypedefId), this);
+
LegalizeAdulthood updated this revision to Diff 398281.
LegalizeAdulthood edited the summary of this revision.
LegalizeAdulthood added a comment.
Add more test cases and improve the Lexing state machine
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116425/new/
LegalizeAdulthood added inline comments.
Comment at:
clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561
+#define return_t(T) T
+return_t(void) func(void);
+// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in
function
jrtc27 added inline comments.
Comment at:
clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561
+#define return_t(T) T
+return_t(void) func(void);
+// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in
function declaration
LegalizeAdulthood added inline comments.
Comment at:
clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561
+#define return_t(T) T
+return_t(void) func(void);
+// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in
function
LegalizeAdulthood added inline comments.
Comment at:
clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561
+#define return_t(T) T
+return_t(void) func(void);
+// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in
function
aaron.ballman added inline comments.
Comment at:
clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561
+#define return_t(T) T
+return_t(void) func(void);
+// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in
function
LegalizeAdulthood added inline comments.
Comment at:
clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561
+#define return_t(T) T
+return_t(void) func(void);
+// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in
function
aaron.ballman added a comment.
Generally LGTM, just a testing request.
Comment at:
clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561
+#define return_t(T) T
+return_t(void) func(void);
+// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void
LegalizeAdulthood created this revision.
LegalizeAdulthood added a reviewer: alexfh.
LegalizeAdulthood added a project: clang-tools-extra.
Herald added subscribers: carlosgalvezp, xazax.hun.
LegalizeAdulthood requested review of this revision.
Sometimes a macro invocation will look like an
14 matches
Mail list logo