[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:62 - New `bugprone-throw-keyword-missing `_ check Please rebase from trunk and use //:doc:// for

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:68 +- New :doc:`bugprone-exception-escape + ` check + Please fix link. See other checks as example.

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:73 +- New `bugprone-parent-virtual-call + `_ check Please rebase from trunk and use //:doc:// for link.

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:127 +- Added `VariableThreshold` option to `readability-function-size + `_ check Please rebase from trunk

[PATCH] D44694: [clang-tidy] Use :doc: for check links in Release Notes

2018-03-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: alexfh, hokein, aaron.ballman. Eugene.Zelenko added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. I learned from https://reviews.llvm.org/D44636 of shorter links to documentation, which could be used for

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:122 +- Added `VariableThreshold` to `readability-function-size + `_ check Will be good idea to add

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:77 +- New `zircon-temporary-objects + `_ check Please sort new checks in alphabetical order.

[PATCH] D44143: [clang-tidy] Create properly seeded random generator check

2018-03-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:63 + + Detects inappropriate seeding of C++ random generators and C srand function. + Please replace srand with ``srand ()``. Comment at:

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:47 +const CXXRecordDecl *ThisClass) { + + assert(GrandParent != nullptr); Please remove empty line. Comment at:

[PATCH] D44346: [clang-tidy] Add Fuchsia checker for temporary objects

2018-03-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/ZxTemporaryObjectsCheck.cpp:24 + std::string QualifiedName = Node.getQualifiedNameAsString(); + return llvm::any_of(Names, + [&](StringRef Name) { return QualifiedName == Name; });

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:12 + +#include +#include Please run Clang-format and remove empty line between headers. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44295

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:26 + +bool IsParentOf(const CXXRecordDecl *Parent, const CXXRecordDecl *ThisClass) { + assert(Parent); Please make this function static and remove anonymous

[PATCH] D44173: [clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics

2018-03-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New module `portability` and new `portability-simd-intrinsics + `_ check Module and check from it

[PATCH] D44173: [clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics

2018-03-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new module in Release Notes. I think new modules should be before new checks there. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44173 ___ cfe-commits mailing list

[PATCH] D41102: Setup clang-doc frontend framework

2018-03-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-doc/BitcodeWriter.h:160 +class ClangDocBitcodeWriter { + public: + ClangDocBitcodeWriter(llvm::BitstreamWriter , Looks like Clang-format was applied incorrectly, because this is Google, not LLVM style.

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D43847#1025833, @niko wrote: > Thanks everyone for your comments! I renamed the namespace and filenames to > 'abseil'. > > @Eugene.Zelenko, definitely interested in extending this to a C++20 modernize > check and adding

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. By the word, may be similar check for std::string::rfind() and std::string::ends_with() (does abseil have analog) should be added too? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 ___

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-03-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D43847#1023452, @hokein wrote: > In https://reviews.llvm.org/D43847#1021967, @aaron.ballman wrote: > > > I need a bit more context because I'm unfamiliar with `absl`. What is this > > module's intended use? > > > As `absl` has been

[PATCH] D43870: [clang-tidy] Another batch of checks to rename from misc- to bugprone-.

2018-02-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- The 'misc-undelegated-constructor' check was renamed to `bugprone-undelegated-constructor + `_

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. std::basic_string::starts_with() was suggested for C++20. May be will be good idea to generalize code to create absl and modernize checks? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43847 ___

[PATCH] D43847: [tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-02-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please add new module in docs/clang-tidy/index.rst and mention it in release notes. Comment at: clang-tidy/absl/AbslTidyModule.cpp:14 +#include "StringFindStartswithCheck.h" +using namespace clang::ast_matchers; + Please

[PATCH] D43778: [clang-tidy] Adding RestrictIncludes check to Fuchsia module

2018-02-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/CMakeLists.txt:8 OverloadedOperatorCheck.cpp + RestrictIncludesCheck.cpp StaticallyConstructedObjectsCheck.cpp Will be good idea to be have consistent name and documentation terminology:

[PATCH] D43424: [clang-doc] Implement a (simple) Markdown generator

2018-02-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please run Clang-format and Clang-tidy modernize. Comment at: clang-doc/generators/Generators.h:46 +public: + MDGenerator(std::unique_ptr , StringRef Root, StringRef Format) : Generator(IS, Root, Format) {}; + virtual ~MDGenerator() {};

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-02-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please run Clang-format and Clang-tidy modernize. Comment at: clang-doc/BitcodeReader.h:36 + public: + ClangDocBitcodeReader() {} + using RecordData = SmallVector; Please use = default;

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please run Clang-format and Clang-tidy modernize. Comment at: clang-doc/Representation.h:80 + : LineNumber(LineNumber), Filename(std::move(Filename)) {} + int LineNumber; + std::string Filename; Please separate

[PATCH] D43667: [clang-doc] Implement a YAML generator

2018-02-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I may be mistaken, but Clang source code didn't use llvm namespace by default. Insetad you should include clang/Basic/LLVM.h and use llvm:: for rest of things. Comment at: clang-doc/tool/ClangDocMain.cpp:42 namespace {

[PATCH] D43667: [clang-doc] Implement a YAML generator

2018-02-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please run Clang-format and Clang-tidy modernize over new code. Comment at: clang-doc/generators/Generators.h:29 + Generator(std::unique_ptr , StringRef Root, StringRef Format) + : IS(IS), Root(Root), Format(Format){}; + virtual

[PATCH] D43500: modernize-use-default-member-init: Remove trailing comma and colon.

2018-02-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:15 +#include "../utils/LexerUtils.h" + Please place it on a top, since header belong to project. Comment at:

[PATCH] D43392: [clang-tidy] Add Fuchsia checker for visibility attributes

2018-02-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `fuchsia-add-visibility + `_ check Please move into new checks section. Comment

[PATCH] D43120: [clang-tidy] New checker for exceptions that are created but not thrown

2018-02-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/ThrowKeywordMissingCheck.cpp:24 + + auto CtorInitializerList = + cxxConstructorDecl(hasAnyConstructorInitializer(anything())); Please don't use auto where type could not be easily deduced.

[PATCH] D43120: [clang-tidy] New checker for exceptions that are created but not thrown

2018-02-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/misc-throw-keyword-missing.rst:6 + +This check warns about the potentially missing `throw` keyword. If a temporary object is created, +but the object's type derives from (or the same as) a class that has

[PATCH] D43089: clang: Add ARCTargetInfo

2018-02-08 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:8220 + +} // End anonymous namespace. Please change to // namespace https://reviews.llvm.org/D43089 ___ cfe-commits mailing list

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:97 +- New `readability-simd-intrinsics + `_ check Please move it new checks section. Repository: rCTE

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:77 +void SIMDIntrinsicsCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( + callExpr(callee(functionDecl(matchesName("^::(_mm_|_mm256_|_mm512_|vec_)"))),

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:24 + +StringRef CheckPPC(StringRef Name) { + if (Name.startswith("vec_")) Please make

[PATCH] D42730: Add clang-tidy check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-01-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `modernize-avoid-functional + `_ check Please move it to new checks section in alphabetical

[PATCH] D42682: [clang-tidy] Add misc-io-functions-misused checker

2018-01-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be //bugprone// is better module then //misc//? Comment at: docs/ReleaseNotes.rst:63 + + Check if the fgetwc, getwc, getwchar, istream::get standard iostream C functions + return values incorrectly stored in char type value.

[PATCH] D42261: [clang-tidy objc-property-declaration] New option AdditionalAcronyms

2018-01-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/objc-property-declaration.rst:45 + + If set, replaces the default list. (If you want to append to the default list, set AdditionalAcronyms instead.) + Please limit string length to 80

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-01-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/cppcoreguidelines/MacroUsageCheck.h:15 +#include "clang/Lex/Preprocessor.h" + +namespace clang { Please include . Comment at:

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-avoid-goto.rst:6-7 + +The usage of ``goto`` has been discouraged for a long time and is diagnosed +with this check. + JonasToth wrote: > aaron.ballman wrote: > > This

[PATCH] D41963: [clang-tidy] Adding Fuchsia checker for thread local storage.

2018-01-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/ThreadLocalCheck.cpp:22 + // Using thread-local storage is disallowed. +Finder->addMatcher(varDecl(hasThreadStorageDuration()).bind("decl"), this); +} Please run Clang-format over file.

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:63 + + The usage of ``goto`` has been discouraged for a long time and is diagnosed + with this check. I think will be good idea to reformulate this statement and its copy in

[PATCH] D41740: [clang-tidy] Adding a new bugprone check for streaming objects of type int8_t or uint8_t

2018-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/StreamInt8Check.cpp:1 +//===--- StreamInt8Check.cpp - clang-tidy--===// +// Please add real description, use space after it and shorten to 80 symbols.

[PATCH] D41655: [clang-tidy] New check bugprone-unused-return-value

2018-01-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/UnusedReturnValueCheck.cpp:13 +#include "clang/ASTMatchers/ASTMatchFinder.h" + +using namespace clang::ast_matchers; Please include cassert, Regex.h, raw_ostream.h, SmallString.h.

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-01-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp:13 +#include "clang/Lex/PPCallbacks.h" + +namespace clang { Please include string and STLExtras.h. Comment at:

[PATCH] D41546: [clang-tidy] Adding Fuchsia checker for statically constructed objects

2017-12-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:146 + + Warns if statically-stored objects are created, unless constructed with `constexpr`. + Please highlight constexpr with ``, not `. Comment at:

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:141 + + Warns if an operator is overloaded, except for the copy and move operators. + assignment operators? Comment at:

[PATCH] D41326: [clang-tidy] Added diagnostics about incorrect usage of NOLINT comment

2017-12-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:169 + } +private: + SmallVector CheckNames; Please separate with empty line. Comment at:

[PATCH] D41056: [clang-tidy] New check misc-uniqueptr-release-unused-retval

2017-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be //bugprone// is better module then //misc//? Comment at: docs/ReleaseNotes.rst:60 +- New `misc-uniqueptr-release-unused-retval + `_ check

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:94 + +std::unique_ptr createSequence(Stmt *FunctionBody, + ASTContext ) { Missing static? Comment at:

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D40937#947658, @szepet wrote: > Other note: If somebody would came up with an approach which can benefit from > the symbolic execution, these solutions could still live happily in the > different tools eg. UseAfterMove (tidy) and

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Does it really belong to Clang-tidy or Clang Analyzer is better place because of path-ensitivity? Please rebase from trunk. General note: CLang-tidy use //check// in terminology, not //checker//. Comment at: docs/ReleaseNotes.rst:63 + + The

[PATCH] D40854: [clang-tidy] WIP implement cppcoreguidelines check for mixed integer arithmetic

2017-12-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:131 + + Finds cases where unsigned and signed integers are used together in arithmetic expressions. + Unsigned integers wrap to 0 when overflowing while the behaviour of signed integers

[PATCH] D40813: [clang-tidy] Adding Fuchsia checker for virtual inheritance

2017-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: test/clang-tidy/fuchsia-virtual-inheritance.cpp:42 + +int main(void) { + A *a = new A(0); void is redundant in C++. See modernize-redundant-void-arg. https://reviews.llvm.org/D40813

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to rename check to //modernize-use-uncaught-exceptions// to be consistent with other similar checks. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Repository: rCTE Clang Tools Extra

[PATCH] D40731: Integrate CHash into CLang

2017-12-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please run Clang-format and Clang-tidy modernize over newly added code. Comment at: include/clang/AST/CHashVisitor.h:1 +#ifndef __CHASH_VISITOR +#define __CHASH_VISITOR Please loon onto other headers for inclusion guards style.

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-12-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:35 + StringRef Name = Node->getIdentifier()->getName(); + auto Pair = InterfaceMap.find(Name); + if (Pair == InterfaceMap.end()) aaron.ballman wrote: > Don't use

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:293 } - -static bool LineIsMarkedWithNOLINT(SourceManager , SourceLocation Loc) { +static bool IsNOLINTFound(StringRef NolintMacro, StringRef Line, + unsigned

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please rebase from trunk. I just enforced some order in chaos of Release Notes :-) https://reviews.llvm.org/D40580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-11-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:76 + for (const auto : Node->bases()) { +const RecordType *Ty = I.getType()->getAs(); +assert(Ty && "RecordType of base class is unknown"); Could be const

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-11-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:21 + + AST_MATCHER(CXXRecordDecl, hasDefinition) { +if (!Node.hasDefinition()) Please reduce indentation level. Comment at:

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D40108#938131, @juliehockett wrote: > If you could, that'd be great! Thank you! It'll be good idea it you'll request commit rights, since you have more checks in development queue. https://reviews.llvm.org/D40108

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/fuchsia-default-arguments.rst:6 + +Warns if a function is declared or called with default arguments. + Please synchronize with text in Release Notes. https://reviews.llvm.org/D40108

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:63 + + Warns if a function is declared or called with default arguments. + I think will be good idea to change to //function// to //function or method//. Same in documentation.

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D40108#928212, @juliehockett wrote: > We do need to figure out what the right prefix for these checks is (whether > fuchsia-* since they'll be used under the Fuchsia umbrella, zircon-* since > the follow the Zircon section of the

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Does Fuchsia coding conventions allows default parameters in class methods? If not, test should reflect this Comment at: docs/ReleaseNotes.rst:63 + + Prevent use of default arguments in declared or called functions in Fuchsia. +

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 + Prevent use of default arguments in declared or called functions in Fuchsia. + Check name and link was accidentally removed. Comment at:

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new module in docs/clang-tidy/index.rst. Repository: rL LLVM https://reviews.llvm.org/D40108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/fuchsia/FuchsiaTidyModule.cpp:31 + void addCheckFactories(ClangTidyCheckFactories ) override { + +CheckFactories.registerCheck( Please remove empty line. Comment at:

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please split this review with one check per review. Comment at: docs/ReleaseNotes.rst:83 + + Check to prevent creation of statically-stored objects in Fuchsia. + Please fix double space Comment at:

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Same mistake could be made with new[] operator. Comment at: docs/clang-tidy/checks/list.rst:10 android-cloexec-creat + android-cloexec-dup android-cloexec-epoll-create I think will be better to fix order of other

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-09-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D37808#869612, @JonasToth wrote: > In https://reviews.llvm.org/D37808#869602, @Eugene.Zelenko wrote: > > > I think will be good idea to extend -Wswitch diagnostics. > > > Ok. But it will introduce new warnings to llvm codebase itself. I

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-09-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to extend -Wswitch diagnostics. https://reviews.llvm.org/D37808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37479: run-clang-tidy: Report progress

2017-09-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think CMake output is good model for run-clang-tidy. https://reviews.llvm.org/D37479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37479: run-clang-tidy: Report progress

2017-09-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be also nice to output progress in terminal when all messages will saved into file. https://reviews.llvm.org/D37479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37479: run-clang-tidy: Report progress

2017-09-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to introduce command line option to control progress display: turn it off, show in absolute numbers or percents. https://reviews.llvm.org/D37479 ___ cfe-commits mailing list

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-08-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D33826#856610, @lebedev.ri wrote: > Any status update here? :) > I generally do see a benefit in this check, because `-Wcast-align` (at least > currently?) does not warn on `reinterpret_cast<>()`. I think will be good idea to extend

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2017-08-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `readability-useless-intermediate-var + `_ check Please place new checks in

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please abandon this and other similar revisions as obsoleted by https://reviews.llvm.org/D36761. https://reviews.llvm.org/D36759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D36759#842367, @chh wrote: > Eugene, do you mean combining this one, https://reviews.llvm.org/D36756, and > https://reviews.llvm.org/D36755 into one? > I don't mind either way. Sure. All three diffs are of same kind.

[PATCH] D36759: [clang-tidy] Use CloexecCheck as base class of CloexecFopenCheck.

2017-08-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think you could combine this refactoring into single change. https://reviews.llvm.org/D36759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36051: [clang-tidy] List the checkers with autofix

2017-07-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to do this in -list-checks too. https://reviews.llvm.org/D36051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It also seems that your code is not based on trunk, since Release Notes were cleared when version was changed to 6. Please update. Repository: rL LLVM https://reviews.llvm.org/D35937 ___ cfe-commits mailing list

[PATCH] D35937: [clang-tidy] Add new readability non-idiomatic static access

2017-07-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/readability-static-accessed-through-instance.rst:7 +Checks for member expressions that access static members through instances, and +replaces them with the corresponding expressions that use a more

[PATCH] D35365: [clang-tidy] Add a close-on-exec check on epoll_create1() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/android/CloexecEpollCreate1Check.cpp:21 + +static constexpr const char *EPOLL_CLOEXEC = "EPOLL_CLOEXEC"; + Please make this declaration consent across all checks. In some checks it declared inside

[PATCH] D35367: [clang-tidy] Add a close-on-exec check on epoll_create() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `android-cloexec-epoll-create + `_ check Please sort checks in alphabetical order.

[PATCH] D35368: [clang-tidy] Add a close-on-exec check on inotify_init1() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `android-cloexec-inotify-init1 + `_ check Please sort checks in alphabetical order.

[PATCH] D35370: [clang-tidy] Add a close-on-exec check on inotify_init() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `android-cloexec-inotify-init + `_ check Please sort checks in alphabetical order.

[PATCH] D35372: [clang-tidy] Add a close-on-exec check on memfd_create() in Android module.

2017-07-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New `android-cloexec-memfd_create + `_ check Please sort checks in alphabetical order.

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D34913#806799, @yawanng wrote: > In https://reviews.llvm.org/D34913#797577, @Eugene.Zelenko wrote: > > > Please wait for Alexander, Aaron or Haojian approval. > > > Could you please check this CL? Thank you. You could commit changes,

[PATCH] D35257: [clang-tidy] Add new modernize use unary assert check

2017-07-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: clang-tidy/modernize/UnaryStaticAssertCheck.cpp:28 +void UnaryStaticAssertCheck::check(const MatchFinder::MatchResult ) { + + const auto *MatchedDecl =

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-06-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko requested changes to this revision. Eugene.Zelenko added a comment. This revision now requires changes to proceed. Please wait for Alexander, Aaron or Haojian approval. Comment at: clang-tidy/android/CloexecOpenCheck.cpp:22 namespace { static constexpr const

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be good idea to run modernize-make-unique on LLVM/Clang/etc for llvm::make_unique. https://reviews.llvm.org/D34206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33841: [clang-tidy] redundant keyword check

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

[PATCH] D33841: [clang-tidy] redundant keyword check

2017-06-02 Thread Eugene Zelenko via Phabricator via 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. +

[PATCH] D33825: [clang-tidy] signal handler must be plain old function check

2017-06-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/cert/CERTTidyModule.cpp:64 +"cert-msc54-cpp"); // C checkers // DCL checker -> check. Comment at: docs/ReleaseNotes.rst:73 + + Checks if a signal handler is not a

[PATCH] D33722: [clang-tidy] Add checker for undelegated copy of base classes

2017-05-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:83 + + Finds copy constructors where the ctor don't call the constructor of the base class. + I think will be good idea to replace ctor with constructor. Or re-phrase sentence to avoid

[PATCH] D33722: [clang-tidy] Add checker for undelegated copy of base classes

2017-05-31 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/misc-undelegated-copy-of-base-classes.rst:29 + +The checker suggests a FixItHint in every scenario including multiple +missing

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/utils/ExprToStr.cpp:23 + SM.getCharacterData(TE) - SM.getCharacterData(B)); +} +} // namespace utils Please add empty line. Comment at:

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-05-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Comment at: docs/clang-tidy/checks/misc-exception-escape.rst:7 +Finds functions which should not throw exceptions: ++ Destructors ++ Copy constructors I

<    4   5   6   7   8   9   10   >