[PATCH] D47155: [analyzer] Reduce simplifySVal complexity threshold further.

2018-05-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Hello! Thank you for addressing this problem. Are these kinds of symbols common in real code? For me it seems very artificial. However, I agree with George, it would be better to have this value as an analyzer option with a default value (of 20). Repository

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Can we continue the discussion here, please? We should involve Devin and/or George as well if we cannot agree ourselves. https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2018-05-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: test/clang-tidy/bugprone-exception-escape.cpp:178 +void indirect_implicit() noexcept { + // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: function 'indirect_implicit' throws + implicit_int_thrower(); lebedev.ri

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 148804. baloghadamsoftware added a comment. I still disagree, but I want the review to continue so I did the requested modifications. https://reviews.llvm.org/D35110 Files: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp lib/StaticAnalyze

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-09-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 116662. baloghadamsoftware added a comment. If both sides have concrete integers, they must be in range [min/4..max/4], if only one, it must be in range [min/2..max/2]. https://reviews.llvm.org/D35109 Files: lib/StaticAnalyzer/Core/SimpleSValB

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-10-06 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. It seems that Artem's suggestion is not enough (or I misunderstood it). So two options remain: either we drop this and revert to the local solution in the Iterator Checkers or we extend the type when rearranging the comparison. Which way to go? https://revi

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

2017-10-06 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I think that the acceptable false positive rate of a compiler warning is much lower than that of a Tidy check. So I understand that the fronted patch will not handle the indirect cases (which are the most important in my opinion) or the cases where there are

[PATCH] D34508: [Analyzer] Bug Reporter Visitor to Display Values of Variables - PRELIMINARY!

2017-10-06 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I am considering to restrict the assumptions to nodes marked as interesting and to the location of the bug. However, I have difficulties with the latter, it seems that the bug location itself is not part of the bug path. https://reviews.llvm.org/D34508 __

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-10-11 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I tried to extend the type to avoid overflow scenarios. Unfortunately, this breaks essential calculations based on the overflow scenarios (e.g. ProgramSate::assumeInbound()). So I see no other option than to abandon this patch and return to the local solution

[PATCH] D39048: Dump signed integers in SymIntExpr and IntSymExpr correctly

2017-10-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. When dumping SymIntExpr or IntSymExpr signed numbers are dumped as unsigned, thus their two's complement is displayed. This small patch fixes this. https://reviews.llvm.org/D39048 Files: lib/StaticAnalyzer/Core/SymbolManager.cpp test/Analysis/expr-

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-10-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 119576. baloghadamsoftware added a comment. Herald added a subscriber: szepet. I think it is the final attempt. If Symbols are different, the type is extended, so we store a correct (but extended) range. However, if the Symbols are the same, we do

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

2017-10-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. Herald added subscribers: mgorny, srhines. A possible error is to write ``malloc(strlen(s+1))`` instead of ``malloc(strlen(s)+1)``. Unfortunately the former is also valid syntactically, but allocates less memory by two bytes (if ``s`` is at least one cha

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

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 120214. baloghadamsoftware added a comment. Updated according to comments. https://reviews.llvm.org/D39121 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/MisplacedOperatorInStrlenInA

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

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 5 inline comments as done. baloghadamsoftware added inline comments. Comment at: clang-tidy/misc/MisplacedOperatorInStrlenInAllocCheck.cpp:30 + Finder->addMatcher( + callExpr(callee(functionDecl(hasName("malloc"))), + hasArgument(0, a

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

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 4 inline comments as done. baloghadamsoftware added a comment. In https://reviews.llvm.org/D39121#902728, @alexfh wrote: > Apart from all other comments, I think, this check would better be placed > under bugprone/. I moved it there. https://reviews.llvm.org/D39121

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

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D39121#902121, @martong wrote: > Consider the use of a function pointer: > > void* malloc(int); > int strlen(char*); > auto fp = malloc; > void bad_malloc(char *str) { char *c = (char *)fp(strlen(str + 1)); } > > > I think, t

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

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D39121#902145, @Eugene.Zelenko wrote: > Same mistake could be made with new[] operator. Yes! However, it seems that I need a new matcher for it so I would do it in a follow-up patch. https://reviews.llvm.org/D39121 _

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-08-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Of course we would like to try the Z3 for refutation, we do not dispute its usefulness. This patch is about something really different. It extends the range-based constraint manager in a very natural way. Is the code of the range-based constraint manager froz

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-08-28 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340805: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy)… (authored by baloghadamsoftware, committed by ). Repository: rC Clang https://reviews.llvm.org/D32747 Files: inclu

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-08-29 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Disabled? No, that was a different thing. I have some ideas there as well, how to solve it, but it was the rearrangement in the `SValBuilder`. This one is one level lower, the `ConstraintManager` which only calculate the range for a symbol where we have and a

[PATCH] D32845: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function parameters

2018-08-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 163517. baloghadamsoftware removed a reviewer: george.karpenkov. baloghadamsoftware added a comment. Herald added a reviewer: george.karpenkov. Since https://reviews.llvm.org/rL338263 fixed a bug in the cleanup phase the tests for mismatched iterat

[PATCH] D32845: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function parameters

2018-09-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 163671. baloghadamsoftware added a comment. Minor changes. https://reviews.llvm.org/D32845 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/Inputs/system-header-simulator

[PATCH] D32845: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function parameters

2018-09-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 3 inline comments as done. baloghadamsoftware added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:317 +def MismatchedIteratorChecker : Checker<"MismatchedIterator">, + HelpText<"Check for use of iterators of different

[PATCH] D32859: [Analyzer] Iterator Checker - Part 5: Move Assignment of Containers

2018-09-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 163724. baloghadamsoftware added a comment. Comments added, functions renamed. https://reviews.llvm.org/D32859 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/mismatched-iterator.cpp Index: test/Analysis/mismatched-itera

[PATCH] D32859: [Analyzer] Iterator Checker - Part 5: Move Assignment of Containers

2018-09-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 163725. baloghadamsoftware added a comment. ) added. https://reviews.llvm.org/D32859 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/mismatched-iterator.cpp Index: test/Analysis/mismatched-iterator.cpp ==

[PATCH] D32860: [Analyzer] Iterator Checker - Part 6: Mismatched iterator checker for constructors and comparisons

2018-09-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 163736. baloghadamsoftware added a comment. Herald added subscribers: Szelethus, mikhail.ramalho. Checking of constructor parameters moved to `PreCall` check. https://reviews.llvm.org/D32860 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cp

[PATCH] D32902: [Analyzer] Iterator Checker - Part 7: Support for push and pop operations

2018-09-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 163984. baloghadamsoftware added a comment. Updated according to the comments and rebased. https://reviews.llvm.org/D32902 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/Inputs/system-header-simulator-cxx.h test/Analys

[PATCH] D32902: [Analyzer] Iterator Checker - Part 7: Support for push and pop operations

2018-09-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1449-1464 +const CXXRecordDecl *getCXXRecordDecl(const MemRegion *Reg) { + QualType Type; + if (const auto *TVReg = Reg->ge

[PATCH] D32904: [Analyzer] Iterator Checker - Part 8: Support for assign, clear, insert, emplace and erase operations

2018-09-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 164006. baloghadamsoftware added a comment. Herald added subscribers: Szelethus, mikhail.ramalho. Rebased. https://reviews.llvm.org/D32904 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/Inputs/system-header-simulator-cxx

[PATCH] D32905: [Analyzer] Iterator Checker - Part 9: Evaluation of std::find-like calls

2018-09-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Herald added subscribers: Szelethus, mikhail.ramalho. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1584-1588 + auto stateFound = state->BindExpr(CE, LCtx, RetVal); + auto stateNotFound = state->BindExpr(CE, LCtx, SecondPa

[PATCH] D32906: [Analyzer] Iterator Checker - Part 10: Support for iterators passed as parameter

2018-09-06 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 164152. baloghadamsoftware added a comment. Modification of the checker not needed anymore. Only tests added. https://reviews.llvm.org/D32906 Files: test/Analysis/iterator-range.cpp test/Analysis/mismatched-iterator.cpp Index: test/Analysis

[PATCH] D32906: [Analyzer] Iterator Checker - Part 10: Support for iterators passed as parameter

2018-09-06 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Your are right, it is not necessary anymore. Should I keep this patch to add the tests only or should I abandon it completely? https://reviews.llvm.org/D32906 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D32845: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function parameters

2018-09-10 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. baloghadamsoftware marked an inline comment as done. Closed by commit rC341790: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function… (authored by baloghadamsoftware, committed by ). Changed prior

[PATCH] D32859: [Analyzer] Iterator Checker - Part 5: Move Assignment of Containers

2018-09-10 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341791: [Analyzer] Iterator Checker - Part 5: Move Assignment of Containers (authored by baloghadamsoftware, committed by ). Changed prior to commit: https://reviews.llvm.org/D32859?vs=163725&id=164632#

[PATCH] D32860: [Analyzer] Iterator Checker - Part 6: Mismatched iterator checker for constructors and comparisons

2018-09-10 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341792: [Analyzer] Iterator Checker - Part 6: Mismatched iterator checker for… (authored by baloghadamsoftware, committed by ). Changed prior to commit: https://reviews.llvm.org/D32860?vs=163736&id=1646

[PATCH] D32902: [Analyzer] Iterator Checker - Part 7: Support for push and pop operations

2018-09-10 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. baloghadamsoftware marked an inline comment as done. Closed by commit rL341793: [Analyzer] Iterator Checker - Part 7: Support for push and pop operations (authored by baloghadamsoftware, committed by ). Herald added a subscr

[PATCH] D32904: [Analyzer] Iterator Checker - Part 8: Support for assign, clear, insert, emplace and erase operations

2018-09-10 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341794: [Analyzer] Iterator Checker - Part 8: Support for assign, clear, insert… (authored by baloghadamsoftware, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https:

[PATCH] D49536: [Analyzer] Quick Fix for exponential execution time when simpilifying complex additive expressions

2018-07-23 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337678: [Analyzer] Quick Fix for exponential execution time when simpilifying complex… (authored by baloghadamsoftware, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D49627: [CFG] [analyzer] Constructors of member CXXOperatorCallExpr's argument 0 are not argument constructors.

2018-07-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. "Actually supporting such this-argument construction contexts would address the FIXME that we've added in https://reviews.llvm.org/D32642 but this patch doesn't go that far." Maybe a FIXME here so we do not forget to continue it in the future? https://revie

[PATCH] D49627: [CFG] [analyzer] Constructors of member CXXOperatorCallExpr's argument 0 are not argument constructors.

2018-07-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. How much different is a correct `this`-argument construction context from real argument construction contexts? https://reviews.llvm.org/D49627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D48427: [Analyzer] Iterator Checker Hotfix: Defer deletion of container data until its last iterator is cleaned up

2018-07-30 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338234: [Analyzer] Iterator Checker Hotfix: Defer deletion of container data until its… (authored by baloghadamsoftware, committed by ). Changed prior to commit: https://reviews.llvm.org/D48427?vs=15406

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-07-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as not done. baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605 + if (Pos && !Pos->isValid()) { +// If I do not put a tag here, some invalidation tests will fail +static Ch

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-08-01 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 158479. baloghadamsoftware added a comment. Pre-statement check of `CXXOperatorCallExpr` merged into pre-call check. https://reviews.llvm.org/D32747 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/Iterator

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-08-01 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605 + if (Pos && !Pos->isValid()) { +// If I do not put a tag here, some invalidation tests will fail +static CheckerProgramPointTag Tag("InvalidatedIteratorChecker", --

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-08-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 158701. baloghadamsoftware added a comment. Copying iterator position for the `this` pointer of C++ operators from the caller's context to the callee's context is no longer needed. https://reviews.llvm.org/D32747 Files: include/clang/StaticAna

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-08-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Yes, it is working now without the hack. https://reviews.llvm.org/D32747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50256: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager (for == and != only)

2018-08-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added a reviewer: NoQ. Herald added subscribers: mikhail.ramalho, a.sidorin, dkrupp, rnkovacs, szepet, whisperity. Herald added a reviewer: george.karpenkov. Currently, the default (range-based) constrain manager supports symbolic expr

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-08-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 159012. baloghadamsoftware edited the summary of this revision. baloghadamsoftware added a comment. Completely rewritten: works correctly for modular arithmetic (multiplication), works correctly for truncation (division), only uses integers, no flo

[PATCH] D32845: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function parameters

2018-08-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:388 +// template parameters for different containers. So we can safely +// assume that passing iterators of different containers as arguments +// whose type replaces

[PATCH] D32859: [Analyzer] Iterator Checker - Part 5: Move Assignment of Containers

2018-08-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D32859##inline-360206, @NoQ wrote: > I do not immediately understand what is this useful for. At least tests don't > look like they make use of these offset manipulations(?) > > Without full understanding, i wonder: when we overwrit

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-08-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. https://reviews.llvm.org/D32747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-05-24 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. Herald added a subscriber: mgorny. Finds functions which should not throw exceptions: Destructors, move constructors, move assignment operators, the main() function, swap() functions, functions marked with throw() or noexcept and functions given as optio

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

2017-05-24 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Supersedes https://reviews.llvm.org/D32350 https://reviews.llvm.org/D33537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32350: [Analyzer] Exception checker for misuse: uncaught/noncompliant throws

2017-05-24 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware abandoned this revision. baloghadamsoftware added a comment. Superseded by https://reviews.llvm.org/D33537 https://reviews.llvm.org/D32350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D32592: [Analyzer] Iterator Checker - Part 1: Minimal Checker for a Simple Test Case

2017-05-24 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Any comments regarding the last changes? https://reviews.llvm.org/D32592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32592: [Analyzer] Iterator Checker - Part 1: Minimal Checker for a Simple Test Case

2017-05-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 100239. baloghadamsoftware added a comment. Comments added and fixed. https://reviews.llvm.org/D32592 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/IteratorCh

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

2017-05-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 100369. baloghadamsoftware added a comment. Docs fixed according to the comments. https://reviews.llvm.org/D33537 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/ExceptionEscapeCheck.cpp clang-tidy/misc/ExceptionEscapeCheck.h clang-

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

2017-05-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D33537#764834, @Prazek wrote: > How is that compared to https://reviews.llvm.org/D19201 and the clang patch > mentioned in this patch? Actually, this check does much more. It does not only check for noexcept (and throw()) functio

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

2017-05-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 100374. baloghadamsoftware added a comment. Check added to the Release Notes. https://reviews.llvm.org/D33537 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/ExceptionEscapeCheck.cpp clang-tidy/misc/ExceptionEscapeCheck.h clang-tidy

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

2017-05-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 100382. baloghadamsoftware added a comment. Ignoring bad_alloc. https://reviews.llvm.org/D33537 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/ExceptionEscapeCheck.cpp clang-tidy/misc/ExceptionEscapeCheck.h clang-tidy/misc/MiscTidy

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-05-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 100848. baloghadamsoftware added a comment. Rebased to (committed) Part1 (https://reviews.llvm.org/rL304160) and updated according to comments. https://reviews.llvm.org/D32642 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analy

[PATCH] D31370: [clang-tidy] Prototype to check for exception specification

2017-05-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. The matcher in https://reviews.llvm.org/D33537 could be reused here as well. Maybe I should make it common, but it is more complex than any of the common matchers. Repository: rL LLVM https://reviews.llvm.org/D31370

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-05-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. There is a patch (https://reviews.llvm.org/D33537) for a check which is a superset of this: It does not only check for noexcept (and throw()) functions, but also for destructors, move constructors, move assignments, the main() function, swap() functions and a

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

2017-06-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D33537#770264, @aaron.ballman wrote: > I think we should try to get as much of this functionality in > https://reviews.llvm.org/D3 as possible; there is a considerable amount > of overlap between that functionality and this fun

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Any progress in the review? https://reviews.llvm.org/D32642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-22 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I tried `SValBuilder::evalBinOp()` first but it did not help too much. It could decide only if I compared the same conjured symbols or different ones, but nothing more. It always gave me `UnknownVal`. Even if comparing ${conj_X} == ${conj_X} + n where n was a

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-22 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 103568. baloghadamsoftware added a comment. Minor fixes according to the comments. https://reviews.llvm.org/D32642 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/Inputs/system-header-simulator-cxx.h test/Analysis/diagn

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. > I'm sure that simplification `(($x + N) + M) ~> ($x + (M + N))` is already > working in `SValBuilder`. No, it is unfortunately not working: I tried to increase `${conj_X}` by `1`, then again by `1`, and I got symbolic expression `(${conj_X}+1)+1)`. https:

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 103728. baloghadamsoftware added a comment. `SymbolManager::getSymIntExpr()` replaced by `SValBuilder::evalBinOp()`, function `compact()` eliminated. https://reviews.llvm.org/D32642 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-06-23 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Now I can improve `SValBuilder` to compare `{conj_X}+n` to `conj_X}+m`, but I am not sure if it helps to simplify `compare()` much. How to handle cases where I have to compare `{conj_X}+n` to `{conj_Y}+m`, an we have a range `[k..k]` for `{conj_X}-{conj_Y}` i

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Herald added subscribers: a.sidorin, rnkovacs, szepet. This one is not blocked anymore since I removed the dependency. https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2018-01-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35109#956075, @NoQ wrote: > I'm totally fine with assuming the MAX/4 constraint on checker side - > extension math would still be better than the MAX/4 pattern-matching in core > because extension math should be more useful on its

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-05 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35110#968284, @baloghadamsoftware wrote: > This one is not blocked anymore since I removed the dependency. But I have to modify the test cases... https://reviews.llvm.org/D35110 ___

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2018-01-08 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35109#969109, @NoQ wrote: > I guess it'd be an `-analyzer-config` flag. You can add it to the > `AnalyzerOptions` object, which has access to these flags and can be accessed > from `AnalysisManager`. OK, I can do that. BUt how s

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-08 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Strange, but modifying the tests from `m n` to `m - n 0` does not help. The statement `if (m - n 0)` does not store a range for `m - n` in the constraint manager. With the other patch which automatically changes `m n` to `m - n 0` the range is stored a

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-01-11 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, dcoughlin. Herald added subscribers: a.sidorin, szepet. This patch is a "light" version of https://reviews.llvm.org/D35109: Since the range-based constraint manager (default) is weak in handling comparisons where

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-11 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35110#972430, @NoQ wrote: > In https://reviews.llvm.org/D35110#969782, @baloghadamsoftware wrote: > > > Strange, but modifying the tests from `m n` to `m - n > > 0` does not help. The statement `if (m - n 0)` does not store a

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-11 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 129441. baloghadamsoftware added a comment. Updated to be based upon https://reviews.llvm.org/D41938. https://reviews.llvm.org/D35110 Files: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp test/Analysis/constraint_manager_negate_difference

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2018-01-11 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 129445. baloghadamsoftware added a comment. Updated to be based upon https://reviews.llvm.org/D41938 and https://reviews.llvm.org/D35110. https://reviews.llvm.org/D32642 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/In

[PATCH] D44079: [ASTImporter] Allow testing of import sequences; fix import of typedefs for anonymous decls

2018-03-06 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Hi, Thank you for the patch. It seems that the new approach still does not solve a problem with anonymous structures in typedefs.In C++ a copy constructor is automatically generated, and its parameter is the anonymous structure itself. This triggers caching

[PATCH] D44079: [ASTImporter] Allow testing of import sequences; fix import of typedefs for anonymous decls

2018-03-12 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. By moving the code that sets the type name of an anoynmous declaration from Import(Decl*) to ImportDefinition(RecordDecl*, RecordDecl*, ImportDefinitionKind) (and the same for Enum) we will not crash upon importing typedefs containing anonymous strcutures. Th

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-03-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:330 + nonloc::ConcreteInt(Max), SVB.getConditionType()); + if (auto DV = IsCappedFromAbove.getAs()) { +if (State->assume(*DV, false)) geo

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-03-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 138954. baloghadamsoftware added a comment. Updated according to the comments. https://reviews.llvm.org/D41938 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/StaticAnalyzer/Core/AnalyzerOptions.cpp lib/StaticAnalyzer/Core/Si

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-03-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 12 inline comments as done. baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:326 + + llvm::APSInt Max = AT.getMaxValue() >> 2; // Divide by 4. + SVal IsCappedFromAbove = george.karpenk

[PATCH] D47417: [analyzer] Add missing state transition in IteratorChecker

2018-05-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware accepted this revision. baloghadamsoftware added a comment. Oh, it slipped through somehow. Thanks for fixing this! Repository: rC Clang https://reviews.llvm.org/D47417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Sorry, Artem, but it does not work this way. Even if the symbolic expressions are constrained to `[-MAX/4..MAX/4]`, after rearrangement the difference still uses the whole range, thus `m>n` becomes `m-n>0`, where in the false branch the range for `m-n` is `[M

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Maybe if we could apply somehow a `[-MAX/2..MAX/2]` constraint to both sides of the rearranged equality in SimpleSValBuilder. https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D47417: [analyzer] Add missing state transition in IteratorChecker

2018-06-01 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Did the tests execute? I am not sure. First problem is the the container may become dead before the iterator, so its `Begin` and `End` symbols may be inaccessible. This is easy to solve by marking the container of the iterator as live. However, there is a sec

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-06-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35110#1119496, @NoQ wrote: > Which expressions are constrained? Why does the difference use the whole > range? Is it something that could have been fixed by the "enforce that > separately" part in my old comment: > > > iterator-re

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-06-13 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Herald added a subscriber: mikhail.ramalho. Any idea how to proceed? https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D47445: [ASTImporter] Corrected diagnostic client handling in tests.

2018-06-14 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC334804: [ASTImporter] Corrected diagnostic client handling in tests. (authored by baloghadamsoftware, committed by ). Changed prior to commit: https://reviews.llvm.org/D47445?vs=149412&id=151459#toc Re

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

2018-06-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 151666. baloghadamsoftware added a comment. New warning message, more detailed docs. https://reviews.llvm.org/D33537 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/ExceptionEscapeChe

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-06-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 151720. baloghadamsoftware added a comment. -(-2^n) == -2^n https://reviews.llvm.org/D35110 Files: include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h lib/StaticAnalyzer/Core/RangeConstraintManager.cpp test/Analysis/co

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-06-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I added extra assertion into the test for the difference. Interestingly, it also works if I assert `n-m` is in the range instead of `m-n`. https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@

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

2018-06-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: test/clang-tidy/bugprone-exception-escape.cpp:178 +void indirect_implicit() noexcept { + // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: an exception may be thrown in function 'indirect_implicit' which should not throw exception

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

2018-06-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 151876. baloghadamsoftware added a comment. Typo fixed. https://reviews.llvm.org/D33537 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/ExceptionEscapeCheck.cpp clang-tidy/bugprone/

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-06-19 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I tested all parts of the Iterator Checkers, all tests passed. https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48427: [Analyzer] Fix for D47417 to make the tests pass

2018-06-21 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, rnkovacs. Herald added subscribers: mikhail.ramalho, a.sidorin, dkrupp, szepet, xazax.hun, whisperity. Herald added a reviewer: george.karpenkov. https://reviews.llvm.org/D47417 is a fix for an accidentally missing

[PATCH] D48460: [analyzer] Fix invalidation on C++ const methods.

2018-06-21 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I find it a strange behavior that this-expression is sometimes a pointer, sometimes a record declaration. If references are resolved, why are pointers not? This is an important fix, but I wonder how many other places are in the code where we do not handle th

[PATCH] D52727: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-10-09 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 168787. baloghadamsoftware added a comment. Updated according to the comments. https://reviews.llvm.org/D52727 Files: clang-tidy/performance/ForRangeCopyCheck.cpp clang-tidy/performance/ForRangeCopyCheck.h clang-tidy/performance/Unnecessary

  1   2   3   4   5   6   7   8   9   10   >