Re: [PATCH] D17811: [clang-tidy] Add check to detect dangling references in value handlers.

2016-03-10 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you for one more awesome check! Comment at: clang-tidy/misc/DanglingHandleCheck.cpp:25 @@ +24,3 @@ +std::vector parseClasses(StringRef Option) { + SmallVector Class

Re: [PATCH] D17482: [clang-tidy] Allow tests to verify changes made to header files

2016-03-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for leaving this without attention for a while. I'm somewhat concerned about this change. It's adding a certain level of complexity, but doesn't cover some less trivial cases like handling of multiple headers. Can you take a look at existing tests and say how many

Re: [PATCH] D16529: [clang-tidy] Add modernize-raw-string-literal check

2016-03-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Looks mostly good, a few nits. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:82 @@ +81,3 @@ +? std::string{R"lit()")lit"} +: (")" + Delimiter + R"(")")) != StringRef::npos; +} L

Re: [PATCH] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. If this issue is specific to MS inline asm, then the additional dependencies should only be added, when we care about MS inline asm (windows builds only?). http://reviews.llvm.org/D17981 ___ cfe-commits mailing list cfe-comm

Re: [PATCH] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Also, should we do this for all Clang tools? http://reviews.llvm.org/D17981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-03-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. > + {"iso646.h", "ciso646"}, > Just delete #includes of this one. does nothing. > + {"stdalign.h", "cstdalign"}, > + {"stdbool.h", "cstdbool"}, > We should just delete these two includes. These headers do nothing in C++. These don't seem to be addressed. Can yo

Re: [PATCH] D17958: [clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in other macros.

2016-03-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Adding Benjamin as a reviewer, since I'm on vacation. Repository: rL LLVM http://reviews.llvm.org/D17958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-03-11 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D17990#373177, @omtcyf0 wrote: > @alexfh, why? I've deleted these headers both from sources and from testset, > didn't I? I think, you misunderstood Richard's comment. The check should remove includes of these three headers from the code, sin

Re: [PATCH] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-11 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D17981#373153, @rnk wrote: > In http://reviews.llvm.org/D17981#372823, @alexfh wrote: > > > If this issue is specific to MS inline asm, then the additional > > dependencies should only be added, when we care about MS inline asm > > (windows bui

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-15 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please always add 'cfe-commits' to Subscribers when you send a patch for review (I've added it now). Substantial comments later. http://reviews.llvm.org/D18149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-15 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the patch! Looks mostly good, a few style nits. Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.cpp:21 @@ -20,2 +20,3 @@ using namespace ::clang::ast_matchers; +using clang::tidy::decl_ref_expr_utils::isOnlyUsedAsConst; -

Re: [PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

2016-03-18 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. Richard, can you review this? http://reviews.llvm.org/D15031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-03-18 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:59 @@ +58,3 @@ +{"float.h", "cfloat"}, +{"inttypes.h", "cinttypes"}, +{"limits.h", "climits"}, According to http://www.cplusplus.com/refer

Re: [PATCH] D18263: [clang-tools-extra] Add release notes documentation

2016-03-18 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with one comment. Thank you, Richard! Comment at: docs/ReleaseNotes.rst:29 @@ +28,3 @@ +For more information about Clang or LLVM, including information about +the l

Re: [PATCH] D18262: [clang-tidy] Skip reporting of not applicable fixes.

2016-03-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you, Etienne! Please add a regression test. Comment at: ClangTidy.cpp:144 @@ -138,1 +143,3 @@ + +Diag << FixItHint::CreateReplacement(Range, Fix.getReplacementText()); ++TotalFixes; aaron.ballman wrote: > Is

Re: [PATCH] D18263: [clang-tools-extra] Add release notes documentation

2016-03-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Looks good with one comment. Thank you, Richard! Comment at: docs/clang-tidy/checks/list.rst:91 @@ -90,2 +90,3 @@ performance-implicit-cast-in-loop + performance-unnecessary-copy-initialization.rst readability-braces-around-statements --

Re: [PATCH] D17986: [ASTMatchers] New matcher hasReturnValue added

2016-03-22 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264037: [ASTMatchers] New matcher hasReturnValue added (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D17986?vs=51259&id=51266#toc Repository: rL LLVM http://reviews.llvm.org

r264037 - [ASTMatchers] New matcher hasReturnValue added

2016-03-22 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Mar 22 06:03:03 2016 New Revision: 264037 URL: http://llvm.org/viewvc/llvm-project?rev=264037&view=rev Log: [ASTMatchers] New matcher hasReturnValue added Summary: A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has"

Re: [PATCH] D18243: [ASTMatchers] Existing matcher hasAnyArgument fixed

2016-03-22 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. > the fix must be emphasized in the release notes It seems like the best time to update the release notes is now, in this patch ;) http://reviews.llvm.org/D18243 ___ cfe-commits mailing

Re: [PATCH] D17987: [clang-tidy] Extension of checker misc-misplaced-widening-cast

2016-03-22 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp:64 @@ -63,3 +63,3 @@ // bool. - !match(findAll(callExpr(hasAnyArgument(DeclRef))), *If, *Result.Context) + !match(findAll(callExpr(hasAnyArgument(ignoringParenImpCast

Re: [PATCH] D17811: [clang-tidy] Add check to detect dangling references in value handlers.

2016-03-22 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D17811#380124, @jbcoe wrote: > Do you have commit access? I can apply this patch for you if not. He does have commit access. http://reviews.llvm.org/D17811 ___ cfe-commits mailing list cfe-commit

Re: [PATCH] D18262: [clang-tidy] Skip reporting of not applicable fixes.

2016-03-22 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Thanks for the fix! http://reviews.llvm.org/D18262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18293: [clang-tidy] Fix redundant-string-init check with msvc 14 headers.

2016-03-22 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG http://reviews.llvm.org/D18293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-22 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.cpp:21 @@ +20,3 @@ + +void recordFixes(const VarDecl &Var, ASTContext &Context, + DiagnosticBuilder &Diagnostic) { nit: Alt

Re: [PATCH] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-22 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Adding Manuel, who might have better ideas. In http://reviews.llvm.org/D17981#374904, @rnk wrote: > In http://reviews.llvm.org/D17981#374553, @etienneb wrote: > > > This is a huge difference. I didn't expect dependencies to bring so much > > code. > > I'm not a fan of h

Re: [PATCH] D18275: [ASTMatchers] Add own version of VariadicFunction.

2016-03-22 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:80 @@ +79,3 @@ + ResultT operator()(ArrayRef Args) const { +std::vector InnerArgs; +for (const ArgT &Ar

r264158 - Use an enum instead of hardcoded indices. NFC.

2016-03-23 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Mar 23 09:28:52 2016 New Revision: 264158 URL: http://llvm.org/viewvc/llvm-project?rev=264158&view=rev Log: Use an enum instead of hardcoded indices. NFC. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL: http://llvm.org/viewvc

[PATCH] D18395: -Wshadow: don't warn on ctor parameters with the same name as a field name

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh created this revision. alexfh added reviewers: rsmith, rnk. alexfh added a subscriber: cfe-commits. -Wshadow: don't warn on ctor parameters with the same name as a field name. This fixes a broad class of false positives resulting from a widely used pattern: struct A { int q; A(in

Re: [PATCH] D18395: -Wshadow: don't warn on ctor parameters with the same name as a field name

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Hm, didn't notice Reid's http://reviews.llvm.org/D18271, which seems to cover this in a better way. http://reviews.llvm.org/D18395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

Re: [PATCH] D18396: Clang-tidy:modernize-use-override. Fix for __declspec attributes and const=0 without spacse

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the patch! Looks good in general. A few nits. Comment at: clang-tidy/modernize/UseOverrideCheck.cpp:125 @@ -124,1 +124,3 @@ + if (T.is(tok::kw___attribute) && + !(Sources.isBeforeInTranslationUnit(T.getLocation(), MethodLoc))

Re: [PATCH] D18243: [ASTMatchers] Existing matcher hasAnyArgument fixed

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/ReleaseNotes.rst:123 @@ +122,3 @@ +- hasAnyArgument: Matcher no longer ignores parentheses and implicit casts on + the argument before applying the inner matcher. The fix was done allow for + greater control by the user. In all exis

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. As a data point: I ran -Wshadow on our code base with a similar, but simpler patch (http://reviews.llvm.org/D18395, just disables the warning on ctor parameters named after fields). It removes more than half of the hits (from ~100k init

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D18271#381728, @alexfh wrote: > ... and then gradually adding back the cases that seem to be important to > flag ... Maybe as separate warnings. http://reviews.llvm.org/D18271 ___ cfe-commits ma

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D18271#378196, @dblaikie wrote: > It's not just modifications of shadowed variables that are a problem - one of > the one's I'm concerned we should catch is: > > struct foo { > std::unique_ptr p; > foo(std::unique_ptr p) : p(std::move(

Re: [PATCH] D18275: [ASTMatchers] Add own version of VariadicFunction.

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Still LG. Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:82 @@ +81,3 @@ + ResultT operator()(ArrayRef Args) const { +SmallVector InnerArgs; +for (const ArgT &Arg : Args) > On the other hand, constructing the matchers

Re: [PATCH] D18264: [clang-tidy] misc-assign-operator-signature checker checks return value of all assign operators

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D18264#381846, @baloghadamsoftware wrote: > Oh, I was searching in the C++ Core Guidlines, but at the wrong place because > I did not find it. So I will change this option to be enabled by default. DSL > users who do not follow this rule for th

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/RedundantStringCStrCheck.cpp:92 @@ -91,3 +91,3 @@ argumentCountIs(1), - hasDeclaration(cxxMethodDecl(hasName(StringConstructor, + hasDeclaration(cxxMethodDecl(matchesName(StringConstr

Re: [PATCH] D16962: clang-tidy: avoid std::bind

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/AvoidStdBindCheck.cpp:46 @@ +45,3 @@ +BindArgument B; +if (const auto * M = dyn_cast(E)) { + const auto * TE = M->GetTemporaryExpr(); In LLVM style this should be `const auto *M`. Please

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D18271#382082, @rnk wrote: > In http://reviews.llvm.org/D18271#381769, @rsmith wrote: > > > I think a reasonable approach would be: "do not warn on shadowing if the > > idiom of naming a constructor parameter after a class member is used, and >

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. > Depending on how strictly you define "initialized" here, this is either > unhelpful or difficult to chpatterneck. s/chpatterneck/check/ http://reviews.llvm.org/D18271 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

Re: [PATCH] D18264: [clang-tidy] misc-assign-operator-signature checker checks return value of all assign operators

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Tell me if you need someone to commit the patch for you. http://reviews.llvm.org/D18264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

Re: [PATCH] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D17981#382213, @etienneb wrote: > In http://reviews.llvm.org/D17981#380350, @alexfh wrote: > > > Adding Manuel, who might have better ideas. > ... and who is unavailable for the next couple of weeks, unfortunately. To unblock you, I'd suggest

Re: [PATCH] D18408: readability check for const params in declarations

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Looks good in general. A few nits. Comment at: clang-tidy/readability/AvoidConstParamsInDecls.cpp:22 @@ +21,3 @@ + +SourceRange GetTypeRange(const ParmVarDecl &Param) { + if (Param.getIdentifier() != nullptr) "Function names ... should b

Re: [PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good! Thank you! Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:26 @@ +25,3 @@ + return (Name.empty() ? llvm::Twine('#') + llvm::Twine(Index + 1) +

Re: [PATCH] D18274: [clang-tidy] Add boost module

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. I would add the module together with the first check in it, since an empty module doesn't make sense. http://reviews.llvm.org/D18274 _

Re: [PATCH] D17987: [clang-tidy] Extension of checker misc-misplaced-widening-cast

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MisplacedWideningCastCheck.cpp:116 @@ +115,3 @@ + + if (RelativeIntSizes.find(First) != RelativeIntSizes.end() && + RelativeIntSizes.find(Second) != RelativeIntSizes.end()) { This code shouldn't repea

Re: [PATCH] D17926: [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace.

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/UnusedParametersCheck.cpp:67 @@ -66,3 +66,3 @@ auto UsedByRef = [&] { return !ast_matchers::match( decl(hasDescendant( It looks like the two-parameter ast_matchers::match function w

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/RedundantStringCStrCheck.cpp:103 @@ +102,3 @@ +callee(memberExpr().bind("member")), +callee(cxxMethodDecl(matchesName(StringCStrMethod + .bind("call"); ---

Re: [PATCH] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. OK, if you're not blocked on this, let's just wait then. http://reviews.llvm.org/D17981 ___ cfe-commits mailing list cfe-commits@lists.

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-24 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG now. Thanks! http://reviews.llvm.org/D18412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

Re: [PATCH] D17811: [clang-tidy] Add check to detect dangling references in value handlers.

2016-03-26 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Still LG. Thank you! http://reviews.llvm.org/D17811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D10021: Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Checkers

2015-12-28 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256491: Refactor: Simplify boolean conditional return statements in… (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D10021?vs=38311&id=43677#toc Repository: rL LLVM http://re

Re: [PATCH] D15737: [clang-tidy] Preserve comments and preprocessor directives when simplifying boolean expressions

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. > Do you need me to commit the patch for you? Assuming "yes", since I don't recall any patches committed by you. Actually, it might be a good idea for you to request commit access at this point. http://reviews.llvm.org/D15737

Re: [PATCH] D15737: [clang-tidy] Preserve comments and preprocessor directives when simplifying boolean expressions

2015-12-28 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256492: [clang-tidy] Preserve comments and preprocessor directives when simplifying… (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D15737?vs=43647&id=43678#toc Repository: rL

[clang-tools-extra] r256492 - [clang-tidy] Preserve comments and preprocessor directives when simplifying boolean expressions

2015-12-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Dec 28 07:21:22 2015 New Revision: 256492 URL: http://llvm.org/viewvc/llvm-project?rev=256492&view=rev Log: [clang-tidy] Preserve comments and preprocessor directives when simplifying boolean expressions This changeset still emits the diagnostic that the expression could

Re: [PATCH] D15121: A new clang-tidy module to find calls to `std::swap`, and change them to use ADL

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. Found this accidentally, since I don't read all of cfe-commits normally. Would be nice if you could add me to reviewers on clang-tidy-related patches. Thanks! In http://reviews.llvm.org/D15121#300837, @dblaikie wrote: > (tangential: Sho

Re: [PATCH] D10016: Refactor: Simplify boolean conditional return statements in lib/Frontend

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh accepted this revision. alexfh added a reviewer: alexfh. alexfh added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D10016 ___ cfe-commits mailing list cfe-commits@li

Re: [PATCH] D10023: Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh accepted this revision. alexfh added a reviewer: alexfh. alexfh added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D10023 ___ cfe-commits mailing list cfe-commits@li

r256496 - Refactor: Simplify boolean conditional return statements in lib/Frontend

2015-12-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Dec 28 09:15:16 2015 New Revision: 256496 URL: http://llvm.org/viewvc/llvm-project?rev=256496&view=rev Log: Refactor: Simplify boolean conditional return statements in lib/Frontend Summary: Use clang-tidy to simplify boolean conditional return statements Reviewers: alexf

Re: [PATCH] D10024: Refactor: Simplify boolean conditional return statements in tools/libclang

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh accepted this revision. alexfh added a reviewer: alexfh. alexfh added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D10024 ___ cfe-commits mailing list cfe-commits@li

Re: [PATCH] D10023: Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend

2015-12-28 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256497: Refactor: Simplify boolean conditional return statements in… (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D10023?vs=38312&id=43689#toc Repository: rL LLVM http://re

r256497 - Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend

2015-12-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Dec 28 09:19:39 2015 New Revision: 256497 URL: http://llvm.org/viewvc/llvm-project?rev=256497&view=rev Log: Refactor: Simplify boolean conditional return statements in lib/StaticAnalyzer/Frontend Summary: Use clang-tidy to simplify boolean conditional return statements

Re: [PATCH] D10016: Refactor: Simplify boolean conditional return statements in lib/Frontend

2015-12-28 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256496: Refactor: Simplify boolean conditional return statements in lib/Frontend (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D10016?vs=38309&id=43687#toc Repository: rL LLV

r256498 - Refactor: Simplify boolean conditional return statements in tools/libclang

2015-12-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Dec 28 09:24:08 2015 New Revision: 256498 URL: http://llvm.org/viewvc/llvm-project?rev=256498&view=rev Log: Refactor: Simplify boolean conditional return statements in tools/libclang Summary: Use clang-tidy to simplify boolean conditional return statements. Reviewers: al

Re: [PATCH] D10024: Refactor: Simplify boolean conditional return statements in tools/libclang

2015-12-28 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256498: Refactor: Simplify boolean conditional return statements in tools/libclang (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D10024?vs=38315&id=43691#toc Repository: rL L

Re: [PATCH] D10019: Refactor: Simplify boolean conditional return statements in lib/Sema

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. David, have your comments been addressed completely? http://reviews.llvm.org/D10019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

r256499 - Refactor: Simplify boolean conditional return statements in lib/Lex

2015-12-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Dec 28 09:30:42 2015 New Revision: 256499 URL: http://llvm.org/viewvc/llvm-project?rev=256499&view=rev Log: Refactor: Simplify boolean conditional return statements in lib/Lex Summary: Use clang-tidy to simplify boolean conditional return statements Reviewers: dblaikie

Re: [PATCH] D10017: Refactor: Simplify boolean conditional return statements in lib/Lex

2015-12-28 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256499: Refactor: Simplify boolean conditional return statements in lib/Lex (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D10017?vs=38322&id=43693#toc Repository: rL LLVM ht

Re: [PATCH] D10011: Refactor: Simplify boolean conditional return statements in lib/Basic

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. alexfh added a comment. The patch doesn't apply cleanly. You need to rebase it again. http://reviews.llvm.org/D10011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [PATCH] D15797: [clang-tidy] Fix readability-braces-around-statements assert failure

2015-12-28 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please add a test that crashes without the patch and passes with it. Repository: rL LLVM http://reviews.llvm.org/D15797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

Re: [PATCH] D15803: [clang-tidy] Don't generate duplicated blank line in add_new_check.py script.

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. I'll submit the patch for you. Repository: rL LLVM http://reviews.llvm.org/D15803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r256554 - [clang-tidy] Don't generate duplicated blank line in add_new_check.py script.

2015-12-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 29 05:05:35 2015 New Revision: 256554 URL: http://llvm.org/viewvc/llvm-project?rev=256554&view=rev Log: [clang-tidy] Don't generate duplicated blank line in add_new_check.py script. Reviewers: alexfh Subscribers: cfe-commits Patch by Haojian Wu! Differential Revisi

Re: [PATCH] D15803: [clang-tidy] Don't generate duplicated blank line in add_new_check.py script.

2015-12-29 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256554: [clang-tidy] Don't generate duplicated blank line in add_new_check.py script. (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D15803?vs=43717&id=43728#toc Repository: r

Re: [clang-tools-extra] r256517 - Orphaning these RST files; each one is retained only for link backwards compatibility.

2015-12-29 Thread Alexander Kornienko via cfe-commits
Nice! Didn't know about this feature. On Mon, Dec 28, 2015 at 8:59 PM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: aaronballman > Date: Mon Dec 28 13:59:15 2015 > New Revision: 256517 > > URL: http://llvm.org/viewvc/llvm-project?rev=256517&view=rev > Log: > Orphan

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/google/DefinitionsInHeadersCheck.cpp:52 @@ +51,3 @@ +// Inline function is allowed. +if (funDecl->isInlined()) + return; hokein wrote: > alexfh wrote: > > This check can be done in the matcher. > Th

Re: [PATCH] D15623: Add UnnecessaryCopyInitialization check to new "performance" module in ClangTidy

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for working on this! A few minor comments. Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.cpp:21 @@ +20,3 @@ +namespace { +AST_MATCHER(VarDecl, isLocalVarDecl) { return Node.isLocalVarDecl(); } +AST_MATCHER(QualType, isPointer

Re: [PATCH] D15805: [clang-tidy] Cleanup code in CERT module.

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D15805#317629, @hokein wrote: > I'm wondering whether should we rename `CERT` to `cert` to keep the same > with other modules like misc and google. SGTM. Aaron, do you see any reasons not to do this? Repository: rL LLVM http://reviews.ll

[clang-tools-extra] r256559 - [clang-tidy] Fix capitalization of the message in the example

2015-12-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 29 07:28:10 2015 New Revision: 256559 URL: http://llvm.org/viewvc/llvm-project?rev=256559&view=rev Log: [clang-tidy] Fix capitalization of the message in the example Modified: clang-tools-extra/trunk/docs/clang-tidy/index.rst Modified: clang-tools-extra/trunk/doc

Re: [PATCH] D15796: [PATCH] clang-tidy documentation redirects

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/cert-dcl54-cpp.rst:5 @@ +4,2 @@ +.. meta:: + :http-equiv=refresh: 0;URL=misc-new-delete-overloads.html Since this is not a deprecated/obsolete file, it might be a good idea to also add a textual r

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:23 @@ +22,3 @@ +bool inHeaderFile(const SourceManager *SM, SourceLocation Location) { + StringRef Filename = SM->getFilename(SM->getExpansionLoc(Location)); + return Filename.endswith(".h") |

Re: [PATCH] D15796: [PATCH] clang-tidy documentation redirects

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/cert-dcl54-cpp.rst:5 @@ +4,2 @@ +.. meta:: + :http-equiv=refresh: 0;URL=misc-new-delete-overloads.html aaron.ballman wrote: > alexfh wrote: > > Since this is not a deprecated/obsolete file, it migh

Re: [PATCH] D15796: [PATCH] clang-tidy documentation redirects

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/cert-dcl54-cpp.rst:5 @@ +4,2 @@ +.. meta:: + :http-equiv=refresh: 0;URL=misc-new-delete-overloads.html alexfh wrote: > aaron.ballman wrote: > > alexfh wrote: > > > Since this is not a deprecated/ob

[clang-tools-extra] r256562 - [clang-tidy] Fix a use-after-free bug found by asan

2015-12-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 29 10:14:38 2015 New Revision: 256562 URL: http://llvm.org/viewvc/llvm-project?rev=256562&view=rev Log: [clang-tidy] Fix a use-after-free bug found by asan Modified: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp Modified: clang-tool

Re: [PATCH] D15796: [PATCH] clang-tidy documentation redirects

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/cert-dcl54-cpp.rst:5 @@ +4,2 @@ +.. meta:: + :http-equiv=refresh: 0;URL=misc-new-delete-overloads.html aaron.ballman wrote: > alexfh wrote: > > alexfh wrote: > > > aaron.ballman wrote: > > > > alex

Re: [clang-tools-extra] r256562 - [clang-tidy] Fix a use-after-free bug found by asan

2015-12-29 Thread Alexander Kornienko via cfe-commits
On Tue, Dec 29, 2015 at 5:22 PM, Benjamin Kramer wrote: > On Tue, Dec 29, 2015 at 5:14 PM, Alexander Kornienko via cfe-commits > wrote: > > Author: alexfh > > Date: Tue Dec 29 10:14:38 2015 > > New Revision: 256562 > > > > URL: http://llvm.org/viewvc/llvm

Re: [PATCH] D15805: [clang-tidy] Cleanup code in CERT module.

2015-12-29 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D15805#317657, @aaron.ballman wrote: > Fine by me -- I went with CERT since it's an acronym, but we don't do this > for LLVM, so this change makes sense. Thanks! AFAIU, LLVM is not an acronym anymore ;) (but still an upper-case spelling is th

Re: [PATCH] D15797: [clang-tidy] Fix readability-braces-around-statements assert failure

2015-12-30 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D15797#317793, @mattsta wrote: > It's difficult to track down *why* the invalid locations are happening > because by the time we get to an invalid location, all source location > information is lost. The best I've been able to come up with is

Re: [PATCH] D15623: Add UnnecessaryCopyInitialization check to new "performance" module in ClangTidy

2015-12-30 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good! I'll commit the patch for you. http://reviews.llvm.org/D15623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

Re: [PATCH] D15623: Add UnnecessaryCopyInitialization check to new "performance" module in ClangTidy

2015-12-30 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256632: [clang-tidy] Add UnnecessaryCopyInitialization check to new "performance"… (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D15623?vs=43743&id=43776#toc Repository: rL L

[clang-tools-extra] r256632 - [clang-tidy] Add UnnecessaryCopyInitialization check to new "performance" module in ClangTidy

2015-12-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Dec 30 04:24:40 2015 New Revision: 256632 URL: http://llvm.org/viewvc/llvm-project?rev=256632&view=rev Log: [clang-tidy] Add UnnecessaryCopyInitialization check to new "performance" module in ClangTidy Summary: The patch adds a new ClangTidy check that detects when expen

[clang-tools-extra] r256633 - [clang-tidy] Fix configure build

2015-12-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Dec 30 04:44:08 2015 New Revision: 256633 URL: http://llvm.org/viewvc/llvm-project?rev=256633&view=rev Log: [clang-tidy] Fix configure build Modified: clang-tools-extra/trunk/clang-tidy/tool/Makefile Modified: clang-tools-extra/trunk/clang-tidy/tool/Makefile URL: ht

[clang-tools-extra] r256634 - [clang-tidy] Add the missing Makefile

2015-12-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Dec 30 04:56:00 2015 New Revision: 256634 URL: http://llvm.org/viewvc/llvm-project?rev=256634&view=rev Log: [clang-tidy] Add the missing Makefile Added: clang-tools-extra/trunk/clang-tidy/performance/Makefile Added: clang-tools-extra/trunk/clang-tidy/performance/Make

[clang-tools-extra] r256636 - [clang-tidy] Use hasLocalStorage() to identify unnecessary copy initializations to exclude static local variables.

2015-12-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Dec 30 05:35:50 2015 New Revision: 256636 URL: http://llvm.org/viewvc/llvm-project?rev=256636&view=rev Log: [clang-tidy] Use hasLocalStorage() to identify unnecessary copy initializations to exclude static local variables. Summary: Since local static variables can outliv

[clang-tools-extra] r256637 - [clang-tidy] Don't use delegating constructors

2015-12-30 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Dec 30 05:39:30 2015 New Revision: 256637 URL: http://llvm.org/viewvc/llvm-project?rev=256637&view=rev Log: [clang-tidy] Don't use delegating constructors Modified: clang-tools-extra/trunk/clang-tidy/performance/UnnecessaryCopyInitialization.h Modified: clang-tools

Re: [PATCH] D15823: Support virtual-near-miss check.

2015-12-30 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for working on this! See the initial set of comments inline. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:21 @@ +20,3 @@ + +int VirtualNearMissCheck::editDistance(const std::string &SourceStr, +con

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-01 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:85 @@ +84,3 @@ + }else { +return false; + } congliu wrote: > alexfh wrote: > > What if both return types are not references and are not pointers? Why do > > you return `false

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-04 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:24 @@ +23,3 @@ + .bind("name-decl"), + this); +} We're looking at the problem from different angles. My view is that a reasonable file naming convention (wh

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-04 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:25 @@ +24,3 @@ + SourceLocation ExpansionLoc = SM.getExpansionLoc(Node.getLocStart()); + StringRef Filename = SM.getFilename(ExpansionLoc); + return Filename.endswith(".h") || Filename.endsw

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-04 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:25 @@ +24,3 @@ + SourceLocation ExpansionLoc = SM.getExpansionLoc(Node.getLocStart()); + StringRef Filename = SM.getFilename(ExpansionLoc); + return Filename.endswith(".h") || Filename.endsw

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-04 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:25 @@ +24,3 @@ + SourceLocation ExpansionLoc = SM.getExpansionLoc(Node.getLocStart()); + StringRef Filename = SM.getFilename(ExpansionLoc); + return Filename.endswith(".h") || Filename.endsw

<    11   12   13   14   15   16   17   18   19   20   >