[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-10 Thread Phabricator via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-08 Thread Gábor Horváth via Phabricator via cfe-commits
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: >

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-08 Thread Gábor Horváth via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-08 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-08 Thread Gábor Horváth via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-08 Thread Gábor Horváth via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-08 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-07 Thread Gábor Horváth via Phabricator via cfe-commits
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.

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-07 Thread Gábor Horváth via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-05 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/cert/PostfixOperatorCheck.cpp:27 +hasOverloadedOperatorName("--"))) + .bind("decl"), + this); JonasToth wrote: > could the `,t

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-04 Thread Gábor Horváth via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-04 Thread Gábor Horváth via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-02 Thread Eugene Zelenko via Phabricator via cfe-commits
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

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-02 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/cert/PostfixOperatorCheck.cpp:27 +hasOverloadedOperatorName("--"))) + .bind("decl"), + this); could the `,this);` be on thi

[PATCH] D32743: [clang-tidy] Add new cert-dcl21-cpp check.

2017-05-02 Thread Gábor Horváth via Phabricator via cfe-commits
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