[PATCH] D77305: [Analyzer][VLASize] Support multi-dimensional arrays.

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. It would be great to see a test about properly setting the arrays extent. Otherwise LGTM. Comment at: clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp:61 + // warned about that already. + // FIXME: report bug? + if (SizeV.isUnknown())

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM, let's go! Thank you so much for sticking this out! Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:42-51 /// The error state of a stream. + //

[PATCH] D77551: [analyzer] Fix NSErrorChecker false positives

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/test/Analysis/SpecialFunctionsCFError.cpp:2 +// RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.coreFoundation.CFError \ +// RUN: -analyzer-store=region -verify %s + NoQ wrote: > `-analyzer-store=region` is

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:455 +def StreamTesterChecker : Checker<"StreamTester">, + HelpText<"Add test functions to StreamChecker for test and debugging purposes.">, NoQ wrote: > This

[PATCH] D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:647-653 CmdLineOption ]>, Szelethus wrote: > NoQ wrote: > > baloghadamsoftware wrote: > > > Szelethus wrote: > > > > Ah, okay, I see which one you refer t

[PATCH] D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Please mind that my inline is NOT an objection to this patch. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:647-653 CmdLineOption ]>, NoQ wrote: > baloghadamsoftware wrote: > > Szelethus wrote: > > > Ah,

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-04-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:26-28 +#define ASSERT_STREAMSTATE_OPENED \ + assert(SS->isOpened() && \ + "

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-04-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. Whoo! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75682/new/ https://reviews.llvm.org/D75682 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D76605: [analyzer] Display the checker name in the text output

2020-04-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 255668. Szelethus marked 8 inline comments as done. Szelethus added a comment. Fixing according to the reviews! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76605/new/ https://reviews.llvm.org/D76605 Files: clang/include/clang/StaticAnalyzer/C

[PATCH] D76605: [analyzer] Display the checker name in the text output

2020-04-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp:112 reportPiece(NoteID, Piece->getLocation().asLocation(), -Piece->getString(), Piece->getRanges(), Piece->getFixits()); +Piece->getStr

[PATCH] D75851: [Analyzer][StreamChecker] Added evaluation of fseek.

2020-04-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. In D75851#1933538 , @balazske wrote: > Simplified code. I can tell! The patch is amazing, the code practically reads itself aloud. I have some inlines but nothing major, the high lev

[PATCH] D77641: [analyzer] StdLibraryFunctionsChecker: Associate summaries to FunctionDecls

2020-04-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM! Its always a joy to see you do C++. I suspect your change made compiler errors a bit nicer as well, so you don't get one giant "Well, this huge single argument doesn't look mat

[PATCH] D77641: [analyzer] StdLibraryFunctionsChecker: Associate summaries to FunctionDecls

2020-04-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Also, if you gave a bit of time for anyone else to have a say, that might be nice. :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77641/new/ https://reviews.llvm.org/D77641 __

[PATCH] D77722: [analyzer] Do not report NSError null dereference for _Nonnull params

2020-04-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D77722#1969261 , @vsavchenko wrote: > Hi everyone! > I'm thinking about adding support for `__attribute((nonnull))__` as well, > but it should be handled a bit differently. That annotation is for parameters > and not for ty

[PATCH] D77305: [Analyzer][VLASize] Support multi-dimensional arrays.

2020-04-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM, thanks! I'm not terribly knowledgable about VLAs, if someone else would gave a green light it would be even better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D76605: [analyzer] Display the checker name in the text output

2020-04-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D76605#1969535 , @martong wrote: > I was just wondering if it would make sense to have a test with > `display-checker-name=true`. Other than that, LGTM! Could do! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D75851: [Analyzer][StreamChecker] Added evaluation of fseek.

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM! You seem to have a firm grasp on where you want this checker to go, and I like everything about it. The code needs seme `clang-format` treatment, and another eye might not hurt, b

[PATCH] D77792: [analyzer] Extend constraint manager to be able to compare simple SymSymExprs

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. You seem to have forgotten `-U` :^) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77792/new/ https://reviews.llvm.org/D77792 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D77391: [analyzer][AnalysisOrder] Display the CallEvent type for preCall/postCall

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/test/Analysis/Inputs/system-header-simulator-cxx.h:971-972 #else -void* operator new(std::size_t, const std::nothrow_t&) throw(); -void* operator new[](std::size_t, const std::nothrow_

[PATCH] D76605: [analyzer] Display the checker name in the text output

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa2b6ece1fd4e: [analyzer] Display the checker name in the text output (authored by Szelethus). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76605/new/ https

[PATCH] D77391: [analyzer][AnalysisOrder] Display the CallEvent type for preCall/postCall

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:202 virtual Kind getKind() const = 0; + virtual StringRef getKindAsString() const = 0; NoQ wrote: > M

[PATCH] D77391: [analyzer][AnalysisOrder] Display the CallEvent type for preCall/postCall

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Szelethus marked an inline comment as done. Closed by commit rG023c4d400ef5: [analyzer][AnalysisOrderChecker] Display the CallEvent type in preCall/postCall (authored by Szelethus). Changed prior to commit: https://review

[PATCH] D77809: [Analyzer] Include typedef statements in CFG build.

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D77809#1972232 , @martong wrote: > There must be a way to dump the CFG. Perhaps you could add a test that dumps > the CFG of a given source and then by using `FileCheck` we could see the > exact feature that is missing. `d

[PATCH] D77845: [analyzer][CallAndMessage][NFC] Change old callbacks to rely on CallEvent

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, baloghadamsoftware, balazske, martong, rnkovacs, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sid

[PATCH] D77846: [analyzer][CallAndMessage][NFC] Split up checkPreCall

2020-04-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, balazske, martong, baloghadamsoftware, rnkovacs, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sid

[PATCH] D77866: [analyzer][CallAndMessage] Add checker options for each bug category

2020-04-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, baloghadamsoftware, xazax.hun, rnkovacs, dcoughlin, martong, balazske. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sid

[PATCH] D77062: [analyzer] Added check for unacceptable equality operation between Loc and NonLoc types

2020-04-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D77062#1959286 , @ASDenysPetrov wrote: > @Szelethus , @NoQ please, look at my solution. I'm not sure if it is correct, > but it actually passes all the tests and throw off the issue. Sorry for the late answer, I've been ki

[PATCH] D78097: [analyzer][RetainCount] Remove the CheckOSObject option

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, vsavchenko, martong, baloghadamsoftware, xazax.hun, balazske, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.s

[PATCH] D78101: [analyzer][StackAddressEscape] Tie warnings to the diagnostic checkers rather then core.StackAddrEscapeBase

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, dcoughlin, baloghadamsoftware, balazske, martong. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnko

[PATCH] D77809: [Analyzer] Include typedef statements in CFG build.

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D77809#1979911 , @balazske wrote: > I looked at the graphical CFG dump and observed that the added code makes the > same parts appear that are there in a VLA declaration but missing if a VLA > typedef is used. Could add a

[PATCH] D78120: [analyzer][StreamChecker] Don't make StreamTestChecker depend on StreamChecker for the time being

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: balazske, NoQ, xazax.hun, baloghadamsoftware, dcoughlin, martong. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnko

[PATCH] D78123: [analyzer][NSOrCFError] Don't emit diagnostics under the name osx.NSOrCFErrorDerefChecker

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, vsavchenko, dcoughlin, martong, xazax.hun, balazske, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.s

[PATCH] D78121: [analyzer][DirectIvarAssignment] Turn DirectIvarAssignmentForAnnotatedFunctions into a checker option

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, dcoughlin, vsavchenko, martong, balazske, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnk

[PATCH] D78122: [analyzer][Nullability] Don't emit under the checker name NullabilityBase

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, vsavchenko, dcoughlin, martong, balazske, baloghadamsoftware, xazax.hun. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.s

[PATCH] D78124: [analyzer][ObjCGenerics] Don't emit diagnostics under the name core.DynamicTypePropagation

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, vsavchenko, dcoughlin, martong, balazske, xazax.hun, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.s

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, baloghadamsoftware, martong, balazske, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnko

[PATCH] D78122: [analyzer][Nullability] Don't emit under the checker name NullabilityBase

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Its worth mentioning that the reason I went out of my way not to change the name associated with reports from `CallAndMessage`, but I changed all of them here is that `NullabilityBase` is not a user-facing checker. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D75430: [analyzer][NFC] Introduce CXXDeallocatorCall, deploy it in MallocChecker

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Just a gentle ping :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75430/new/ https://reviews.llvm.org/D75430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D78118: [analyzer] StdLibraryFunctionsChecker: Add option to display loaded summaries

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. This is a great idea, but the tests just seem to, well, test the new functionality? On a different issue, take a look at how certain help related frontend flags (not `-analyzer-config` ones!) skip the analysis, like `-analyzer-checker-help`, or `-analyzer-list-enable

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-04-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:153 +#undef CHECKER_DEPENDENCY +#undef GET_CHECKER_DEPENDENCIES + } balazske wrote: > Probably too much of

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-04-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:153 +#undef CHECKER_DEPENDENCY +#undef GET_CHECKER_DEPENDENCIES + } Szelethus wrote: > balazske wrote: > >

[PATCH] D77148: [analyzer] ApiModeling: Add buffer size arg constraint with multiplier involved

2020-04-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:229-234 BufferSizeConstraint(ArgNo BufArgN, ArgNo SizeArgN) : ValueConstraint(BufArgN), SizeArgN(SizeArgN) {} +BufferSizeConstraint(ArgNo BufArgN, Ar

[PATCH] D77658: [analyzer] StdLibraryFunctionsChecker: Add sanity checks for constraints

2020-04-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. The idea is noble with the addition of `validate` functions, assert in debug builds and just move on in release. However, I'd expect it to be integrated into the signature matching function. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryF

[PATCH] D77809: [Analyzer] Include typedef statements in CFG build.

2020-04-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added reviewers: NoQ, xazax.hun. Szelethus added a subscriber: NoQ. Szelethus added a comment. Herald added a subscriber: rnkovacs. Adding @NoQ and @xazax.hun , I don't have much experience building CFGs. Comment at: clang/lib/Analysis/CFG.cpp:2855 + VarDecl *VD =

[PATCH] D77062: [analyzer] Added check for unacceptable equality operation between Loc and NonLoc types

2020-04-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D77062#1977613 , @ASDenysPetrov wrote: > I've investigated graph.dot of the sample. F11723847: tmp63ucwe5i.html > This is the exploded graph for which code? The t37503.cpp file you uplo

[PATCH] D78099: [analyzer][RetainCount] Tie diagnostics to osx.cocoa.RetainCount rather then RetainCountBase, for the most part

2020-04-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp:1500 +RefCountBug::KIND); + // TODO: Ideally, we should have a checke

[PATCH] D77866: [analyzer][CallAndMessage] Add checker options for each bug category

2020-04-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D77866#1983690 , @martong wrote: > In D77866#1983685 , @martong wrote: > > > Looks good to me! > > > Just take care of the failures you have with harbourmaster, there seem to be > CSA

[PATCH] D80699: [Analyzer][StreamChecker] Add check for pointer escape.

2020-06-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:439-441 + // Do not handle untracked stream. It is probably escaped. + if (!State->get(StreamSym)) +return; How does this interact with D78280? ==

[PATCH] D80725: [Analyzer][StreamChecker] Updated initialization of BugType's.

2020-06-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Yay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80725/new/ https://reviews.llvm.org/D80725 _

[PATCH] D78280: [Analyzer][StreamChecker] Track streams that were not found to be opened.

2020-06-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:36 + /// (False if the stream was first encountered in a non-opening function.) + bool OpenEncountered; baloghadamsoftware wrote: > Maybe `SawOpened` or `Explicit

[PATCH] D80699: [Analyzer][StreamChecker] Add check for pointer escape.

2020-06-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a reviewer: NoQ. Szelethus added a subscriber: NoQ. Szelethus added a comment. @NoQ @baloghadamsoftware Escapes are more within your realm of expertise. Anything to add? From my end, this looks okay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D80210: [analyzer] Turn off reports in system headers

2020-06-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Sounds nice. @bruntib, would this be sufficient for the user's request? Are we sure that the actual request makes sense in light of the analyzer's viewpoint? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80210/new/ https

[PATCH] D80905: [analyzer] Introduce weak dependencies to express *preferred* checker callback evaluation order

2020-06-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added a comment. Gentle ping Comment at: clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td:141-142 +/// Describes preferred registration and evaluation order in between checkers. +/// Unlike strong dependencies, thi

[PATCH] D81315: [analyzer][Draft] [Prototype] warning for default constructed unique pointer dereferences

2020-06-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Best of luck on your GSoC! I don't have much else to add to your patch, but you seem to have made good progress already! In D81315#2078043 , @xazax.hun wrote: > some folks have automated scripts based on that tag to add themsel

[PATCH] D80905: [analyzer] Introduce weak dependencies to express *preferred* checker callback evaluation order

2020-06-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 3 inline comments as done. Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td:141-142 +/// Describes preferred registration and evaluation order in between checkers. +/// Unlike strong dependencies, this expres

[PATCH] D81407: [Analyzer][StreamChecker] Add note tags for file opening.

2020-06-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. > If there are multiple resource leak paths for the same stream, only one wil > be reported. What is the rationale behind this? Do all leaks from the same opening describe the same kind of error? Is this based on observations on a codebase? I'm not against it -- but

[PATCH] D81567: [analyzer] SATest: Introduce a single entrypoint for regression scripts

2020-06-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I failed to follow much of this project so my question may be dumb -- but have you considered other run comparing tools such as csa-testbench (https://github.com/Xazax-hun/csa-testbench) and CodeChecker? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D81407: [Analyzer][StreamChecker] Add note tags for file opening.

2020-06-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a reviewer: xazax.hun. Szelethus added a comment. Herald added a subscriber: rnkovacs. Alright, I'm sold. How about we add a checker option for it? I don't actually insist, just an idea. @xazax.hun, how has this feature played out? Comment at: clang/lib/StaticA

[PATCH] D78122: [analyzer][Nullability] Don't emit under the checker name NullabilityBase

2020-06-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. @NoQ Have you unearthed anything on this matter? Do I need to step in/revert? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78122/new/ https://reviews.llvm.org/D78122 ___ cfe

[PATCH] D81407: [Analyzer][StreamChecker] Add note tags for file opening.

2020-06-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D81407#2087624 , @balazske wrote: > - Report every path of resource leak. I thought we agreed on the uniqueing being great? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81407

[PATCH] D80901: [analyzer][NFC] Change checker dependency unit tests to check for the registration order

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I hesitated on whether to make a revision out of this rather than just committing it -- its nothing clever and is clearly superior the the previous state of the file. I hope you don't mind if I commit this as-is. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D80901: [analyzer][NFC] Change checker dependency unit tests to check for the registration order

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGd61b1f8534c6: [analyzer][NFC] Change checker dependency unit tests to check for the… (authored by Szelethus). Repository:

[PATCH] D80905: [analyzer] Introduce weak dependencies to express *preferred* checker callback evaluation order

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG33fb9cbe211d: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D78126?vs=262387&id=270372#toc Repository:

[PATCH] D81745: [analyzer][MallocChecker] PR46253: Correctly recognize standard realloc

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, hokein, baloghadamsoftware, balazske, xazax.hun, dcoughlin, vsavchenko, martong. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.rama

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

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, vsavchenko, dcoughlin, martong, balazske, baloghadamsoftware, xazax.hun. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.s

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:43 #include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h" +#include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h" #include "llv

[PATCH] D81752: Revert "[analyzer][NFC] Don't allow dependency checkers to emit diagnostics"

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. Yup, I agree. Detailed my answer here a bit: D78126#inline-751477 . Thanks for taking initiative! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D81761: [analyzer] Force dependency checkers to be hidden

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, vsavchenko, dcoughlin, xazax.hun, balazske, martong, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.s

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus reopened this revision. Szelethus added a comment. This revision is now accepted and ready to land. Reverted in rGe64059828f19f629081220bffeb3ef7582870111 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D81407: [Analyzer][StreamChecker] Add note tags for file opening.

2020-06-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I'd still like to see more `NoteTag`s such as "File read failed, end-of-file indicator set on 'F'", and a final evaluation would be nice, but otherwise this checker looks amazing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D81745: [analyzer][MallocChecker] PR46253: Correctly recognize standard realloc

2020-06-16 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1614e3540827: [analyzer][MallocChecker] PR46253: Correctly recognize standard realloc (authored by Szelethus). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D81761: [analyzer] Force dependency checkers to be hidden

2020-06-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D81761#2097561 , @balazske wrote: > My observation is, if there is an example checker, it should be really > "example" and not "test". (The "custom" is probably good to rename to "test" > but not the "example".) (The names o

[PATCH] D81407: [Analyzer][StreamChecker] Add note tags for file opening.

2020-06-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus marked 2 inline comments as done. Szelethus added a comment. This revision is now accepted and ready to land. Yay! Getting so close to enabling this by default. I'm a big fan of your work on this checker. Comment at: clang/lib/Static

[PATCH] D81407: [Analyzer][StreamChecker] Add note tags for file opening.

2020-06-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Balázs, could you please add the checker option within this patch? If we find that the option works well (removes a lot of useless reports) I'd be happy to help implement that uniqueing pass. CmdLineOption, Comment at: clang/lib/StaticAnalyzer/Ch

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

2020-07-01 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. The changes proposed in mailing list thread (http://lists.llvm.org/pipermail/cfe-dev/2020-June/066017.html) seem ortogonal to this change. Sorry for the slack today, I just peeked around in MallocChecker to look for conflicts, but it

[PATCH] D81315: [analyzer] Warning for default constructed unique pointer dereferences

2020-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I only looked at the checker naming issue, and that seems to have been resolved perfectly, thanks! :) Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:582 + "false", + InAlpha>, + ]>,

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

2020-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 275378. Szelethus marked 6 inline comments as done. Szelethus added a comment. Small fixes according to reviewer comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82585/new/ https://reviews.llvm.org/D82585 Files: clang/include/clang/Stati

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

2020-07-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/CheckerRegistryData.h:216 + /// This output is not intended to be machine-parseable. + void printCheckerWithDescList(const AnalyzerOptions &AnOpts, raw_ostream &Out, +

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

2020-07-04 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb6cbe6cb0399: [analyzer][NFC] Move the data structures from CheckerRegistry to the Core… (authored by Szelethus). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D81315: [analyzer] Warning for default constructed unique pointer dereferences

2020-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM! You packed a lot of punch into this patch, and I like it very much. I read the code and everything looks great. I nitpicked on one thing, the `updateTrackedRegion` function is a bi

[PATCH] D81761: [analyzer] Force dependency checkers to be hidden

2020-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG690ff37a2869: [analyzer] Force dependency checkers to be hidden (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D81761?vs=274466&id=275651#toc Repository: rG LLVM Github Mo

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb2956076976c: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D78126?vs=270372&id=275687#toc Repository:

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

2020-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcfd6b4b811aa: [analyzer] Don't allow hidden checkers to emit diagnostics (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D81750?vs=270447&id=275697#toc Repository: rG LLVM

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

2020-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I'm on it! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82585/new/ https://reviews.llvm.org/D82585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

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

2020-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D82585#2133260 , @teemperor wrote: > Fixed here to get the bot running again: > https://github.com/llvm/llvm-project/commit/7308e1432624f02d4e652ffa70e40d0eaa89fdb3 Thank you so much! Kind of ironic considering that this en

[PATCH] D81761: [analyzer] Force dependency checkers to be hidden

2020-07-07 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG690ff37a2869: [analyzer] Force dependency checkers to be hidden (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D81761?vs=274466&id=275598#toc Repository: rG LLVM Github Mo

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-07-07 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb2956076976c: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D78126?vs=270372&id=275605#toc Repository:

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

2020-07-07 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcfd6b4b811aa: [analyzer] Don't allow hidden checkers to emit diagnostics (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D81750?vs=270447&id=275607#toc Repository: rG LLVM

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-07-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. After reading @martong's comment D72705#2035844 and @balazske's comment D72705#2086994 , I think there is a need to argue across all paths of execution within the function, and as such

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

2020-07-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:275-276 } else if (isRandomIncrOrDecrOperator(OK)) { +if (!BO->getRHS()->getType()->isIntegralOrEnumerationType()) + return; handlePtrIncrOrDecr(C, BO->getLHS(), -

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

2020-07-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def:48-50 #ifndef ANALYZER_OPTION_DEPENDS_ON_USER_MODE /// Create a new analyzer option, but dont generate a method for it in /// AnalyzerOptions. It's value depends on the opt

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

2020-07-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I don't like this solution t much, but I respect the urgency, and since we don't introduce a compatibility issue, I trust we can remove this if we decide to change to TableGen. Post-commit LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D83407: [analyzer][StdLibraryFunctionsChecker] Add POSIX networking functions

2020-07-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:1735-1747 + if (!addToFunctionSummaryMap( + "accept", Summary(ArgTypes{IntTy, *StructSockaddrPtrRestrictTy, + *

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

2020-07-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. LGTM, but if we knowingly a subpar solution, we should make that clear in the surrounding code. I know the followup patch is around the corner, but just to be sure. Comment at: clang/lib/StaticAnalyzer/Checkers/Iter

[PATCH] D83407: [analyzer][StdLibraryFunctionsChecker] Add POSIX networking functions

2020-07-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:1735-1747 + if (!addToFunctionSummaryMap( + "accept", Summary(ArgTypes{IntTy, *StructSockaddrPtrRestrictTy, + *

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D72705#2143405 , @balazske wrote: > We must check on every execution path that a specific condition on a value is > satisfied (or: find one where the condition is not satisfied). This would be > the most simple form of this

[PATCH] D83120: [Analyzer][StreamChecker] Using BugType::SuppressOnSink at resource leak report.

2020-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a reviewer: NoQ. Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM! Though, the test file change is interesting. You could add a test that behaves differently from the previous implementation: { FILE *f = fope

[PATCH] D82845: [Analyzer][StreamChecker] Report every leak, clean up state.

2020-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. I'd prefer if you moved `f_leak_2` to `stream-notes.c`. Otherwise, LGTM. Comment at: clang/test/Analysis/stream.c:147-150 + FILE *p1 = fopen("foo1.c", "r"); + if (!p1

[PATCH] D83115: [Analyzer] Report every bug if only uniqueing location differs.

2020-07-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added reviewers: NoQ, vsavchenko, xazax.hun, martong. Szelethus added a subscriber: NoQ. Szelethus added inline comments. Comment at: clang/lib/Analysis/PathDiagnostic.cpp:1136-1137 ID.Add(getLocation()); + ID.Add(getUniqueingLoc()); + ID.AddPointer(getUniqueingLoc

<    4   5   6   7   8   9   10   11   12   13   >