[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-02-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Do we have a test where 2 containers are present but only one of them should be marked as interesting? void deref_end_after_pop_back(std::vector &V, std::vector &V2) { const auto i = --V.end(); const auto i2 = --V2.end(); V.pop_back(); // expected-not

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

2020-02-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. One of the things that stood out for me was the lack of the usage of the `check::BranchCondition` callback, but there you'd have to grind out whether it is relevant to a return value, so I'm probably wrong on that regard. So I guess I don't have any immediate high lev

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h:67-69 +/// Try to parse the value of a defined preprocessor macro. We

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

2020-02-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added reviewers: xazax.hun, Charusso, dcoughlin. Szelethus added a comment. Also, allow me to add a few other folks, because they are very active and knowledgeable individuals :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72705/new/ h

[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-02-12 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, I like everything here, you worded the notes very nicely and the test cases seems to cover everything I could find! Please wait for @NoQ's approval, since he's the ranking member o

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/test/Analysis/std-c-library-functions-eof.c:11 +// Unorthodox EOF value. +#define EOF (-2) + Maybe you could throw in a test where the definition isn't surrounded by parentheses? Repository: rG LLVM Github

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-13 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! Very nice! I think you can commit as you please, granted you add core checkers to the test `RUN:` lines. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibrar

[PATCH] D74473: [analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax

2020-02-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp:114-117 + const auto MacroIt = llvm::find_if( + PP.macros(), [&](const auto &K) { return K.first->getName() == Macro; }); + if (MacroIt == PP.macro_end()) +return llvm::None;

[PATCH] D71433: [analyzer] CERT: POS34-C

2020-02-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Herald added a subscriber: martong. I think for an alpha checker this is ready to land if you're ready -- do you have commit access or need assistance? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71433/new/ https://reviews.llvm.org/D71433 ___

[PATCH] D144003: [clang][analyzer] Improve bug reports of StdLibraryFunctionsChecker.

2023-03-28 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Please run this on open source projects and upload the results. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:164-166 +/// This function is called when the current constraint represents the +/// opposite of a co

[PATCH] D143751: [clang][analyzer][NFC] Refactor code of StdLibraryFunctionsChecker.

2023-02-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. A high level comment before getting into (even more) nitty gritty stuff. But shut me down if I misunderstood whats happening. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:124-125 // requirement would render the ini

[PATCH] D145069: [analyzer][NFC] Split the no state change logic and bug report suppression into two visitors

2023-03-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. We worked on this together, so I waited a bit for others to have a say in this, but this design seems like a no brainer to me. Please fix those comments, otherwise LGTM. Also, while the patch is LGTM (moving code around is okay), the comment says "system headers havi

[PATCH] D143751: [clang][analyzer][NFC] Refactor code of StdLibraryFunctionsChecker.

2023-03-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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143751/new/ https://reviews.llvm.org/D143751 _

[PATCH] D145069: [analyzer][NFC] Split the no state change logic and bug report suppression into two visitors

2023-03-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:449 // No diagnostic if region was modified inside the frame. if (!CallExitLoc || isModifiedInFrame(N)) return nullptr; We also lost this, unfortunately,

[PATCH] D152436: [clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha.

2023-06-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D152436#4432736 , @balazske wrote: > From these two solutions, which one is better? (Show many unnecessary notes, > or show only necessary ones but lose some of the useful notes too.) How likely are the problems with the 2n

[PATCH] D152436: [clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha.

2023-06-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D152436#4443858 , @balazske wrote: > In D152436#4438956 , @NoQ wrote: > >> I'm somewhat skeptical of the decision made in D151225 >> because the en

[PATCH] D153612: [clang][analyzer] Add and change NoteTags in StdLibraryFunctionsChecker.

2023-06-29 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. This is the quintessential example of a patch where while the test files look promising, we need some evaluation on the real world. I understand that its a chore -- but this is simply the nature of the beast. While the changes in the test file look promising. I'd be m

[PATCH] D144003: [clang][analyzer] Improve bug reports of StdLibraryFunctionsChecker.

2023-04-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. LGTM! Most of the diagnostic messages are short but precise. I like this very much. Well done! Balázs actually tested the change on open source projects, but accidentally uploaded it to our internal server, so I have seen them, and th

[PATCH] D151225: [clang][analyzer] Merge apiModeling.StdCLibraryFunctions and StdCLibraryFunctionArgs checkers into one.

2023-05-26 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. Ugh, yeah, so it has come to this. I championed my idea of granulalizing checkers into modeling and reporting components since what... 2018? I think the goal is still something to shoot

[PATCH] D143194: [clang][analyzer] Make messages of StdCLibraryFunctionsChecker user-friendly

2023-02-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. A small nit, otherwise LGTM. In D143194#4112538 , @balazske wrote: > Probably it is not always useful to explain why the argument is wrong. In > cases when we can find out that the value is exactly between two consecutive > v

[PATCH] D143194: [clang][analyzer] Make messages of StdCLibraryFunctionsChecker user-friendly

2023-02-14 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! Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:95 +QualType ArgT, BasicValueFactory &BVF, +

[PATCH] D143751: [clang][analyzer][NFC] Refactor code of StdLibraryFunctionsChecker.

2023-02-22 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Ugh, I admit, its a little hard to follow what happened here. You moved a lot of code around (I agree with that!), but also changed code as well. Can you just summarize what is NOT just moved code and needs a more thorough look? Comment at: clang/l

[PATCH] D144269: [Analyzer] Show "taint originated here" note of alpha.security.taint.TaintPropagation checker at the correct place

2023-02-23 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D144269#4143066 , @NoQ wrote: > The challenging part with note tags is how do you figure out whether your bug > report is taint-related. The traditional solution is to check the `BugType` > but in this case an indeterminate

[PATCH] D149447: [clang][analyzer] Improve documentation of StdCLibraryFunctionArgs checker (NFC)

2023-05-15 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added inline comments. This revision now requires changes to proceed. Comment at: clang/docs/analyzer/checkers.rst:2457 If the user disables the checker then the argument violation warning is suppressed. However, the assum

[PATCH] D149447: [clang][analyzer] Improve documentation of StdCLibraryFunctionArgs checker (NFC)

2023-05-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added inline comments. This revision is now accepted and ready to land. Comment at: clang/docs/analyzer/checkers.rst:2476-2477 +suppressed. However, the assumption about the argument is still modeled. +For instance, if the argument to a

[PATCH] D149321: [clang][analyzer] Display buffer sizes in StdCLibraryFunctionArgs checker

2023-04-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added reviewers: steakhal, gamesh411. Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. I am Szelethus, and I approve this warning message! Now, on another issue, if we can output such a thorough message, we should start to co

[PATCH] D149321: [clang][analyzer] Display buffer sizes in StdCLibraryFunctionArgs checker

2023-04-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:889 + State, getArgSVal(Call, ArgN))) +Out << " (that is " << *Val << ")"; +} I think this would be correct. Repository: rG LLVM Git

[PATCH] D152436: [clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha.

2023-06-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. > I am not sure about the exact requirements, this review can be a place for > discussion about what should be fixed (if any). D52984 added the "Making your checker better" section to the dev manual: https://clang-analyzer.llvm.org/c

[PATCH] D152436: [clang][analyzer] Move checker alpha.unix.StdCLibraryFunctions out of alpha.

2023-06-12 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D152436#4411912 , @steakhal wrote: > In D152436#4408811 , @balazske > wrote: > >> In D152436#4408301 , @steakhal >> wrote: >> >>> I looked

[PATCH] D135247: [clang][analyzer] Add stream functions to StdLibraryFunctionsChecker.

2022-12-05 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Do I understand correctly that for the time being, the strategy is to assume apiModeling to be enabled by default and not enforce it explicitly? I suppose I have the ol' reliable question: did you evaluate this on any project yet? In D135247#3839543

[PATCH] D135247: [clang][analyzer] Add stream functions to StdLibraryFunctionsChecker.

2022-12-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Sorry abour my previous reply, I messed up the thread I was replying to. I better see what is going on. Do you have a better handle on @martong's previous comment (D135247#3867603 )? Do we know why this strange behaviour occu

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-12-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D135360#3862260 , @martong wrote: > In D135360#3839890 , @balazske > wrote: > >> I found some anomalies during development: >> >> - If the checker **StdCLibraryFunctions** is added a

[PATCH] D137722: [clang][analyzer] No new nodes when bug is detected in StdLibraryFunctionsChecker.

2022-12-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:953 if (FailureSt && !SuccessSt) { - if (ExplodedNode *N = C.generateErrorNode(NewState)) + if (ExplodedNode *N = C.generateErrorNode(NewState, NewNode))

[PATCH] D135247: [clang][analyzer] Add stream functions to StdLibraryFunctionsChecker.

2022-12-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. The patch looks OK now, I'll get to inspecting the others. In D135247#3977403 , @balazske wrote: > The "strange" test failures that showed up earlier were probably caused by a > bug that is fixed in the D137722

[PATCH] D137790: [clang][analyzer] Remove report of null stream from StreamChecker.

2022-12-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. IIRC we talked about it would only really make sense to evaluate this patch stack as a whole, not piece by piece, but I'm not seeing results on open source projects here either. Can you please post them? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D137722: [clang][analyzer] No new nodes when bug is detected in StdLibraryFunctionsChecker.

2022-12-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:953 if (FailureSt && !SuccessSt) { - if (ExplodedNode *N = C.generateErrorNode(NewState)) + if (ExplodedNode *N = C.generateErrorNode(NewState, NewNode))

[PATCH] D137722: [clang][analyzer] No new nodes when bug is detected in StdLibraryFunctionsChecker.

2022-12-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:953 if (FailureSt && !SuccessSt) { - if (ExplodedNode *N = C.generateErrorNode(NewState)) + if (ExplodedNode *N = C.generateErrorNode(NewState, NewNode))

[PATCH] D135360: [clang][analyzer] Add some more functions to StreamChecker and StdLibraryFunctionsChecker.

2022-12-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D135360#3981420 , @balazske wrote: > My current approach is that the POSIX is more strict than the C standard > (POSIX allows a subset of what C allows). I do not see (errno related) > contradiction between these standards

[PATCH] D115521: [Templight] Don't display empty strings for names of unnamed template parameters

2022-01-24 Thread Kristóf Umann 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 rG3ad35ba4dea5: [Templight] Don't display empty strings for names of unnamed template parameters (authored by Szelethus). Changed prior to commit: h

[PATCH] D116597: [analyzer] Don't track function calls as control dependencies

2022-01-24 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 402549. Szelethus added a comment. Fix tests, mention that this is purely a heuristic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116597/new/ https://reviews.llvm.org/D116597 Files: clang/include/clang/Analysis/CFG.h clang/lib/Analysis/CFG

[PATCH] D116597: [analyzer] Don't track function calls as control dependencies

2022-02-01 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Ping ^-^ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116597/new/ https://reviews.llvm.org/D116597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D120325: [analyzer] Don't crash if the analyzer-constraint is set to Z3, but llvm is not built with it

2022-02-22 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, dkrupp, steakhal, martong, balazske. Szelethus added a project: clang. Herald added subscribers: ASDenysPetrov, gamesh411, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Szelethus requested r

[PATCH] D119128: [analyzer] Fix taint propagation by remembering to the location context

2022-02-22 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Can we reopen this if the code is not upstream at this time? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119128/new/ https://reviews.llvm.org/D119128 ___ cfe-commits mailing

[PATCH] D119004: [NFC][analyzer] Allow CallDescriptions to be matched with CallExprs

2022-02-23 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 410833. Szelethus marked 5 inline comments as done. Szelethus added a comment. Remove a newline. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119004/new/ https://reviews.llvm.org/D119004 Files: clang/include/clang/StaticAnalyzer/Core/PathSensi

[PATCH] D119004: [NFC][analyzer] Allow CallDescriptions to be matched with CallExprs

2022-02-23 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h:102-103 + /// Returns true if the CallEvent is a call to a function that matches + /// the CallDescription. + /// steakhal wrote: > NoQ wrot

[PATCH] D120325: [analyzer] Don't crash if the analyzer-constraint is set to Z3, but llvm is not built with it

2022-02-25 Thread Kristóf Umann 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 rG5048a58a6792: [analyzer] Don't crash if the analyzer-constraint is set to Z3, but llvm is not… (authored by Szelethus). Changed prior to commit: h

[PATCH] D119004: [NFC][analyzer] Allow CallDescriptions to be matched with CallExprs

2022-03-01 Thread Kristóf Umann 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 rG32ac21d04909: [NFC][analyzer] Allow CallDescriptions to be matched with CallExprs (authored by Szelethus). Repository: rG LLVM Github Monorepo CH

[PATCH] D118880: [analyzer] Improve NoOwnershipChangeVisitor's understanding of deallocators

2022-03-03 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd832078904c6: [analyzer] Improve NoOwnershipChangeVisitor's understanding of deallocators (authored by Szelethus). Herald added a project: All. Changed prior to commit: https://reviews.llvm.org/D118880

[PATCH] D120992: [analyzer] ReverseNull: New checker to warn for pointer value conditions, if the pointer value is unconditionally non-null

2022-03-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, steakhal, xazax.hun, balazske, martong. Szelethus added a project: clang. Herald added subscribers: manas, ASDenysPetrov, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, mgorny. Herald

[PATCH] D120992: [analyzer] ReverseNull: New checker to warn for pointer value conditions, if the pointer value is unconditionally non-null

2022-03-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/NullPtrInterferenceChecker.cpp:166 +/// child is a sink node. +static bool unconditionallyLeadsHere(const ExplodedNode *N) { + size_t NonSinkNodeCount = llvm::count_if( xazax.hun wrot

[PATCH] D120992: [analyzer] ReverseNull: New checker to warn for pointer value conditions, if the pointer value is unconditionally non-null

2022-03-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D120992#3364804 , @NoQ wrote: > This check checks must-properties/all-paths properties. This has to be a data > flow / CFG-based warning. I don't think there's a way around. Oof. I concede on that. Do you think there is any

[PATCH] D115521: [Templight] Don't display empty strings for names of unnamed template parameters

2022-01-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 397054. Szelethus added a comment. Add a default text, if another, unhandled unnamed identifier pops up. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115521/new/ https://reviews.llvm.org/D115521 Files: clang/lib/Frontend/FrontendActions.cpp

[PATCH] D115716: [Analyzer][BugReporter] Replace the example bug report with the one used to generate PathDiagnostic

2022-01-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. First off, your patch is great, and I'm pretty sure we want it! I remember working around here, and I either have never quite understood what makes `exampleReport` an example, or have long forgotten. Can we not just rename it to `chosenReport`, or simply `report`?

[PATCH] D115716: [Analyzer][BugReporter] Replace the example bug report with the one used to generate PathDiagnostic

2022-01-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:76 + std::unique_ptr> { + const BugReport *Report = nullptr; +}; Some comments about this field would be welcome! ===

[PATCH] D116597: [analyzer] Don't track function calls as control dependencies

2022-01-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: dkrupp, NoQ, steakhal, gamesh411, martong, balazske. Szelethus added a project: clang. Herald added subscribers: manas, ASDenysPetrov, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, kristof.beyls, xazax.hun.

[PATCH] D115521: [Templight] Don't display empty strings for names of unnamed template parameters

2022-01-11 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/Frontend/FrontendActions.cpp:501 + +if (const auto *Decl = dyn_cast(NamedTemplate)) { + if (const auto *R = dyn_cast(Decl)) { Szelethus wrote: > martong wrote: > > martong wrote: > > > Should this ha

[PATCH] D115521: [Templight] Don't return string for name for unnamed template parameters

2021-12-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: sabel83, xazax.hun, rsmith, whisperity, martong, mikael-s-persson, mclow.lists. Szelethus added a project: clang. Herald added subscribers: steakhal, gamesh411, dkrupp, rnkovacs. Szelethus requested review of this revision. Herald added a

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-08-25 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, martong, balazske, vsavchenko, steakhal, ASDenysPetrov. Szelethus added a project: clang. Herald added subscribers: manas, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun,

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-08-25 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I also added new dump methods -- I had a trouble before realizing that `CallEnter`'s stack frame is actually the *caller's*, not the *callee's* stack frame. Changes in `findModifyingFrames` aim to make the function more readable, and make sure that the correct stack f

[PATCH] D108753: [analyzer] MallocChecker: Add notes from NoOwnershipChangeVisitor only when a function "intents", but doesn't change ownership, enable by default

2021-08-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, martong, steakhal, balazske, ASDenysPetrov, vsavchenko. Szelethus added a project: clang. Herald added subscribers: manas, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun,

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-08-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D108695#2967540 , @NoQ wrote: > Would this work correctly when the property is changed but then reverted to > its original state? This probably can't happen to MallocChecker (what has > been freed cannot be unfreed) but it

[PATCH] D108912: [release][analyzer] Add 13.0.0 release notes

2021-08-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: tstellar, NoQ, vsavchenko, dcoughlin, RedDocMD, xazax.hun, baloghadamsoftware, martong, balazske, steakhal, dkrupp, gamesh411, ASDenysPetrov. Szelethus added a project: clang. Herald added subscribers: manas, donat.nagy, mikhail.ramalho,

[PATCH] D108912: [release][analyzer] Add 13.0.0 release notes

2021-08-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/docs/ReleaseNotes.rst:294 --- +- Add a new analyzer output type, ``sarif-html``, that outputs both HTML and Oops, should add this comment before commiting. ```lang=sphinx .. 2407eb08a574 [analyzer

[PATCH] D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream .

2021-08-31 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D106262#2939532 , @balazske wrote: > Really I still not understand why the previous `BugType` dependent `NoteTag` > functions were bad design (except that it could make the code difficult to > understand). If we would have

[PATCH] D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream .

2021-08-31 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. We had a meeting outside phabricator, here is the gist of it: - It'd be better to have your initially proposed schrödinger-like `NoteTag`s. - The intent is to emit a warning for each of the error states in `StreamState`. It seems to me that this is not what we're doing

[PATCH] D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream .

2021-09-01 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I like that! Though for now, any tests that displays how these notes can emit different messages for different `BugType`s will suffice, so we can bypass other design discussions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-01 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 369935. Szelethus marked 5 inline comments as done. Szelethus added a comment. Herald added a subscriber: mgorny. - Make sure that the matching CallExitEnd is retrieved. - Add a unit test to neatly demonstrate how the visitor is intended to be used. - Fix th

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-01 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/BugReporterVisitors.cpp:361 + while (!SCtx->inTopFrame()) { +auto p = FramesModifying.insert(SCtx); +if (!p.second) martong wrote: > Wh

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:683-685 + /// between \p CallEnterN and \p CallExitEndN. Mind that the stack frame + /// retrieved from a CallEnter is the *caller's* stack frame! The inlined

[PATCH] D108753: [analyzer] MallocChecker: Add notes from NoOwnershipChangeVisitor only when a function "intents", but doesn't change ownership, enable by default

2021-09-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:281-288 /// Tells if the callee is one of the builtin new/delete operators, including /// placement operators and other standard overloads. static bool isStandardNewDelete(const Fu

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-02 Thread Kristóf Umann 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 rG7d0e62bfb773: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire… (authored by Szelethus). Changed prior to commit: https:

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-03 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa375bfb5b729: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire… (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D108695?vs=370274&id=370549#toc Repo

[PATCH] D108753: [analyzer] MallocChecker: Add notes from NoOwnershipChangeVisitor only when a function "intents", but doesn't change ownership, enable by default

2021-09-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 370553. Szelethus added a comment. indent->intent CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108753/new/ https://reviews.llvm.org/D108753 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/lib/StaticAnalyzer/Checkers/Mall

[PATCH] D108912: [release][analyzer] Add 13.0.0 release notes

2021-09-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 370561. Szelethus added a comment. Fixes according to reviewer comments, cheers! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108912/new/ https://reviews.llvm.org/D108912 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes.rst

[PATCH] D108912: [release][analyzer] Add 13.0.0 release notes

2021-09-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D108912#2972167 , @steakhal wrote: > Maybe a couple other noteworthy commits: > efa7df1682c2859dabe3646ee7dc01e68629417f > : better > R-value tracking. >

[PATCH] D108912: [release][analyzer] Add 13.0.0 release notes

2021-09-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 370564. Szelethus added a comment. In D108912#2982169 , @RedDocMD wrote: > I suppose that the `SmartPtrModelling` patches from GSoC this year shouldn't > be added since they only involve an alpha checker. It would

[PATCH] D108912: [release][analyzer] Add 13.0.0 release notes

2021-09-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added a comment. Comment at: clang/docs/ReleaseNotes.rst:300-304 +.. 90377308de6c [analyzer] Support allocClassWithName in OSObjectCStyleCast checker + +- Add support for ``allocClassWithName`` in OSObjectCStyleCast checke

[PATCH] D108912: [release][analyzer] Add 13.0.0 release notes

2021-09-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D108912#2982169 , @RedDocMD wrote: > I suppose that the `SmartPtrModelling` patches from GSoC this year shouldn't > be added since they only involve an alpha checker. Actually, you also patched the enabled-by-default modeli

[PATCH] D108753: [analyzer] MallocChecker: Add notes from NoOwnershipChangeVisitor only when a function "intents", but doesn't change ownership, enable by default

2021-09-08 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D108753#2988632 , @NoQ wrote: > This looks good! > > I guess one way to make this //even more// conservative would be to match the > variable inside the delete-expression to the one we expect to get deallocated. Yeah, I tho

[PATCH] D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream .

2021-09-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I like everything I see here so far! As soon as those debug functions are in, the patch should land! Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:236-240 + /// At any stream operation that can cause (multiple type of) bugs, we can

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-13 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0213d7ec0c50: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire… (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D108695?vs=370549&id=372217#toc Repo

[PATCH] D108753: [analyzer] MallocChecker: Add notes from NoOwnershipChangeVisitor only when a function "intents", but doesn't change ownership, enable by default

2021-09-13 Thread Kristóf Umann 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 rG9d359f6c7386: [analyzer] MallocChecker: Add notes from NoOwnershipChangeVisitor only when a… (authored by Szelethus). Repository: rG LLVM Github M

[PATCH] D108912: [release][analyzer] Add 13.0.0 release notes

2021-09-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Gonna land this in a day or two, regardless of whether its accepted! Please take a look if you have anything to object to! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108912/new/ https://reviews.llvm.org/D108912

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I'll attend to this ASAP. Thanks for the heads up! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108695/new/ https://reviews.llvm.org/D108695 ___ cfe-commits mailing list cfe-c

[PATCH] D108695: [analyzer][NFCI] Allow clients of NoStateChangeFuncVisitor to check entire function calls, rather than each ExplodedNode in it

2021-09-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. rGfb4d590a622f4031900516360c07ee6ace01c5e6 should sort this out! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108695/new/ https://reviews.llvm.org/D

<    11   12   13   14   15   16