[PATCH] D51057: [analyzer][UninitializedObjectChecker] Fixed dereferencing

2018-09-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I ran the checker on LLVM/Clang and grpc, and saw no crashes at all! Quite confident about the current diff. However, I'm not 100% sure it doesn't break on Objective C++ codes. Can you recommend a project like that? https://reviews.llvm.org/D51057

[PATCH] D51886: [analyzer][UninitializedObjectChecker] Using the new const methods of ImmutableList

2018-09-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: george.karpenkov, NoQ, xazax.hun, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. Clang side changes to https://reviews.llvm.org/D51881. This is an improvement, and won't cause compilatio

[PATCH] D51057: [analyzer][UninitializedObjectChecker] Fixed dereferencing

2018-09-14 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342213: [analyzer][UninitializedObjectChecker] Fixed dereferencing (authored by Szelethus, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D510

[PATCH] D51417: [analyzer][UninitializedObjectChecker] Updated comments

2018-09-14 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342215: [analyzer][UninitializedObjectChecker] Updated comments (authored by Szelethus, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51417?

[PATCH] D50892: [analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record pointees

2018-09-14 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342217: [analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for… (authored by Szelethus, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

[PATCH] D51679: [analyzer][UninitializedObjectChecker] Refactored checker options

2018-09-14 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342219: [analyzer][UninitializedObjectChecker] Refactored checker options (authored by Szelethus, committed by ). Changed prior to commit: https://reviews.llvm.org/D51679?vs=164009&id=165449#toc Reposi

[PATCH] D51680: [analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields

2018-09-14 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: test/Analysis/cxx-uninitialized-object-unionlike-constructs.cpp:1-4 +// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.cplusplus.UninitializedObject \ +// RUN: -analyzer-config alpha

[PATCH] D51680: [analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields

2018-09-14 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342220: [analyzer][UninitializedObjectChecker] New flag to ignore records based on it's… (authored by Szelethus, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https:/

[PATCH] D52036: [Analyzer] Use diff_plist in tests, NFC

2018-09-14 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Cool! Looks a lot cleaner. https://reviews.llvm.org/D52036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48436: [analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

2018-07-24 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Polite ping :) https://reviews.llvm.org/D48436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49986: [ADT] ImmutableList::add parameters are switched

2018-07-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, dcoughlin, chandlerc. Herald added a subscriber: cfe-commits. Clang side changes, see https://reviews.llvm.org/D49985. Repository: rC Clang https://reviews.llvm.org/D49986 Files: include/clang/StaticAnalyzer

[PATCH] D48436: [analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

2018-07-30 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:681-689 +Optional OtherObject = +getObjectVal(OtherCtor, Context); +if (!OtherObject) + continue; + +// If the CurrentObject is a field of OtherObject,

[PATCH] D48436: [analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

2018-07-31 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:681-689 +Optional OtherObject = +getObjectVal(OtherCtor, Context); +if (!OtherObject) + continue; + +// If the CurrentObject is a field of OtherObject,

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-02 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 158749. Szelethus edited the summary of this revision. Szelethus added a comment. Dereferencing is disabled by default. I think there's a great value in this part of the checker, but I do concede to the fact that it still needs to mature even for alpha. I'

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-02 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:715 void ento::registerUninitializedObjectChecker(CheckerManager &Mgr) { auto Chk = Mgr.registerChecker(); Chk->IsPedantic =

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-02 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D49438#1184688, @george.karpenkov wrote: > @Szelethus Hi, do you plan to finish this patch soon-ish? I would like to > evaluate it on a few codebases, but the pointer chasing is currently way too > fragile / generates too many FPs. What d

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-02 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 158760. Szelethus added a comment. Forgot `git add` and `-U`. https://reviews.llvm.org/D49438 Files: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp test/Analysis/cxx-uninitialized-object-inheritance.cpp test/Analysis/cxx-uninitialize

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-03 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added a comment. It looks like I won't be back in office until Monday, so I can't finish this one until then :( >> but I haven't seen the current version of the checker crash due to pointer >> chasing. > > @NoQ saw quite a few crashes durin

[PATCH] D49199: [analyzer][UninitializedObjectChecker] Pointer/reference objects are dereferenced according to dynamic type

2018-08-06 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. @NoQ, we had quite a few conversations about this fix. How do you feel about this implementation? https://reviews.llvm.org/D49199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-08-06 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 159291. Szelethus added a comment. Fixed the comments. https://reviews.llvm.org/D49438 Files: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp test/Analysis/cxx-uninitialized-object-inheritance.cpp test/Analysis/cxx-uninitialized-object-no

[PATCH] D5767: Template Instantiation Observer + a few other templight-related changes

2018-02-08 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/Sema/Sema.cpp:40 #include "clang/Sema/TemplateDeduction.h" +#include "clang/Sema/TemplateInstCallback.h" #include "llvm/ADT/DenseMap.h" xazax.hun wrote: > Do you need to add this include? Yes, in `Sema.h` the cla

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

2018-02-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: cfe-commits, xazax.hun. Szelethus added a project: clang-tools-extra. Herald added subscribers: hintonda, rnkovacs, mgorny. New checker called misc-throw-keyword-missing warns about cases where a temporary object's type is (likely) an ex

[PATCH] D5767: Template Instantiation Observer + a few other templight-related changes

2018-02-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D5767#1000347, @xazax.hun wrote: > In https://reviews.llvm.org/D5767#999143, @sabel83 wrote: > > > 2. What do you mean by regression tests? We have run the clang-test target > > successfully on the patched code (which has the hook). Note tha

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

2018-02-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 133597. Szelethus added a comment. Changes made according to @whisperity's comments. https://reviews.llvm.org/D43120 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/ThrowKeywordMissingCheck.cpp clang-tidy/m

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

2018-02-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 5 inline comments as done. Szelethus added inline comments. Comment at: clang-tidy/misc/ThrowKeywordMissingCheck.cpp:32 + hasType(cxxRecordDecl( + isSameOrDerivedFrom(matchesName("[Ee]xception|EXCEPTION", + unless(anyOf(hasAn

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

2018-02-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 133600. Szelethus marked an inline comment as done. https://reviews.llvm.org/D43120 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/ThrowKeywordMissingCheck.cpp clang-tidy/misc/ThrowKeywordMissingCheck.h do

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

2018-02-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 133860. Szelethus added a comment. Fixed almost everything mentioned in comments. I also came up with this problem: RegularException funcReturningExceptioniTest(int i) { return RegularException(); } void returnedValueTest() { funcRet

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

2018-02-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 7 inline comments as done. Szelethus added inline comments. Comment at: clang-tidy/misc/ThrowKeywordMissingCheck.cpp:45 + diag(TemporaryExpr->getLocStart(), + "exception instantiated but not bound (did you intend to 'throw'?)"); +} aaron.b

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

2018-02-13 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 134005. https://reviews.llvm.org/D43120 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/ThrowKeywordMissingCheck.cpp clang-tidy/misc/ThrowKeywordMissingCheck.h docs/ReleaseNotes.rst docs/clang-tidy/checks

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

2018-02-14 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 134174. Szelethus added a comment. Renamed the checker from `misc-throw-keyword-missing` to `bugprone-throw-keyword-missing`. https://reviews.llvm.org/D43120 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang

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

2018-02-14 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Just noticed that I can't mark your inline comment as done, since the file got renamed. The typo is also fixed (Classname -> Class name). https://reviews.llvm.org/D43120 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-05-31 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 149290. Szelethus added a comment. - Rebased to 1cefbc5593d2f017ae56a853b0723a31865aa602 (revision 333276) - Fixed some typos - Added tests `CyclicPointerTest` and `CyclicVoidPointerTest` to highlight an issue to be fixed in a later patch https://reviews.

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-06-04 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 5 inline comments as done. Szelethus added a comment. In https://reviews.llvm.org/D45532#1116992, @george.karpenkov wrote: > @Szelethus I personally really like this idea, and I think it would be a > great checker. > Could you perform more evaluation on other projects? Thanks

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-06-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 150899. Szelethus added a comment. Polite ping :) This diff fixed a minor issue in FieldChainInfo's constructor. https://reviews.llvm.org/D45532 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-06-18 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 151685. Szelethus added a comment. Whoo! Thank you all for helping me with the reviews. Very excited about the upcoming fixes, I have some neat ideas for some already. - Rebased to 8186139d6aa0619e2057ae617c074e486a7b2f2b (revision 334929), - Added a `FIXM

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-06-18 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC334935: [analyzer] Checker for uninitialized C++ objects (authored by Szelethus, committed by ). Repository: rC Clang https://reviews.llvm.org/D45532 Files: include/clang/StaticAnalyzer/Checkers/Che

[PATCH] D48285: [analyzer]{UninitializedObjectChecker] Added "NotesAsWarnings" flag

2018-06-18 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs, whisperity. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet. For Plist consumers that don't support notes just yet, this flag can be used to convert them into warning

[PATCH] D48291: [analyzer][UninitializedObjectChecker] Fixed captured lambda variable name

2018-06-18 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: xazax.hun, george.karpenkov, NoQ, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. Repository: rC Clang https://reviews.llvm.org/D48291 Files: lib/StaticAnalyzer/Checkers/Uninitialize

[PATCH] D48285: [analyzer]{UninitializedObjectChecker] Added "NotesAsWarnings" flag

2018-06-19 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 151866. Szelethus added a comment. In https://reviews.llvm.org/D48285#1136059, @NoQ wrote: > Also, great, and can i has tests?^^ > > Like a simple code snippet with two `// RUN: ... -analyzer-output=text` lines > and different expected-warnings/notes under

[PATCH] D48285: [analyzer]{UninitializedObjectChecker] Added "NotesAsWarnings" flag

2018-06-19 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D48285#1135480, @xazax.hun wrote: > I wonder if this could be done when plist is emitted generally, independent > of any checks. Well, there's `-analyzer-config notes-as-events=true`. By the time plist files are generated, every warning i

[PATCH] D48318: [analyzer][UninitializedObjectChecker] Drop lambda support

2018-06-19 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs, dkrupp. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. After some thinking, I don't think this checker should support lambdas. Reason 1.: While this is

[PATCH] D48291: [analyzer][UninitializedObjectChecker] Fixed captured lambda variable name

2018-06-19 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Thanks for the review! I spend some time thinking about the support for lambda functions, and I start to think that checking for lambda misuse shouldn't be the responsibility of this checker. I created a new revision for that discussion, I wouldn't like to abandon th

[PATCH] D48318: [analyzer][UninitializedObjectChecker] Drop lambda support

2018-06-19 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. > [...]lambda misuse in not really an uninitialized value problem. I guess you can make the argument that it its. Even then, in my opinion this checker is overkill for lambdas. - If the captured variable has a non-default constructor, `UninitializedValueChecker` will

[PATCH] D48291: [analyzer][UninitializedObjectChecker] Fixed captured lambda variable name

2018-06-19 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:685 + + if (CXXParent && CXXParent->isLambda()) { +CXXRecordDecl::capture_const_iterator CapturedVar = george.karpenkov wrote: > CXXParent is guaranteed t

[PATCH] D48325: [analyzer][UninitializedObjectChecker] Support for MemberPointerTypes

2018-06-19 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. Repository: rC Clang https://reviews.llvm.org/D48325 Files: lib/StaticAnalyzer/Checkers/Uninitialize

[PATCH] D48325: [analyzer][UninitializedObjectChecker] Support for MemberPointerTypes

2018-06-19 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 151943. Szelethus added a comment. Accidently added the pointer `MemberPointer` objects twice, fixed that. https://reviews.llvm.org/D48325 Files: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp test/Analysis/cxx-uninitialized-object-ptr-ref

[PATCH] D48318: [analyzer][UninitializedObjectChecker] Drop lambda support

2018-06-19 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus abandoned this revision. Szelethus added a comment. Turns out I was very wrong on this one. Lambdas should be ignored as data members, but not in general. Sorry about the spam, I think I should've sit longer on this one. I'll submit another patch tomorrow that will correctly explain m

[PATCH] D48291: [analyzer][UninitializedObjectChecker] Fixed captured lambda variable name

2018-06-20 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 152105. Szelethus added a comment. Fixes according to inline comments. https://reviews.llvm.org/D48291 Files: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp test/Analysis/cxx-uninitialized-object.cpp Index: test/Analysis/cxx-uninitialized

[PATCH] D48436: [analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

2018-06-21 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: george.karpenkov, NoQ, xazax.hun, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. As of now, all constructor calls are ignored that are being called by a constructor. The point of this wa

[PATCH] D48436: [analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

2018-06-21 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 152343. Szelethus added a comment. Moved `LC = LC ->getParent()` to the `while` statement's argument to avoid a potential infinite loop. Whoops :) https://reviews.llvm.org/D48436 Files: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp test/

[PATCH] D51300: [analyzer][UninitializedObjectChecker] No longer using nonloc::LazyCompoundVal

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 168775. Szelethus added a comment. This revision is now accepted and ready to land. Finally managed to run creduce. I added the test that caused a crash on our server, but as I said, I couldn't replicate it elsewhere. https://reviews.llvm.org/D51300 File

[PATCH] D51300: [analyzer][UninitializedObjectChecker] No longer using nonloc::LazyCompoundVal

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Since a good amount of time passed since this patch was made, I'll re-analyze the LLVM project with this patch rebased on trunk just to be sure that nothing breaks. https://reviews.llvm.org/D51300 ___ cfe-commits mailing

[PATCH] D53024: [analyzer][www] Add more open projects

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, MTC. Herald added subscribers: cfe-commits, jfb, mikhail.ramalho, a.sidorin, rnkovacs, szepet, whisperity. Added some extra tasks to the open projects. These are the ideas of @NoQ and @george.karpenkov,

[PATCH] D52906: [analyzer] allow plugins built as shared libraries to receive events

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Please reupload with full context (`-U`). Comment at: lib/StaticAnalyzer/Core/Checker.cpp:20 +int ImplicitNullDerefEvent::Tag; + nit: Static fields initialize to 0 without out of line definition. Repository: rC Clang https:

[PATCH] D52906: [analyzer] allow plugins built as shared libraries to receive events

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Core/Checker.cpp:20 +int ImplicitNullDerefEvent::Tag; + Szelethus wrote: > nit: Static fields initialize to 0 without out of line definition. Never mind, you still have to define it. It's been a wh

[PATCH] D52905: [analyzer] fix accessing GDM data from shared libraries

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Please reupload with full context (`-U9`). Repository: rC Clang https://reviews.llvm.org/D52905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53024: [analyzer][www] Add more open projects

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Mind you, there are some ideas I didn't add to the list -- I just don't know how to put them to words nicely, but I'm on it. Also, a lot of these is outdated, but I joined the project relatively recently, so I'm not sure what's the state on all of them. Repository:

[PATCH] D52969: [analyzer][www] Update alpha_checks.html

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: www/analyzer/alpha_checks.html:352-405 + +alpha.cplusplus.InvalidatedIterator +(C++) +Check for use of invalidated iterators. + + @baloghadamsoftware Is this a good description of your checker(s)? https://reviews.l

[PATCH] D53024: [analyzer][www] Add more open projects

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Thanks! I admit that the difficulty was mostly chosen at random, so that could be brought closer to the actual difficulty of the project. Comment at: www/analyzer/open_projects.html:86-87 +the opposite direction - integers to pointers - are comp

[PATCH] D51866: [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 168885. Szelethus added a comment. Added new guards as recommended by @xazax.hun https://reviews.llvm.org/D51866 Files: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h lib/StaticAnalyzer/Checkers/UninitializedObject/Uninitialized

[PATCH] D51866: [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields

2018-10-09 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:519 + +if (FirstAccess->getBeginLoc() < FirstGuard->getBeginLoc()) + return true; george.karpenkov wrote: > Szelethus wrote: > >

[PATCH] D53069: [analyzer][www] Update avaible_checks.html

2018-10-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, MTC, xazax.hun. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, JDevlieghere, rnkovacs, szepet, whisperity. Title says it all. I never ever used ObjC, so I couldn't really add examples on many o

[PATCH] D53069: [analyzer][www] Update avaible_checks.html

2018-10-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 168966. Szelethus edited the summary of this revision. Szelethus added a reviewer: rnkovacs. https://reviews.llvm.org/D53069 Files: www/analyzer/available_checks.html Index: www/analyzer/available_checks.html =

[PATCH] D53069: [analyzer][www] Update avaible_checks.html

2018-10-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: www/analyzer/available_checks.html:376-393 + +cplusplus.InnerPointer +(C++) +Check for inner pointers of C++ containers used after re/deallocation. + + + @rnkovacs Is this a good description of your checker? https://

[PATCH] D53069: [analyzer][www] Update avaible_checks.html

2018-10-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Thats a great idea. About implicit checks, they are so well hidden, I didn't even find them until I wanted to update the website (although, this is at least in part my fault, but why would anyone carefully read through a website that hasn't been touched for years?).

[PATCH] D53076: [analyzer] WIP: Enhance ConditionBRVisitor to write out more information

2018-10-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I'm sadly not that knowledgeable on visitors to help you, but the idea is awesome, thank you for working on this! https://reviews.llvm.org/D53076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D53069: [analyzer][www] Update avaible_checks.html

2018-10-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Well, the reason why I didn't add tests for these, is that I know so little of ObjC, I am not even sure when a test case begins and ends. I could go ahead and google something about the language, but for a site that advertises to find bugs, maybe someone with more exp

[PATCH] D52984: [analyzer] Checker reviewer's checklist

2018-10-10 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I noticed it too, it's already on my TODO list. Didn't look into the causes just yet though. https://reviews.llvm.org/D52984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D53024: [analyzer][www] Add more open projects

2018-10-11 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169193. Szelethus added a comment. - Fixed typos - Fixed stupid characters (Thank you so much @MTC for going the extra mile and opening this patch in a browser!) - Removed outdated entries as mentioned by @MTC https://reviews.llvm.org/D53024 Files: www

[PATCH] D52840: Include Python binding tests in CMake rules

2018-10-11 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I'm afraid this may have broken many buildbots, I'm having issues building from scratch. Can you please take a look? Repository: rL LLVM https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D53069: [analyzer][www] Update avaible_checks.html

2018-10-11 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169342. Szelethus edited the summary of this revision. Szelethus added a comment. - Removed osx.cocoa.Loops, will be placed in implicit_checks.html I still didn't add more description to objc checkers for the reasons stated above. https://reviews.llvm.or

[PATCH] D53024: [analyzer][www] Add more open projects

2018-10-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D53024#1262976, @george.karpenkov wrote: > @Szelethus I take it this is mostly formed from @NoQ email? Language could > use polishing in quite a few places, could I just commandeer this revision > and try to fix it? Yes it is. Though the

[PATCH] D33672: [analyzer] INT50-CPP. Do not cast to an out-of-range enumeration checker

2018-10-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Also needs an entry to `www/analyzer/alpha_checks.html`. Comment at: test/Analysis/enum-cast-out-of-range.cpp:1 +// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=alpha.cplusplus.EnumCastOutOfRange -verify %s + 1. Prefer `%cla

[PATCH] D33672: [analyzer] INT50-CPP. Do not cast to an out-of-range enumeration checker

2018-10-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:296-299 +def EnumCastOutOfRangeChecker : Checker<"EnumCastOutOfRange">, + HelpText<"Check integer to enumeration casts for out of range values">, + DescFile<"EnumCastOutOfRange.cpp">;

[PATCH] D51531: [analyzer][UninitializedObjectChecker] Uninit regions are only reported once

2018-10-13 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Herald added a subscriber: donat.nagy. Ping, @NoQ, can you go a little bit more in depth about what you'd prefer to see here? https://reviews.llvm.org/D51531 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

[PATCH] D53274: [analyzer][NFC] Tighten up AnalyzerOptions

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, MTC, rnkovacs. Herald added subscribers: cfe-commits, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. I was a little unsure about the title, but it is what it is. I'm in the process of refac

[PATCH] D53276: [analyzer][NFC] Fix some incorrect uses of AnalyzerOptions

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, MTC, rnkovacs. Herald added subscribers: cfe-commits, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. I'm in the process of refactoring AnalyzerOptions. The main motivation behind here is to

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs, MTC. Herald added subscribers: cfe-commits, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. I'm in the process of refactoring AnalyzerOptions. The main motivation behind here is to

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Also, this patch does not contain checker options. That I would suspect be a little more invasive, so I'll do that in a followup patch. Repository: rC Clang https://reviews.llvm.org/D53277 ___ cfe-commits mailing list

[PATCH] D53280: [analyzer] Emit a warning for unknown -analyzer-config options

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs, MTC. Herald added subscribers: cfe-commits, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. I'm in the process of refactoring AnalyzerOptions. The main motivation behind here is to

[PATCH] D53280: [analyzer] Emit a warning for unknown -analyzer-config options

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. @whisperity @xazax.hun A worry of mine is shared libraries, for example, we've got an array of Ericsson-specific checkers that we load run-time. Do we support (or should we) support acquiring non-checker `-analyzer-config` options? Repository: rC Clang https://rev

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169688. https://reviews.llvm.org/D53277 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.def include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/StaticAnalyzer/Core/AnalyzerOptions.cpp lib/StaticAnalyzer/Core/CoreEngine.cpp Index: lib/S

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:128-135 +/// Describes the kinds for high-level analyzer mode. +enum UserModeKind { + /// Perform shallow but fast analyzes. + UMK_Shallow = 1, + + /// Perform deep analyzes. + UM

[PATCH] D53280: [analyzer] Emit a warning for unknown -analyzer-config options

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169693. https://reviews.llvm.org/D53280 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/Frontend/CompilerInvocation.cpp Index: lib/Frontend/CompilerInvocation.cpp ==

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169696. https://reviews.llvm.org/D53277 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.def include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/StaticAnalyzer/Core/AnalyzerOptions.cpp lib/StaticAnalyzer/Core/CoreEngine.cpp Index: lib/S

[PATCH] D53277: [analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169697. https://reviews.llvm.org/D53277 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.def include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/StaticAnalyzer/Core/AnalyzerOptions.cpp lib/StaticAnalyzer/Core/CoreEngine.cpp Index: lib/S

[PATCH] D53274: [analyzer][NFC] Fix inconsistencies in AnalyzerOptions

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169703. https://reviews.llvm.org/D53274 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/StaticAnalyzer/Core/AnalyzerOptions.cpp lib/StaticAnalyzer/Core/CoreEngine.cpp Index: lib/StaticAnalyzer/Core/CoreEngine.cpp ==

[PATCH] D53277: [analyzer][NFC] Collect all -analyzer-config options in a .def file

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169731. Szelethus retitled this revision from "[analyzer][NFC][WIP] Collect all -analyzer-config options in a .def file" to "[analyzer][NFC] Collect all -analyzer-config options in a .def file". Szelethus edited the summary of this revision. Szelethus added

[PATCH] D53274: [analyzer][NFC] Fix inconsistencies in AnalyzerOptions

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D53274#1265625, @george.karpenkov wrote: > I'm not sure why you could get away with removing those llvm_unreachable > cases? Because I got a warning for using `default` when every enum value was handled in the switch. Since whether the fl

[PATCH] D53296: [analyzer] New flag to print all -analyzer-config options

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, MTC, rnkovacs. Herald added subscribers: cfe-commits, donat.nagy, mikhail.ramalho, dmgreen, a.sidorin, mgrang, szepet, whisperity. Title says it all, here's how it look like locally: OVERVIEW: Clang S

[PATCH] D53296: [analyzer] New flag to print all -analyzer-config options

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Cheers, thanks for the review! In https://reviews.llvm.org/D53296#1265927, @george.karpenkov wrote: > Also, that's a lot of code for printing options. I understand it's hard to do > wrapping properly, but I'm not sure whether it makes sense for half of the > `Checker

[PATCH] D53024: [analyzer][www] Add more open projects

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Thanks, this looks great! https://reviews.llvm.org/D53024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D53274: [analyzer][NFC] Fix inconsistencies in AnalyzerOptions

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:354 +StringRef AnalyzerOptions::getOptionAsString(Optional &V, + StringRef Name, geo

[PATCH] D53024: [analyzer][www] Add more open projects

2018-10-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I dislike web development, but that would indeed be invaluable. I'll take a look. https://reviews.llvm.org/D53024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D53024: [analyzer][www] Add more open projects

2018-10-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Why d Comment at: clang/www/analyzer/open_projects.html:153 + problem still remains open. + + (Difficulty: Hard) Did you mean to have this newline here? Difficulty seems to have a weird placement when viewed in a browser.

[PATCH] D52742: [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flag

2018-10-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169858. Szelethus added a comment. Removed the version entry from the plist file. https://reviews.llvm.org/D52742 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/StaticAnalyzer/Core/AnalyzerOptions.cpp lib/StaticAnalyzer/Core/BugRepor

[PATCH] D52794: [analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and primitive expansion

2018-10-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169862. Szelethus added a comment. Herald added a subscriber: donat.nagy. - Removed the version entry from the plist file, - Now using `TokenConcatenation` to print spaces only when needed (this needed for https://reviews.llvm.org/D52988), - A bit more doc,

[PATCH] D52986: [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__

2018-10-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169869. Szelethus added a comment. Herald added a subscriber: dkrupp. Rebased to part 3. https://reviews.llvm.org/D52986 Files: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp test/Analysis/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist t

[PATCH] D52988: [analyzer][PlistMacroExpansion] Part 5.: Support for # and ##

2018-10-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 169871. Szelethus added a comment. Herald added a subscriber: dkrupp. This patch didn't really work, sometimes it printed extra spaces, sometimes printed the hash tokens, and so on, so I refactored the whole project to deal with this issue almost out of th

[PATCH] D52790: [analyzer][PlistMacroExpansion] New flag to convert macro expansions to events

2018-10-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: test/Analysis/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist:6 clang_version -clang version 8.0.0 (http://mainstream.inf.elte.hu/Szelethus/clang 80e1678b9f598ca78bb3b71cf546a63414a37b11) (https://github.com/llvm-mirro

<    1   2   3   4   5   6   >