[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-24 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:204 + CheckerContext ) const { + const auto *ThisExpr = COCE->getArg(0); + baloghadamsoftware wrote: > NoQ

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-21 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: test/Analysis/Inputs/system-header-simulator-for-iterators.h:62 + ForwardIterator2 first2, ForwardIterator2 last2); +} Maybe we should merge this file with the

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-18 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 78527. baloghadamsoftware added a comment. Test updated to include test case where system headers are inlined. https://reviews.llvm.org/D25660 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td

[PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2016-11-17 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. DO I have to apply your path over patch and update the diff? https://reviews.llvm.org/D22374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-17 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked 2 inline comments as done. baloghadamsoftware added a comment. In https://reviews.llvm.org/D25660#590778, @NoQ wrote: > - Agree on the `evalAssume()` implementation (i'm still not quite > understanding what the problem is here, see the new inline comments); I think

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-17 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked 10 inline comments as done. baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:209 + CheckerContext ) const { + const auto *Func =

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-17 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 78352. baloghadamsoftware added a comment. Updated according to comments. https://reviews.llvm.org/D25660 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-10 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:204 + CheckerContext ) const { + const auto *ThisExpr = COCE->getArg(0); + NoQ wrote: > This code definitely

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-10 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:423 + +void IteratorPastEndChecker::handleComparison(CheckerContext , + const SVal , baloghadamsoftware

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-09 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:423 + +void IteratorPastEndChecker::handleComparison(CheckerContext , +

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-07 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 77033. baloghadamsoftware added a comment. Interim version, updated according to some of the comments. https://reviews.llvm.org/D25660 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-07 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:423 + +void IteratorPastEndChecker::handleComparison(CheckerContext , + const SVal , NoQ wrote: > a.sidorin

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-10-27 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: test/Analysis/iterator-past-end.cpp:3 + +template struct __iterator { + typedef __iterator iterator; NoQ wrote: > baloghadamsoftware wrote: > > NoQ wrote: > > > We should probably separate this

[PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2016-10-26 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D22374#575579, @NoQ wrote: > Ping!~ Did my idea sound completely wrong to you? :) > > Does https://reviews.llvm.org/D25660 depend on this patch? And/or did you > find another workaround? > > upd.: I also thought that this deserves

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-10-26 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:195 +auto Param = State->getLValue(P, LCtx); +auto Arg = State->getSVal(CE->getArg(idx++), LCtx->getParent()); +const auto *Pos = getIteratorPosition(State,

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-10-26 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 75875. baloghadamsoftware added a comment. Updated according to the comments. Also fixed a bug and moved access check to pre-call instead of post-call. https://reviews.llvm.org/D25660 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td

Re: [PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2016-08-05 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D22374#506098, @NoQ wrote: > I guess i could post a patch-over-a-patch if what i'm expressing isn't clear. I think this would be the best :-) https://reviews.llvm.org/D22374 ___

Re: [PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2016-08-04 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D22374#504855, @NoQ wrote: > Hmm. I suggest: > > 1. Change this test's constructor so that it was no longer almost-trivial. > Because it isn't significant for this test if the constructor is > almost-trivial or not. The test would

Re: [PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2016-08-03 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. I agree with you. Do I have to modify the checker (in a separate patch), or someone else can do it? I do not know how difficult it is to unpack the store of a LazyCompoundVal (it probably has to be done recursively). https://reviews.llvm.org/D22374

Re: [PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2016-07-26 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. Now I made a thorough check. Indeed, with the original version we get a warning because Other.y is not initialized. CheckerManager::runCheckersForBind() is called here during the default evaluation of the call. I tried to call the same function in

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-21 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware removed rL LLVM as the repository for this revision. baloghadamsoftware updated this revision to Diff 64864. baloghadamsoftware added a comment. Bug path string fixed. https://reviews.llvm.org/D19311 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-21 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. Thx, I checked the output, but I do not understand why a simple string concatenation fails in your test environment. It works on our build server (Linux) with the latest master trunk. Repository: rL LLVM https://reviews.llvm.org/D19311

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-19 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. Do I use an non-portable way to concatenate strings? "Assuming rhs == *this" becomes "0*this" for some strange reason. I tested it again with the latest master branch and all tests are passing like earlier. Repository: rL LLVM

Re: [PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2016-07-18 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: test/Analysis/ctor.mm:177 @@ -176,3 +176,3 @@ Inner(const Inner ) -: x(Other.x), y(Other.y) // expected-warning {{undefined}} +: x(Other.x), y(Other.y) // no-warning { a.sidorin

Re: [PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2016-07-15 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked 6 inline comments as done. baloghadamsoftware added a comment. https://reviews.llvm.org/D22374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2016-07-15 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 64149. baloghadamsoftware added a comment. Revised version based on comments. https://reviews.llvm.org/D22374 Files: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp test/Analysis/ctor.mm Index: test/Analysis/ctor.mm

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-15 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added a comment. https://reviews.llvm.org/D19311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-15 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 64135. baloghadamsoftware added a comment. Test updated. https://reviews.llvm.org/D19311 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-08 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. I added tests for move assignment operators, but I could not find out any other simple test case than memory leak. However memory leaks are currently only detected by Unix.malloc for malloc. So I tried to replace strdup with malloc, strlen and strcpy, but

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-08 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:452 @@ -444,5 +451,3 @@ // inlining when reanalyzing an already inlined function. - if (Visited.count(D)) { -assert(isa(D) && - "We are only reanalyzing

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-08 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 63207. baloghadamsoftware added a comment. Debug line removed. http://reviews.llvm.org/D19311 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-08 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked 3 inline comments as done. baloghadamsoftware added a comment. http://reviews.llvm.org/D19311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-08 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 63204. baloghadamsoftware added a comment. Issues fixed. http://reviews.llvm.org/D19311 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h

[PATCH] D20863: [analyzer] Fix for the strdup family in unix.malloc checker

2016-06-01 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added a reviewer: dcoughlin. baloghadamsoftware added subscribers: cfe-commits, xazax.hun, o.gyorgy. The strdup family was only partially handled in the original checker. As a consequence it did not recognize leaks where a variable

Re: [PATCH] D18265: [clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature

2016-04-28 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. I see this one is accepted, but the prerequisite is not reviewed yet (after the update). Without that this one should not be merged into the code because it will not compile. http://reviews.llvm.org/D18265 ___

Re: [PATCH] D18265: [clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature

2016-04-27 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:69 @@ +68,3 @@ +void UnconventionalAssignOperatorCheck::check(const MatchFinder::MatchResult ) { + if (const auto *RetStmt = Result.Nodes.getNodeAs("returnStmt")) { +

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-04-26 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 54968. baloghadamsoftware added a comment. Initial comments added to the checker and tests are converted from (DOS) to (Unix) format. http://reviews.llvm.org/D19311 Files: lib/StaticAnalyzer/Checkers/CMakeLists.txt

Re: [PATCH] D19357: [ASTMatchers] New matcher forFunction

2016-04-21 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. I will run it, once we are approaching the final version. This one is more of a question than a real patch. http://reviews.llvm.org/D19357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D18265: [clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature

2016-04-21 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware retitled this revision from "[clang-tidy] New: checker misc-assign-operator-return" to "[clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature". baloghadamsoftware updated this revision to Diff 54486. baloghadamsoftware added a

[PATCH] D19357: [ASTMatchers] New matcher forFunction

2016-04-21 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added a reviewer: sbenza. baloghadamsoftware added subscribers: cfe-commits, xazax.hun, o.gyorgy. Herald added a subscriber: klimek. Matcher proposed in the review of checker misc-assign-operator (name pending). Its goal is to find the

[PATCH] D19311: Self Assignment Checker

2016-04-20 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added a reviewer: dcoughlin. baloghadamsoftware added subscribers: cfe-commits, xazax.hun, o.gyorgy. This checker checks copy and move assignment operators whether they are protected against self-assignment. Since C++ core guidelines

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-13 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. misc-unconventional-assign-operator, misc-assign-operator-conventions, misc-non-idiomatic-assign-operator or something else then? http://reviews.llvm.org/D18265 ___ cfe-commits mailing list

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-13 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63 @@ +62,3 @@ + + Finder->addMatcher(returnStmt(IsBadReturnStatement, hasAncestor(IsGoodAssign)) + .bind("returnStmt"), sbenza wrote: >

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-06 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63 @@ +62,3 @@ + + Finder->addMatcher(returnStmt(IsBadReturnStatement, hasAncestor(IsGoodAssign)) + .bind("returnStmt"), sbenza wrote: >

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-05 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. And what about the final name? http://reviews.llvm.org/D18265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-05 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63 @@ +62,3 @@ + + Finder->addMatcher(returnStmt(IsBadReturnStatement, hasAncestor(IsGoodAssign)) + .bind("returnStmt"), sbenza wrote: > I

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-31 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. In http://reviews.llvm.org/D18265#387078, @LegalizeAdulthood wrote: > Please summarize this check in `docs/ReleaseNotes.rst`. OK, I will do it after the name is decided. http://reviews.llvm.org/D18265 ___

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-30 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. misc-unconventional-assign-operator? http://reviews.llvm.org/D18265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-30 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. Actually, there was nothing wrong with assign operator signatures per se either although the original name of the checker was AssignOperatorSignature. The only change here is that it does not check the signature only anymore, but also the body (if present).

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-30 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. Unchainable is not enough: the original checker (which was extended) also checks for parameters and other qualifiers such as const or virtual. http://reviews.llvm.org/D18265 ___ cfe-commits mailing list

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-30 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked an inline comment as done. Comment at: clang-tidy/misc/MiscTidyModule.cpp:54 @@ -55,1 +53,3 @@ +CheckFactories.registerCheck( +"misc-assign-operator"); CheckFactories.registerCheck( alexfh wrote: > Check names usually

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

2016-03-30 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. Are there any other comments please? http://reviews.llvm.org/D18243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-30 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked an inline comment as done. Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:75 @@ +74,3 @@ +static const char *const Messages[][2] = { +{"ReturnType", "operator=() should return '%0&'"}, +{"ArgumentType", "operator=() should take

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-29 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51906. baloghadamsoftware added a comment. Requested fixes done (not related to the changes). http://reviews.llvm.org/D18265 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/misc/AssignOperatorCheck.cpp

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-29 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. Thank you for your comments, but they are not related to my changes. These lines were present in the original file and I did not change them. http://reviews.llvm.org/D18265 ___ cfe-commits mailing list

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

2016-03-25 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked 9 inline comments as done. Comment at: clang-tidy/misc/MisplacedWideningCastCheck.cpp:117 @@ +116,3 @@ +static llvm::SmallDenseMap createRelativeCharSizesMap() { + llvm::SmallDenseMap Result(6); + Result[BuiltinType::UChar] = 1;

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

2016-03-25 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51633. baloghadamsoftware added a comment. Requested revision done. http://reviews.llvm.org/D17987 Files: clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp clang-tidy/misc/MisplacedWideningCastCheck.cpp

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-24 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51554. baloghadamsoftware added a comment. Merged into misc-assign-operator-signature and thus renamed to misc-assign-operator http://reviews.llvm.org/D18265 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

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

2016-03-24 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51521. baloghadamsoftware added a comment. Code reformatted using: clang-format -style="LLVM" http://reviews.llvm.org/D18264 Files: clang-tidy/misc/AssignOperatorSignatureCheck.cpp test/clang-tidy/misc-assign-operator-signature.cpp Index:

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

2016-03-24 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51520. baloghadamsoftware added a comment. Reverted to the original (accepted) version. http://reviews.llvm.org/D18264 Files: clang-tidy/misc/AssignOperatorSignatureCheck.cpp test/clang-tidy/misc-assign-operator-signature.cpp Index:

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

2016-03-23 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. 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 the non copy and non move assign operators can disable it.

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

2016-03-23 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51437. baloghadamsoftware added a comment. Release notes fixed. http://reviews.llvm.org/D18243 Files: docs/LibASTMatchersReference.html docs/ReleaseNotes.rst include/clang/ASTMatchers/ASTMatchers.h

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

2016-03-23 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51435. baloghadamsoftware added a comment. Check for non copy and move assign operators made optional. http://reviews.llvm.org/D18264 Files: clang-tidy/misc/AssignOperatorSignatureCheck.cpp clang-tidy/misc/AssignOperatorSignatureCheck.h

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

2016-03-23 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51418. baloghadamsoftware added a comment. Required fixes done. http://reviews.llvm.org/D17987 Files: clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp clang-tidy/misc/MisplacedWideningCastCheck.cpp

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

2016-03-22 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51287. baloghadamsoftware added a comment. Release notes updated. http://reviews.llvm.org/D18243 Files: docs/LibASTMatchersReference.html docs/ReleaseNotes.rst include/clang/ASTMatchers/ASTMatchers.h

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

2016-03-22 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. Prerequisites (matchers) are accepted now. http://reviews.llvm.org/D17987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-22 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. My first thought was also to extend existing checker misc-assign-operator-signature and rename it to just misc-assign-operator. However, there is little benefit doing this: the two checkers check different locations, one checks the signature while the other

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

2016-03-22 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51263. baloghadamsoftware added a comment. LibASTMatchersReference.html updated http://reviews.llvm.org/D18243 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h unittests/ASTMatchers/ASTMatchersTest.cpp

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

2016-03-22 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51259. baloghadamsoftware added a comment. LibASTMatchersReference.html regenerated http://reviews.llvm.org/D17986 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp

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

2016-03-21 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. I can rerun the script, however it seems it was not executed before the last commit on the master branch, thus if I rerun it then changes will appear in my diff which are not related to my work. What is the exect policy about running this scipt? Should it be

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

2016-03-21 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51167. http://reviews.llvm.org/D18243 Files: include/clang/ASTMatchers/ASTMatchers.h unittests/ASTMatchers/ASTMatchersTest.cpp Index: unittests/ASTMatchers/ASTMatchersTest.cpp

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

2016-03-21 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 51155. http://reviews.llvm.org/D17986 Files: include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/ASTMatchersTest.cpp Index: unittests/ASTMatchers/ASTMatchersTest.cpp

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

2016-03-20 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 50932. baloghadamsoftware added a comment. Previous patch generation failed. http://reviews.llvm.org/D17986 Files: include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/ASTMatchersTest.cpp

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

2016-03-19 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: alexfh, hokein. baloghadamsoftware added subscribers: cfe-commits, xazax.hun. The return value of every assign operator should be Type&, not only for copy and move assign operators. This check and its test was

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

2016-03-19 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware retitled this revision from "[ASTMatchers] Existing matcher hasAnyArgument fixed and new matcher hasReturnValue added" to "[ASTMatchers] New matcher hasReturnValue added". baloghadamsoftware updated the summary for this revision. baloghadamsoftware updated this revision to

[PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-19 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: alexfh, hokein. baloghadamsoftware added subscribers: cfe-commits, xazax.hun. Finds return statements in assign operator bodies where the return value is different from '*this'. Only assignment operators with correct

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

2016-03-18 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: klimek, sbenza. baloghadamsoftware added subscribers: cfe-commits, xazax.hun. Herald added a subscriber: klimek. A checker (will be uploaded after this patch) needs to check implicit casts. The checker needs matcher

Re: [PATCH] D17986: [ASTMatchers] Existing matcher hasAnyArgument fixed and new matcher hasReturnValue added

2016-03-11 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. In http://reviews.llvm.org/D17986#373134, @sbenza wrote: > The reason we haven't fixed hasAnyArgument is that it can potentially break > its users. > I'd prefer if you separated the fix from the addition. > That way we can revert the fix if needed. I will

[PATCH] D17986: [ASTMatchers] Existing matcher hasAnyArgument fixed and new matcher hasReturnValue added

2016-03-09 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added a reviewer: klimek. baloghadamsoftware added a subscriber: cfe-commits. Herald added a subscriber: klimek. A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has" ignores

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

2016-03-09 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added a reviewer: alexfh. baloghadamsoftware added a subscriber: cfe-commits. Existing checker misc-misplaced-widening-cast was extended: - New use cases: casted expression as lhs or rhs of a logical comparison or function argument -