danielmarjamaki marked 3 inline comments as done.
Comment at: clang-tidy/readability/RedundantDeclarationCheck.cpp:39
@@ +38,3 @@
+ bool MultiVar = false;
+ if (const auto *VD = dyn_cast(D)) {
+if (VD && VD->getPreviousDecl()->getStorageClass() == SC_Extern &&
--
danielmarjamaki updated this revision to Diff 72802.
danielmarjamaki added a comment.
Fix review comments
https://reviews.llvm.org/D24656
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/RedundantDeclarationCheck.cpp
cl
alexfh requested changes to this revision.
alexfh added a comment.
This revision now requires changes to proceed.
If this kind of an error is not too frequent, it might make sense as a clang
diagnostic, indeed. Having it in clang-tidy until then doesn't hurt, though.
Comment at
danielmarjamaki marked an inline comment as done.
danielmarjamaki added a comment.
https://reviews.llvm.org/D24656
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki removed rL LLVM as the repository for this revision.
danielmarjamaki updated this revision to Diff 71775.
danielmarjamaki added a comment.
run clang-format on test. add release notes.
https://reviews.llvm.org/D24656
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/rea
danielmarjamaki added a comment.
> Will be good idea to detect redundant function prototypes.
Yes.
Should that have the same ID though? Is it better to have one
readability-redundant-declaration or two separate
readability-redundant-variable-declaration and
readability-redundant-function-dec
danielmarjamaki added a comment.
> However, I think this check should be part of Clang diagnostics. GCC has
> -Wredundant-decls for a long time.
I am not against that.
What is the criteria? When should it be in the compiler and when should it be
in clang-tidy?
Personally I think it's natural
Eugene.Zelenko added inline comments.
Comment at: test/clang-tidy/readability-redundant-declaration.cpp:9
@@ +8,3 @@
+extern int A;
+extern int A,B;
+// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: redundant variable A declaration
Please run Clang-format over test.
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.
Please mention this check in docs/ReleaseNotes.rst (in alphabetical order).
Will be good idea to detect redundant function prototypes.
However, I think this check should be part of Clang diagnostics. GCC has
-Wre
danielmarjamaki marked 2 inline comments as done.
danielmarjamaki added a comment.
https://reviews.llvm.org/D24656
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielmarjamaki updated this revision to Diff 71614.
danielmarjamaki added a comment.
minor fixes
https://reviews.llvm.org/D24656
Files:
clang-tidy/readability/CMakeLists.txt
clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tidy/readability/RedundantDeclarationCheck.cpp
clang-tidy
danielmarjamaki added a comment.
For information, I am testing this on debian packages right now. I will see the
results next week.
Comment at: clang-tidy/readability/RedundantDeclarationCheck.cpp:22
@@ +21,3 @@
+void RedundantDeclarationCheck::registerMatchers(MatchFinder *Fin
12 matches
Mail list logo