[PATCH] D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py

2020-10-19 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D87830#2336572 , @njames93 wrote: > Probably not quite as verbose but should do the job > > // RUN: clang-tidy %s --checks=-*,my-check-to-test --warnings-as-errors=* > -- -std=c++11 Thanks  ! I can live with this

[PATCH] D89528: [clang][test] Fix prefix operator++ signature in iterators

2020-10-19 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D89528#2334795 , @martong wrote: > What is the context here? Did it cause any crash/bug or were you just reading > through the code for a good night sleep? :D Actually I was debugging thru iterator-related code and was

[PATCH] D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py

2020-10-16 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D87830#2298198 , @aaron.ballman wrote: > > know of any tests that are impacted by this? I haven't found any tidy-tests that were negative-tests (ie.: tests that assert that there are no diagnostics). > ... if I

[PATCH] D89528: [clang][test] Fix prefix operator++ signature in iterators

2020-10-16 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, martong, Szelethus, dkrupp. Herald added a reviewer: Szelethus. Herald added a project: clang. gamesh411 requested review of this revision. Prefix operator++ should return the iterator incremented by reference. Repository:

[PATCH] D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py

2020-09-28 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Do you have some thoughts about this, should this be pursued, or do you think the use-case is not relevant? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87830/new/ https://reviews.llvm.org/D87830

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-09-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 292488. gamesh411 added a comment. Update commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py

2020-09-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 292487. gamesh411 added a comment. Tidy up commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87830/new/ https://reviews.llvm.org/D87830 Files:

[PATCH] D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py

2020-09-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 292485. gamesh411 added a comment. Update commit msg with example Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87830/new/ https://reviews.llvm.org/D87830 Files:

[PATCH] D87830: [clang-tidy][test] Allow empty checks in check_clang_tidy.py

2020-09-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, martong, steakhal, Szelethus, dkrupp, xazax.hun, whisperity. Herald added a project: clang. gamesh411 requested review of this revision. Currently there is no way to assert that a check does not produce warnings for a

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-09-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 292419. gamesh411 added a comment. Reformat diagnostic message Use explicit name longjmp instead of jump function Fix liberal auto inside Collector Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-09-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 13 inline comments as done. gamesh411 added a comment. Note that there are no negative test cases that assert that we do NOT report in case a custom or an anonymous namespace is used. For that I would need a small patch in the testing infrastructure. Patch needed in

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-09-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 292416. gamesh411 marked 2 inline comments as done. gamesh411 added a comment. Add abort and terminate handling Extend tests to cover every exit functions Extract matcher bind labels Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-09-02 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 289597. gamesh411 added a comment. only consider global and ::std scope handlers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D85424: [Analyzer] Crash fix for alpha.cplusplus.IteratorRange

2020-08-31 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. `CReduce` did not manage to produce any meaningful result after a week worth of runtime (more than ~2000 lines of code still remaining after reduction). We could track this down by tracing the ExprEngine code that assigns the Undefined SVal but that seems a huge

[PATCH] D77229: [Analyzer] Avoid handling of LazyCompundVals in IteratorModeling

2020-08-14 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 accepted this revision. gamesh411 added a comment. This revision is now accepted and ready to land. Thanks! LGTM now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77229/new/ https://reviews.llvm.org/D77229 ___ cfe-commits mailing

[PATCH] D77229: [Analyzer] Avoid handling of LazyCompundVals in IteratorModeling

2020-08-13 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Aside from infrastructural questions which I am not qualified ( nor particularly knowledgeable :3 ) to address, this looks good to me. Comment at: clang/lib/StaticAnalyzer/Checkers/STLAlgorithmModeling.cpp:77 + unsigned ArgNum = 999; +

[PATCH] D85728: [Analyzer] Support for the new variadic isa<> and isa_and_not_null<> in CastValueChecker

2020-08-12 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:265 + SmallVector CastToTyVec; + for (unsigned idx = 0; idx < FD->getTemplateSpecializationArgs()->size() - 1; + ++idx) { Do we intentionally skip the

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-08-04 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 282837. gamesh411 marked an inline comment as done. gamesh411 added a comment. rename file name in header Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-08-04 Thread Endre Fülöp via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG141cb8a1eecc: [analyzer] Model iterator random incrementation symmetrically (authored by gamesh411). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D84520: [Analyzer] Improve invalid dereference bug reporting in DereferenceChecker.

2020-08-04 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. I would add one more test for the undefined case. Like a local array variable that is uninitialized. That could mirror some of the null-dereference cases. Comment at: clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp:135 +DerefKindStr =

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-08-03 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 282535. gamesh411 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-08-03 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. I have updated the revision to use `llvm::move` algorithm (available thanks to @njames93). Friendly ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-08-03 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 282533. gamesh411 added a comment. ensure lint in path Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-08-03 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 282532. gamesh411 added a comment. use llvm::move algorithm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D85112: use llvm::move algorithm

2020-08-03 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 abandoned this revision. gamesh411 added a comment. arcanist misfire, see D83717 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85112/new/ https://reviews.llvm.org/D85112

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-08-03 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 282529. gamesh411 added a comment. use llvm::move algorithm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D85112: use llvm::move algorithm

2020-08-03 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, martong, Szelethus, dkrupp. Herald added a project: clang. gamesh411 requested review of this revision. Depends on D83717 . Repository: rG LLVM Github Monorepo

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-21 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. I experienced 2 crashes with and without this patch using commit `1af9fc82132da7c876e8f70c4e986cc9c59010ee` on master: I have used the clang built on that revision to analyse itself, and also used the patched version (with this current revision applied) to do the

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278870. gamesh411 added a comment. rename Offset -> Amount inside handleRandomIncrOrDecl minor local variable renaming Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83190/new/ https://reviews.llvm.org/D83190

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278853. gamesh411 marked an inline comment as done. gamesh411 added a comment. apply review suggestions - rename variables - remove 1 assert - rename tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 6 inline comments as done. gamesh411 added a comment. Thanks for reviewing this patch this quickly! I have updated the diff according to your suggestions, but I will not land it till I run a llvm+clang analysis with it. Do you think non-ctu mode is enough to test the stability?

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. It would be nice to see the measurements on llvm as this patch introduced some (IMO reasonable) asserts. Also in the unlikely case, there is an expression like `1 + iter`, there could be more results. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278747. gamesh411 added a comment. rebase upon hotfix patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83190/new/ https://reviews.llvm.org/D83190 Files:

[PATCH] D83226: [analyzer] Add system header simulator a symmetric random access iterator operator+

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfd02a86260b3: [analyzer] Add system header simulator a symmetric random access iterator… (authored by gamesh411). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added inline comments. Comment at: clang/test/Analysis/sufficient-size-array-indexing-32bit.c:120 + +void test_symbolic_index_handling4(int choice) { + char c; balazske wrote: > Here "is a chance that indexing is correct". So no warning should occur?

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278727. gamesh411 marked 3 inline comments as done. gamesh411 added a comment. extend test cases add comments to non-obvious cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69318/new/

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278703. gamesh411 added a comment. move tests to one file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69318/new/ https://reviews.llvm.org/D69318 Files:

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 4 inline comments as done. gamesh411 added a comment. I am now experimenting with the suggestions. The other issues are on the worklist. Thanks for these so far. Comment at: clang/lib/StaticAnalyzer/Checkers/SufficientSizeArrayIndexingChecker.cpp:50 + if

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-16 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D83717#2155066 , @njames93 wrote: > In D83717#2152762 , @gamesh411 wrote: > > > In D83717#2150977 , @njames93 > > wrote: > > > > >

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 2 inline comments as done. gamesh411 added a comment. In D83717#2153246 , @Eugene.Zelenko wrote: > In D83717#2153245 , @gamesh411 wrote: > > > @Eugene.Zelenko I have just rebase-d, and seen that

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. @Eugene.Zelenko I have just rebase-d, and seen that the release notes page itself was bumped to clang-tidy 12. I have added my check as a new check there. Should I also add the other subsections (like improvements in existing checks, and new check aliases), or

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278184. gamesh411 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278181. gamesh411 added a comment. tidy up release notes, make all new check entries uniform Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:87 + ` check. + Finds functions registered by ``atexit`` and ``at_quick_exit`` that are calling + exit functions ``_Exit``, ``exit``, ``quick_exit`` or ``longjmp``.

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278178. gamesh411 marked an inline comment as done. gamesh411 added a comment. add missing newline in release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278176. gamesh411 marked an inline comment as done. gamesh411 added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278174. gamesh411 added a comment. fix documentation header Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 2 inline comments as done. gamesh411 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-env32-c.rst:6 + +This check implements SEI CERT rule ENV32-C by finding functions registered by +``atexit`` and ``at_quick_exit`` that are

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. @steakhal @Eugene.Zelenko Thanks for checking this patch! I have tried my best to adhere to your suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked an inline comment as done. gamesh411 added a comment. In D83717#2150977 , @njames93 wrote: > Alternatively you could do something like this, though it would be a pain >

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 12 inline comments as done. gamesh411 added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/ExitHandlerCheck.cpp:132 + "terminate by returning"); + break; +} steakhal wrote: > Why don't we `return` here? > Same

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-15 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 278116. gamesh411 marked 2 inline comments as done. gamesh411 added a comment. use move instead of copy fix documentation issues fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-14 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 10 inline comments as done. gamesh411 added a comment. Thanks @njames93 :) I have extended the check with notes, but I have to figure out how to appease file-check, so its still WIP until I do. Comment at:

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-14 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 277796. gamesh411 added a comment. extend with notes apply minor fixes tests are WIP until I figure out how to properly use file-check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-13 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 277590. gamesh411 added a comment. mention iterator header Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-13 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 277588. gamesh411 added a comment. use std::copy algorithm polish Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-13 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 277581. gamesh411 added a comment. fix test diag location changes resulting from autoformatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-13 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 277575. gamesh411 added a comment. simplify VisitCallExpr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files:

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-13 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 277571. gamesh411 added a comment. update includes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 Files: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-13 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: llvm-commits, cfe-commits, martong, steakhal, Szelethus, dkrupp, xazax.hun, whisperity, mgorny. Herald added projects: clang, LLVM. Add check for the SEI CERT item ENV32-C which dictates that exit handler functions should terminate by

[PATCH] D83295: [Analyzer] Hotfix for various crashes in iterator checkers

2020-07-09 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. @Szelethus thanks for being watchful, appreciated c: CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83295/new/ https://reviews.llvm.org/D83295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D83295: [Analyzer] Hotfix for various crashes in iterator checkers

2020-07-09 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 accepted this revision. gamesh411 added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:275-276 } else if (isRandomIncrOrDecrOperator(OK)) { +if

[PATCH] D83475: [analyzer] Add CTUImportCppThreshold for C++ files

2020-07-09 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def:333 +"for import when inlining functions during CTU analysis of C++ " +"source files. ", 8u) extra

[PATCH] D83475: [analyzer] Add CTUImportCppThreshold for C++ files

2020-07-09 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 accepted this revision. gamesh411 added a comment. This revision is now accepted and ready to land. It will be interesting to see how different C and C++ projects will prove in terms of AST complexity, and Decl-size, but I understand that for now, these two options are necessary to

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-08 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 276346. gamesh411 added a comment. apply review suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69318/new/ https://reviews.llvm.org/D69318 Files:

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-08 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 7 inline comments as done. gamesh411 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SufficientSizeArrayIndexingChecker.cpp:27 +: public Checker> { + mutable std::unique_ptr BT; + balazske wrote: > The bug type can be

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-07 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275954. gamesh411 added a comment. fix tidy diagnostic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83190/new/ https://reviews.llvm.org/D83190 Files:

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-07 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. The checker has been updated, the comments and the logic polished. I would still take a stab at this being a ClangSa checker (as opposed to being a Tidy check). What do you think? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-07 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 8 inline comments as done. gamesh411 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SufficientSizeArrayIndexingChecker.cpp:42 +BugType & +SufficientSizeArrayIndexingChecker::GetBugTypeForType(const QualType T) const { + auto BT =

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-07 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 4 inline comments as done. gamesh411 added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:622 + } // end: "alpha.cplusplus" NoQ wrote: > What makes this checker C++-specific? All your tests are in plain

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-07 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275938. gamesh411 added a comment. fix detection logic fix license header add missing warning to test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69318/new/ https://reviews.llvm.org/D69318 Files:

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 5 inline comments as done. gamesh411 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:282 +SVal = IsItOnLHS ? RVal : LVal; +handlePtrIncrOrDecr(C, ItExpr, BinaryOperator::getOverloadedOperator(OK), +

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275835. gamesh411 added a comment. implement traditional iterator support as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83190/new/ https://reviews.llvm.org/D83190 Files:

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In order to test the non-pointer iterators, an extension has to be made to the system header simulator. Please check the related patch (parent of this one in the stack) https://reviews.llvm.org/D83226. Comment at:

[PATCH] D83226: [analyzer] Add system header simulator a symmetric random access iterator operator+

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, ASDenysPetrov, martong, steakhal, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a reviewer: Szelethus. Herald added a project: clang.

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275693. gamesh411 marked 2 inline comments as done. gamesh411 added a comment. rename misleading variables apply local consts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83190/new/

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275678. gamesh411 added a comment. modernize the memory modeling code, still WIP Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69318/new/ https://reviews.llvm.org/D69318 Files:

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275625. gamesh411 added a comment. make single bug-type fix checker registration Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69318/new/ https://reviews.llvm.org/D69318 Files:

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275611. gamesh411 added a comment. move to core.alpha Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69318/new/ https://reviews.llvm.org/D69318 Files:

[PATCH] D69318: [analyzer] Add SufficientSizeArrayIndexingChecker

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275605. gamesh411 added a comment. Herald added subscribers: ASDenysPetrov, martong. change license Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69318/new/ https://reviews.llvm.org/D69318 Files:

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 2 inline comments as done. gamesh411 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:279 +// or on the RHS (eg.: 1 + it). Both cases are modeled. +bool IsItOnLHS = BO->getLHS()->getType()->isPointerType(); +

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275595. gamesh411 added a comment. remove unrelated comment formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83190/new/ https://reviews.llvm.org/D83190 Files:

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, ASDenysPetrov, martong, steakhal, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a reviewer: Szelethus. Herald added a project: clang. In

[PATCH] D82561: [analyzer][CrossTU] Lower CTUImportThreshold default value

2020-07-01 Thread Endre Fülöp via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG52f653236600: [analyzer][CrossTU] Lower CTUImportThreshold default value (authored by gamesh411). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82561/new/

[PATCH] D82185: [Analyzer] Handle pointer implemented as iterators in iterator checkers

2020-06-30 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 accepted this revision. gamesh411 added a comment. This revision is now accepted and ready to land. Thanks, it LGTM now! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82185/new/ https://reviews.llvm.org/D82185 ___ cfe-commits

[PATCH] D81750: [analyzer] Don't allow hidden checkers to emit diagnostics

2020-06-30 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 accepted this revision. gamesh411 added a comment. This revision is now accepted and ready to land. LGTM if nobody is against moving the checker. I will accept nevertheless. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81750/new/

[PATCH] D82585: [analyzer][NFC] Move the data structures from CheckerRegistry to the Core library

2020-06-30 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Good job, massive props to you for such an overhaul. Comment at: clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:155 /// Constructs a CheckerManager without requiring an AST. No checker - /// registration will take place. Only useful for

[PATCH] D82568: [clang][CrossTU] Invalidate parent map after get cross TU definition.

2020-06-26 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 accepted this revision. gamesh411 added a comment. This revision is now accepted and ready to land. I have found this in ASTContext.h: // A traversal scope limits the parts of the AST visible to certain analyses. // RecursiveASTVisitor::TraverseAST will only visit reachable

[PATCH] D82561: [analyzer][CrossTU] Lower CTUImportThreshold default value

2020-06-26 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D82561#2116091 , @balazske wrote: > In D82561#2115578 , @xazax.hun wrote: > > > The analyzer inlines small functions within a TU regardless of the > > thresholds. I think it would be

[PATCH] D82561: [analyzer][CrossTU] Lower CTUImportThreshold default value

2020-06-25 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. gamesh411 added reviewers: martong, balazske. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a

[PATCH] D82561: [analyzer][CrossTU] Lower CTUImportThreshold default value

2020-06-25 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 273372. gamesh411 added a comment. update test value Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82561/new/ https://reviews.llvm.org/D82561 Files:

[PATCH] D82288: [analyzer][StdLibraryFunctionsChecker] Add POSIX file handling functions

2020-06-24 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 accepted this revision. gamesh411 added a comment. This revision is now accepted and ready to land. In D82288#2111206 , @Szelethus wrote: > I see a lot of `NoEvalCall`, but I wonder whether modifying `errno` warrants > this. Shouldn't we have a

[PATCH] D82385: [Analyzer] Fix errors in iterator modeling

2020-06-24 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 accepted this revision. gamesh411 added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:530-532 const auto *Pos = getIteratorPosition(State, LHS); if (!Pos) return;

[PATCH] D82288: [analyzer][StdLibraryFunctionsChecker] Add POSIX file handling functions

2020-06-24 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Good job, I really fancy the Summary syntax  Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:740 // we have a TypedefDecl with the name 'FILE'. - for (Decl *D : LookupRes) { + for (Decl *D : LookupRes) if (auto

[PATCH] D82185: [Analyzer] Handle pointer implemented as iterators in iterator checkers

2020-06-24 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:623 + + auto TempState = advancePosition(State, OldVal, OK, Offset); + const IteratorPosition *NewPos = getIteratorPosition(TempState, OldVal); Same as in the

[PATCH] D82385: [Analyzer] Fix errors in iterator modeling

2020-06-24 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Hey! See my inline comments, but after those and a quick clang-format, it looks good. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:543 - auto NewState = + auto TmpState = advancePosition(State, LHS, Op, *value);

[PATCH] D77493: [clang-tidy] Add do-not-refer-atomic-twice check

2020-06-18 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/DoNotReferAtomicTwiceCheck.cpp:21 + Finder->addMatcher( + declRefExpr(hasType(hasUnqualifiedDesugaredType(atomicType())), + to(varDecl().bind("atomic")), I

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. Minor nits inline. Good job, I am not entitled to accept it, but LGTM! Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.h:23 +/// Finds ``signal`` function calls when the program is multithreaded. It +/// founds a

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-06-17 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.h:23 +/// Finds ``signal`` function calls when the program is multithreaded. It +/// founds a program multithreaded when it finds at least one function call +///

[PATCH] D75665: [analyzer] On-demand parsing capability for CTU

2020-06-11 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D75665#2084889 , @thakis wrote: > This breaks check-clang on mac: http://45.33.8.238/mac/15258/step_7.txt > > Please take a look, and revert for now if it takes a while to fix. Thanks for reporting this, i think the output

  1   2   3   >