koldaniel updated this revision to Diff 203154.
koldaniel added a comment.
Updating warnings.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D33841/new/
https://reviews.llvm.org/D33841
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
aaron.ballman added inline comments.
Comment at: test/clang-tidy/readability-redundant-extern.cpp:37
+
+void another_file_scope(int _extern);
koldaniel wrote:
> aaron.ballman wrote:
> > koldaniel wrote:
> > > aaron.ballman wrote:
> > > > More tests that I
koldaniel marked an inline comment as done.
koldaniel added inline comments.
Comment at: test/clang-tidy/readability-redundant-extern.cpp:37
+
+void another_file_scope(int _extern);
aaron.ballman wrote:
> koldaniel wrote:
> > aaron.ballman wrote:
> > > More
aaron.ballman added inline comments.
Comment at: test/clang-tidy/readability-redundant-extern.cpp:37
+
+void another_file_scope(int _extern);
koldaniel wrote:
> aaron.ballman wrote:
> > More tests that I figured out:
> > ```
> > namespace {
> > extern void f();
koldaniel updated this revision to Diff 198194.
koldaniel added a comment.
Typedef and macro maches fixed, new test cases added.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D33841/new/
https://reviews.llvm.org/D33841
Files:
clang-tidy/readability/CMakeLists.txt
koldaniel marked an inline comment as done.
koldaniel added inline comments.
Comment at: test/clang-tidy/readability-redundant-extern.cpp:37
+
+void another_file_scope(int _extern);
aaron.ballman wrote:
> More tests that I figured out:
> ```
> namespace {
>
alexfh added inline comments.
Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:8
+
+`extern` is redundant in function declarations
+
koldaniel wrote:
> alexfh wrote:
> > xazax.hun wrote:
> > > alexfh wrote:
> > > > Could you explain, why you
aaron.ballman added inline comments.
Comment at: clang-tidy/readability/RedundantExternCheck.cpp:27
+void RedundantExternCheck::check(const MatchFinder::MatchResult ) {
+ auto* FD =
+ Result.Nodes.getNodeAs("redundant_extern");
Formatting is incorrect
koldaniel updated this revision to Diff 190377.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D33841/new/
https://reviews.llvm.org/D33841
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/RedundantExternCheck.cpp
aaron.ballman added inline comments.
Comment at: docs/clang-tidy/checks/readability-redundant-extern.rst:4
+readability-redundant-extern
+=
+
The underlining here is too long.
Comment at:
MyDeveloperDay added inline comments.
Comment at: clang-tidy/readability/RedundantExternCheck.cpp:45
+
+ int offset = Text.find("extern");
+
current convention would be that this should be Offset
CHANGES SINCE LAST ACTION
Eugene.Zelenko added a comment.
Please mention new check in Release Notes.
Comment at: clang-tidy/readability/RedundantExternCheck.cpp:55
+} // namespace clang
\ No newline at end of file
Please add new line.
Comment at:
koldaniel updated this revision to Diff 186132.
koldaniel added a comment.
Rebased.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D33841/new/
https://reviews.llvm.org/D33841
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
koldaniel updated this revision to Diff 184111.
koldaniel added a comment.
As it was mentioned earlier, I think it would be a better way forward to handle
the check of redundant inlines in the scope of the other checker:
https://reviews.llvm.org/D18914
CHANGES SINCE LAST ACTION
koldaniel marked an inline comment as done.
koldaniel added inline comments.
Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:8
+
+`extern` is redundant in function declarations
+
alexfh wrote:
> xazax.hun wrote:
> > alexfh wrote:
> > > Could
alexfh added inline comments.
Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:8
+
+`extern` is redundant in function declarations
+
xazax.hun wrote:
> alexfh wrote:
> > Could you explain, why you think `extern` is redundant in function
> >
xazax.hun added inline comments.
Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:8
+
+`extern` is redundant in function declarations
+
alexfh wrote:
> Could you explain, why you think `extern` is redundant in function
> declarations?
Just
aaron.ballman added inline comments.
Comment at: clang-tidy/readability/RedundantKeywordCheck.cpp:22
+template
+static bool startsWith(const T , StringRef Value) {
+ Token Result;
Why do you need to do a textual search that the first token in the declaration
alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.
Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:8
+
+`extern` is redundant in function declarations
+
Could you explain,
Prazek added a comment.
extern on function definition is also redundant, right?
Also, what about:
inline extern void foo();
(you check if it startswith extern)
Repository:
rL LLVM
https://reviews.llvm.org/D33841
___
cfe-commits mailing list
Eugene.Zelenko added a comment.
In https://reviews.llvm.org/D33841#771944, @Prazek wrote:
> Feature request: removing "void" from int main(void)
This will duplicate modernize-redundant-void-arg.
Repository:
rL LLVM
https://reviews.llvm.org/D33841
Prazek added a comment.
Feature request: removing "void" from int main(void)
Repository:
rL LLVM
https://reviews.llvm.org/D33841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Eugene.Zelenko added a comment.
Please mention this check in docs/ReleaseNotes.rst (in alphabetical order).
Comment at: docs/clang-tidy/checks/readability-redundant-keyword.rst:6
+
+This checker removes the redundant `extern` and `inline` keywords from code.
+
23 matches
Mail list logo