This revision was automatically updated to reflect the committed changes.
Closed by commit rL302637: [clang-tidy] Add new cert-dcl21-cpp check (authored
by xazax).
Changed prior to commit:
https://reviews.llvm.org/D32743?vs=98179&id=98426#toc
Repository:
rL LLVM
https://reviews.llvm.org/D3
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
https://reviews.llvm.org/D32743
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman
xazax.hun marked 4 inline comments as done.
xazax.hun added inline comments.
Comment at: test/clang-tidy/cert-dcl21-cpp.cpp:1
+// RUN: %check_clang_tidy %s cert-dcl21-cpp %t
+
aaron.ballman wrote:
> xazax.hun wrote:
> > aaron.ballman wrote:
> > > alexfh wrote:
>
xazax.hun updated this revision to Diff 98179.
xazax.hun added a comment.
- Do not do fixits for type aliases.
https://reviews.llvm.org/D32743
Files:
clang-tidy/cert/CERTTidyModule.cpp
clang-tidy/cert/CMakeLists.txt
clang-tidy/cert/PostfixOperatorCheck.cpp
clang-tidy/cert/PostfixOperato
aaron.ballman added inline comments.
Comment at: test/clang-tidy/cert-dcl21-cpp.cpp:1
+// RUN: %check_clang_tidy %s cert-dcl21-cpp %t
+
xazax.hun wrote:
> aaron.ballman wrote:
> > alexfh wrote:
> > > As usual, please add tests with macros and templates with multi
xazax.hun added inline comments.
Comment at: test/clang-tidy/cert-dcl21-cpp.cpp:1
+// RUN: %check_clang_tidy %s cert-dcl21-cpp %t
+
aaron.ballman wrote:
> alexfh wrote:
> > As usual, please add tests with macros and templates with multiple
> > instantiations. Wh
xazax.hun updated this revision to Diff 98162.
xazax.hun added a comment.
- Added more test cases and make them pass.
https://reviews.llvm.org/D32743
Files:
clang-tidy/cert/CERTTidyModule.cpp
clang-tidy/cert/CMakeLists.txt
clang-tidy/cert/PostfixOperatorCheck.cpp
clang-tidy/cert/Postfix
aaron.ballman added inline comments.
Comment at: test/clang-tidy/cert-dcl21-cpp.cpp:1
+// RUN: %check_clang_tidy %s cert-dcl21-cpp %t
+
alexfh wrote:
> As usual, please add tests with macros and templates with multiple
> instantiations. When diagnostics in macro
xazax.hun added inline comments.
Comment at: clang-tidy/cert/PostfixOperatorCheck.cpp:72
+
+ diag(Location, "return type of overloaded %0 is not a constant type")
+ << FuncDecl << FixItHint::CreateInsertion(Location, "const ");
aaron.ballman wrote:
> aaron.
xazax.hun updated this revision to Diff 98097.
xazax.hun marked 3 inline comments as done.
xazax.hun added a comment.
- Fix alphabetical ordering of files in cmake.
- Let clang-format do its job.
https://reviews.llvm.org/D32743
Files:
clang-tidy/cert/CERTTidyModule.cpp
clang-tidy/cert/CMake
aaron.ballman added inline comments.
Comment at: clang-tidy/cert/CMakeLists.txt:8
FloatLoopCounter.cpp
+ PostfixOperatorCheck.cpp
LimitedRandomnessCheck.cpp
aaron.ballman wrote:
> Please keep the list of source files alphabetized.
This is still in the wron
alexfh added inline comments.
Comment at: clang-tidy/cert/PostfixOperatorCheck.cpp:27
+hasOverloadedOperatorName("--")))
+ .bind("decl"),
+ this);
JonasToth wrote:
> could the `,t
xazax.hun updated this revision to Diff 97790.
xazax.hun added a comment.
- Fixed include order.
https://reviews.llvm.org/D32743
Files:
clang-tidy/cert/CERTTidyModule.cpp
clang-tidy/cert/CMakeLists.txt
clang-tidy/cert/PostfixOperatorCheck.cpp
clang-tidy/cert/PostfixOperatorCheck.h
doc
xazax.hun updated this revision to Diff 97789.
xazax.hun marked 21 inline comments as done.
xazax.hun added a comment.
- Fixes according to the review comments.
https://reviews.llvm.org/D32743
Files:
clang-tidy/cert/CERTTidyModule.cpp
clang-tidy/cert/CMakeLists.txt
clang-tidy/cert/Postfix
aaron.ballman added a comment.
Thank you for working on this check!
Comment at: clang-tidy/cert/CERTTidyModule.cpp:22
#include "FloatLoopCounter.h"
+#include "PostfixOperatorCheck.h"
#include "LimitedRandomnessCheck.h"
Please keep the list of includes alphabe
Eugene.Zelenko added a comment.
We have misc-unconventional-assign-operator and google-runtime-operator checks
already. Form user perspective, I think will be good idea to have single check
for different operators.
Comment at: docs/ReleaseNotes.rst:63
+
+ Checks if the overl
JonasToth added inline comments.
Comment at: clang-tidy/cert/PostfixOperatorCheck.cpp:27
+hasOverloadedOperatorName("--")))
+ .bind("decl"),
+ this);
could the `,this);` be on thi
xazax.hun created this revision.
xazax.hun added a project: clang-tools-extra.
Herald added subscribers: whisperity, mgorny.
This check flags postfix ``operator++`` and ``operator--`` declarations, where
the return type is not a const value type. It also attempt to fix the error.
This rule is de
18 matches
Mail list logo