[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-08-19 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:306 + + if (From->isMemberPointerType() || To->isMemberPointerType()) return false; PiotrZSL wrote: > isuckatcs wrote: > > isuckatcs wrote: > > >

[PATCH] D153298: [clang-tidy] Extend bugprone-exception-escape diagnostics

2023-08-19 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:542 + CaughtExceptions)) { + CaughtExceptions.emplace(CaughtType, SourceLocation()); ExceptionInfo Rethrown =

[PATCH] D153298: [clang-tidy] Extend bugprone-exception-escape diagnostics

2023-08-19 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp:88 + + for (auto [ThrowType, ThrowLoc] : AnalyzeResult.getExceptionTypes()) +diag(ThrowLoc, "may throw %0 here", DiagnosticIDs::Note)

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-08-19 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:306 + + if (From->isMemberPointerType() || To->isMemberPointerType()) return false; isuckatcs wrote: > PiotrZSL wrote: > > isuckatcs wrote: > > >

[PATCH] D153458: [clang-tidy] Model noexcept more properly in bugprone-exception-escape

2023-06-23 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:319 +static bool cannotThrow(const FunctionDecl *Func) { + const auto *FunProto = Func->getType()->getAs(); Put this in the anonymous namespace above please

[PATCH] D153423: [clang-tidy] Allow explicit throwing in bugprone-exception-escape for special functions

2023-06-23 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. Apart from some nits I think this patch looks good. Comment at: clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp:26 + +AST_MATCHER(FunctionDecl, isExplicitThrow) { + switch (Node.getExceptionSpecType()) { How about

[PATCH] D153298: [clang-tidy] Extend bugprone-exception-escape diagnostics

2023-06-23 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:390 for (const Type *T : TypesToDelete) -ThrownExceptions.erase(T); +ThrownExceptions.erase({T, SourceLocation()}); PiotrZSL wrote: > isuckatcs

[PATCH] D153298: [clang-tidy] Extend bugprone-exception-escape diagnostics

2023-06-19 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp:84-86 + if (AnalyzeResult.containsUnknownElements()) +diag(MatchedDecl->getLocation(), "may throw unknown exceptions", + DiagnosticIDs::Note);

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-06-11 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:306 + + if (From->isMemberPointerType() || To->isMemberPointerType()) return false; PiotrZSL wrote: > isuckatcs wrote: > > isuckatcs wrote: > > >

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-06-07 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:306 + + if (From->isMemberPointerType() || To->isMemberPointerType()) return false; isuckatcs wrote: > Please cover this line with both positive

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-05-22 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. Please cover the changes in as much test cases as possible. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:151 +bool isFunctionTypeEqual(const FunctionType *From, const FunctionType *To) { + if (From == To)

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

2023-05-20 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, baloghadamsoftware. Herald added a project: All. Comment at:

[PATCH] D46415: [analyzer] pr36458: Fix retrieved value cast for symbolic void pointers.

2023-05-20 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho. Herald added a project: All. Comment at: test/Analysis/casts.c:166 + *x = 1; + clang_analyzer_eval(u == 1); //

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2023-05-19 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang/test/Analysis/array-punned-region.c:23 + BITFIELD_CAST *pff = + int a = *((int *)pff + 2); // expected-warning{{Assigned value is garbage or undefined [core.uninitialized.Assign]}} + return a; @steakhal

[PATCH] D148458: [clang-tidy][NFC] Split bugprone-exception-escape tests

2023-05-02 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > Yes, throw specifier is removed in C++17, split allows to support C++17 and > above in main test file A lot of our test files uses macros to differentiate between specific C++ standards, why not do that here too? There are only a few occurences of functions with

[PATCH] D148458: [clang-tidy][NFC] Split bugprone-exception-escape tests

2023-04-30 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. Do we really want to split these two functions apart to different test files? Is this really NFC? The way `ExceptionEscapeCheck` works is that it creates an `ExceptionAnalyzer` upon instantiation. //By the way upon looking at the constructor of the check I see that

[PATCH] D148458: [clang-tidy][NFC] Split bugprone-exception-escape tests

2023-04-30 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. Do we really want to split these two functions apart to different test files? Is this really NFC? The way `ExceptionEscapeCheck` works is that it creates an `ExceptionAnalyzer` upon instantiation. //By the way upon looking at the constructor of the check I see that

[PATCH] D148462: [clang-tidy] Ignore declarations in bugprone-exception-escape

2023-04-28 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs accepted this revision. isuckatcs added a comment. This revision is now accepted and ready to land. I think there's no point of holding back this patch. Even though I'm not 100% sure we want this change, I say let's merge it and see how our users react. It's a one line change anyway,

[PATCH] D148462: [clang-tidy] Ignore declarations in bugprone-exception-escape

2023-04-19 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > No because indirectly_recursive called from recursion_helper is noexcept, so > there will be std::terminate called. I missed that in `noexcept` functions thrown exceptions are not propagated. In this case I agree that `recursion_helper()` shouldn't emit a warning.

[PATCH] D148462: [clang-tidy] Ignore declarations in bugprone-exception-escape

2023-04-17 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > "The warning was emitted at every occurence of the function. It might be > confusing if it's only emitted for the definition." > Why ? Issue is in definition, not declaration. For me it would be confusing, because the forward declaration is naming the same function

[PATCH] D148462: [clang-tidy] Ignore declarations in bugprone-exception-escape

2023-04-16 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. I think the original behaviour was fine. The warning was emitted at every occurence of the function. It might be confusing if it's only emitted for the definition. Also what happens in the following scenario: int indirectly_recursive(int n) noexcept; int

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-04-16 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:160-162 +// FIXME: Two function pointers can differ in 'noexcept', but they still +// should be considered to be same, now this triggers false-positive because +//

[PATCH] D143328: [analyzer] Remove the loop from the exploded graph caused by missing information in program points

2023-03-03 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd65379c8d476: [analyzer] Remove the loop from the exploded graph caused by missing… (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM

[PATCH] D144977: [analyzer] Fix of the initialization list parsing.

2023-03-02 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:432 + const LocationContext *LCtx = C.getLocationContext(); + SVal SrcVal = State->getSVal(Buffer.Expression, LCtx); + QualType SourceValType =

[PATCH] D144977: [analyzer] Fix of the initialization list parsing.

2023-03-02 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1787 + if (V && + (!targetType->isStructureOrClassType() && !targetType->isUnionType())) return *V; I assume `targetType` is the type we want to interpret the

[PATCH] D135495: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer`

2023-02-26 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0303eafcb346: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer` (authored by isuckatcs). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D135495: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer`

2023-02-24 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > As long as you don't need the library (which, if you have a preprocessed file > or a test, should absolutely not be necessary), you can just do the -cc1 > option of -triple , or the non- -cc1 option of -target . > > Both use basically the same options list, and that

[PATCH] D135495: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer`

2023-02-24 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 500299. isuckatcs added a comment. Fixed the timed out test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp

[PATCH] D135495: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer`

2023-02-24 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. I'm not sure if I can run clang targetting AArch64 on an X86 machine but I tried it regardless and I get compiler errors on startup, so I can't debug this issue at the moment. Besided that I don't know why it times out on that buildbot. The build job that is

[PATCH] D135495: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer`

2023-02-24 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6b0cf1e15f8f: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer` (authored by isuckatcs). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D135495: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer`

2023-02-23 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 40. isuckatcs added a comment. fixed failing test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp

[PATCH] D135495: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer`

2023-02-22 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. @xazax.hun can we merge this or should we wait for someone else's approval too? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 ___ cfe-commits mailing list

[PATCH] D135495: [clang-tidy] handle exceptions properly in `ExceptionAnalyzer`

2023-02-22 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 499453. isuckatcs added a comment. Added tests for function pointers CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp

[PATCH] D135495: [clang-tidy] handle exceptions properly `ExceptionAnalyzer`

2023-02-21 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:66 + CXXBasePath &) { +if (BS->getType()->getAsCXXRecordDecl() == BaseClass && +BS->getAccessSpecifier() == AS_public)

[PATCH] D135495: [clang-tidy] handle exceptions properly `ExceptionAnalyzer`

2023-02-21 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 499234. isuckatcs marked an inline comment as done. isuckatcs added a comment. Addressed comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files:

[PATCH] D135495: [clang-tidy] handle exceptions properly `ExceptionAnalyzer`

2023-02-21 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs marked an inline comment as done. isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:84 + +QualType getPointeeOrArrayElementQualType(QualType T) { + if (T->isAnyPointerType()) xazax.hun wrote: > What

[PATCH] D135495: [clang-tidy] handle exceptions properly `ExceptionAnalyzer`

2023-02-19 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D135495: [clang-tidy] handle exceptions properly `ExceptionAnalyzer`

2023-01-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 492215. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.h

[PATCH] D135495: [clang-tidy] handle exceptions properly `ExceptionAnalyzer`

2023-01-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 492214. isuckatcs added a comment. applied clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 492115. isuckatcs added a comment. - Reverted the changes related to clang itself - Added more checks for exception handling - `isQualificationConvertiblePointer` is now iterative, not recursive - Added more test cases CHANGES SINCE LAST ACTION

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. This patch got a little bit out of control at the last revision, so I decided to remove every change from clang and add everything to the `ExceptionAnalyzer` only. The reason for that is with exceptions we have less conversions to check than we have inside the

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-24 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > E.g., instead of asserting true/false, checking if the assignment would > compile. This is actually biased. If the result of the compilation is different from the result we get from this function, it can also mean a bug in the compiler. Take a look at this example

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-24 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 491910. isuckatcs marked 9 inline comments as done. isuckatcs added a comment. Addressed comments Updated tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files:

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-17 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 489940. isuckatcs added a comment. - Renamed and moved `isMultiLevelConvertiblePointer()` to `ASTContext` - Added a unit test to test the said function CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-16 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:95 + + if (P1->isArrayType() && P2->isArrayType()) { +// At every level that array type is involved in, at least xazax.hun wrote: > isuckatcs wrote: > >

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-16 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 489626. isuckatcs marked 7 inline comments as done. isuckatcs added a comment. Addressed comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files:

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2023-01-12 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:60 +// Checks if T1 is convertible to T2. +static bool isMultiLevelConvertiblePointer(QualType P1, QualType P2, + unsigned CurrentLevel

[PATCH] D141224: [ODRHash] Handle `Integral` and `NullPtr` template parameters in `ODRHash`

2023-01-12 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd78a7c5012c7: [ODRHash] Handle `Integral` and `NullPtr` template parameters in `ODRHash` (authored by isuckatcs). Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-12-18 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > Sorry, I should fix my response above: I *never* see the BindingDecls in the > CFG, whether or not they are used. It was my fault, I was wrong with the wording. I meant the `DeclRefExpr`s that refer to the `BindingDecl`s. You can access the `BindingDecl`s through

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-09 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. Those `BindingDecl`s never appear in the CFG unless one of the is used. Take a look at the other cases. 1.) Arrays void foo() { int arr[2]; auto [i0, i1] = arr; } [B1] 1: int arr[2]; 2: arr 3: [B1.2] (ImplicitCastExpr,

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-08 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > the temporary's construction should appear before, but the binding decls, > which use the synthetic variables, should appear after I'm confused a bit here. Right now the CFG looks like this: ... Based on what you say I assume you want something to

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-08 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > I'm particularly interested in the case of tuple-like containers, which is a > little different (though I think the same point holds) `std::pair<>` is actually tuple-like if that's what you meant. Only tuple-like types have holding vars inside a

[PATCH] D139544: [clang][dataflow] Add support for structured bindings of tuple-like types.

2022-12-08 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > If CFG can be updated so that the > synthesized variables occur in the block *before* the DeclStmt containing the > DecompositionDecl, then we can drop the workaround that is included in this > patch. I'm not sure that this is possible. If you look at the AST of the

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-11-07 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs accepted this revision. isuckatcs added a comment. This revision is now accepted and ready to land. I have nothing else to add, this patch looks good to me. If the others don't have anything to add either, feel free to commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-11-01 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1244 SVal *ElementCountVal) { + assert(Region != nullptr && "Null-regions passed to prepareStateForArrayDestruction."); I

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-10-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > For me, it makes sense that getDynamicElementCount() is not intended to be > called on a null MemRegion. It would still be helpful to have an assertion on that inside `getDynamicElementCount()`, so the caller will know it right away. What I want to say is that it

[PATCH] D136671: [analyzer] Fix crash for array-delete of UnknownVal values.

2022-10-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > This eliminate the crash in `getDynamicElementCount` on that region I think that if the crash comes from `getDynamicElementCount`, we should address it there too, so when the function is called elsewhere under the same circumstances it won't crash again. What do

[PATCH] D135965: [analyzer] Move unexecuted test block into it's own source file

2022-10-20 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGea8aebf9eb7f: [analyzer] Move unexecuted test block into its own source file (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github

[PATCH] D131944: [analyzer] Remove pattern matching of lambda capture initializers

2022-10-14 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs marked an inline comment as done. isuckatcs added inline comments. Comment at: clang/test/Analysis/lambdas.cpp:226 + [uniquePtr = MakeUniquePtr()] {}(); + clang_analyzer_warnIfReached(); // expected-warning{{TRUE}} +} steakhal wrote: > It should have

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-10-08 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. I've found a strange scenario. The following conversions are allowed double *a[2][3]; double const * const (*ap)[3] = a; // OK double * const (*ap1)[] = a; // OK since C++20 However if the same conversion is supposed to be performed in a `catch()`

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-10-08 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 466312. isuckatcs marked 2 inline comments as done. isuckatcs added a comment. Addressed comments and added support for multi-level pointers too. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files:

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-10-08 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 466269. isuckatcs marked an inline comment as done. isuckatcs added a comment. Addressed inline comment CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files:

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-10-07 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 466204. isuckatcs edited the summary of this revision. isuckatcs added a comment. Updated CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135495/new/ https://reviews.llvm.org/D135495 Files:

[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

2022-10-07 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs created this revision. isuckatcs added reviewers: njames93, baloghadamsoftware, aaron.ballman, LegalizeAdulthood. Herald added subscribers: carlosgalvezp, manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, rnkovacs, xazax.hun. Herald added a project: All. isuckatcs

[PATCH] D135290: [analyzer] Fix static code analysis concerns

2022-10-07 Thread Domján Dániel 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 rG3b652fc6d644: [analyzer] Fix static code analysis concerns (authored by Manna, committed by isuckatcs). Herald added a project: clang. Herald added

[PATCH] D133643: [analyzer] Cleanup some artifacts from non-POD array evaluation

2022-09-17 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6931d311eaf4: [analyzer] Cleanup some artifacts from non-POD array evaluation (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github

[PATCH] D131262: [analyzer] Track trivial copy/move constructors and initializer lists in the BugReporter

2022-09-05 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa11e51e91f73: [analyzer] Track trivial copy/move constructors and initializer lists in the… (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository:

[PATCH] D131299: [analyzer] Warn if the size of the array in `new[]` is undefined

2022-09-04 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa46154cb1cd0: [analyzer] Warn if the size of the array in `new[]` is undefined (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github

[PATCH] D131187: [analyzer] Add more information to the Exploded Graph

2022-09-02 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb5147937b2a9: [analyzer] Add more information to the Exploded Graph (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D132654: [clang-tidy] Fix false positive on `ArrayInitIndexExpr` inside `ProBoundsConstantArrayIndexCheck`

2022-08-30 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcd40245f549b: [clang-tidy] Fix false positive on ArrayInitIndexExpr inside… (authored by isuckatcs). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D132654: [clang-tidy] Fix false positive on `ArrayInitIndexExpr` inside `ProBoundsConstantArrayIndexCheck`

2022-08-30 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs updated this revision to Diff 456715. isuckatcs marked an inline comment as done. isuckatcs added a comment. Removed the unnecessary extra RUN command. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132654/new/ https://reviews.llvm.org/D132654 Files:

[PATCH] D127973: [analyzer] Eval construction of non POD type arrays.

2022-08-27 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > I'm wondering if we should have a window for backward compatibility; There > are a couple of places already where we check for the presence of some > metadata and display it only if it exists. > Do you think it would be useful for this change as well? It has been

[PATCH] D127973: [analyzer] Eval construction of non POD type arrays.

2022-08-26 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > I had the time for reducing it. Luckily it wasn't that bad. This egraph doesn't contain an entry with key "index_of_element", which is strange. I still feel like I need a code snippet, which generates such egraph. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D127973: [analyzer] Eval construction of non POD type arrays.

2022-08-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. @steakhal Can you send me a snippet please, which reproduces this issue? For me the egraph rewriter works fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127973/new/ https://reviews.llvm.org/D127973

[PATCH] D132654: [clang-tidy] Fix false positive on `ArrayInitIndexExpr` inside `ProBoundsConstantArrayIndexCheck`

2022-08-25 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs created this revision. isuckatcs added reviewers: aaron.ballman, LegalizeAdulthood, njames93. Herald added subscribers: carlosgalvezp, arphaman, kbarton, xazax.hun, nemanjai. Herald added a project: All. isuckatcs requested review of this revision. Herald added a project:

[PATCH] D131501: [analyzer] Fix for incorrect handling of 0 length non-POD array construction

2022-08-25 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe3e9082b013b: [analyzer] Fix for incorrect handling of 0 length non-POD array construction (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG

[PATCH] D130737: [analyzer] Process non-POD array element destructors

2022-08-23 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaac73a31add5: [analyzer] Process non-POD array element destructors (authored by isuckatcs). Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131840: [analyzer] Handling non-POD multidimensional arrays in ArrayInitLoopExpr

2022-08-22 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc81bf940c77e: [analyzer] Handling non-POD multidimensional arrays in ArrayInitLoopExpr (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG

[PATCH] D131944: [analyzer] Remove pattern matching of lambda capture initializers

2022-08-22 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3c482632e64c: [analyzer] Remove pattern matching of lambda capture initializers (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM

[PATCH] D132246: [analyzer][NFC] Be more descriptive when we replay without inlining

2022-08-19 Thread Domján Dániel 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 rGa47ec1b79797: [analyzer][NFC] Be more descriptive when we replay without inlining (authored by isuckatcs). Herald added a project: clang. Herald

[PATCH] D131784: [analyzer] Fix a crash on copy elided initialized lambda captures

2022-08-12 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb4e3e3a3eb77: [analyzer] Fix a crash on copy elided initialized lambda captures (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM

[PATCH] D130974: [analyzer] Fix for the crash in #56873

2022-08-10 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > If so, shouldn't be some dependencies across these revisions? I don't think they are that closely related. This patch is about fixing an assertion failure. This assertion failure happens because we don't handle a case not because the checker doesn't exist. Also the

[PATCH] D130974: [analyzer] Fix for the crash in #56873

2022-08-09 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. > Some checker should have caught the uninitialized value earlier than the > defaultEvalCall(). > I guess, the MallocCkecher could have checked for it in PreStmt. > Or alternatively, the CallAndMessageChecker::preCall() already does something > like this in the

[PATCH] D130974: [analyzer] Fix for the crash in #56873

2022-08-03 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG10a7ee0bac21: [analyzer] Fix for the crash in #56873 (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D128837: [analyzer] Structured binding to tuple-like types

2022-07-26 Thread Domján Dániel 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 rGa618d5e0dd5d: [analyzer] Structured binding to tuple-like types (authored by isuckatcs). Herald added a subscriber: cfe-commits. Repository: rG

[PATCH] D129967: [analyzer] Lambda capture non-POD type array

2022-07-26 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG996b092c5e17: [analyzer] Lambda capture non-POD type array (authored by isuckatcs). Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D129496: [analyzer] ArrayInitLoopExpr with array of non-POD type.

2022-07-26 Thread Domján Dániel 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 rG8a13326d184c: [analyzer] ArrayInitLoopExpr with array of non-POD type (authored by isuckatcs). Herald added a project: clang. Herald added a

[PATCH] D129280: [analyzer] PlacementNewChecker, properly handle array overhead (cookie)

2022-07-15 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp:157 "Storage provided to placement new is only {0} bytes, " -"whereas the allocated array type requires more space for " -"internal needs", -

[PATCH] D127973: [analyzer] Eval construction of non POD type arrays.

2022-07-14 Thread Domján Dániel 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 rGb032e3ff6121: [analyzer] Evaluate construction of non-POD type arrays (authored by isuckatcs). Herald added a subscriber: cfe-commits. Repository:

[PATCH] D128716: [analyzer] Fix BindingDecl evaluation for reference types.

2022-06-29 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9d2e830737bc: [analyzer] Fix BindingDecl evaluation for reference types (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github

[PATCH] D126613: [Static Analyzer] Structured binding to arrays

2022-06-23 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8ef628088b54: [analyzer] Structured binding to arrays (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D128064: [Static Analyzer] Small array binding policy

2022-06-18 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added a comment. What's out desired approach for that? Create a new patch, or update this one? Also, should I commit it as usual, or revert this commit first? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128064/new/

[PATCH] D127643: [Static Analyzer] Structured bindings to data members

2022-06-17 Thread Domján Dániel 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 rGe77ac66b8c1c: [Static Analyzer] Structured binding to data members (authored by isuckatcs). Herald added a subscriber: cfe-commits. Repository:

[PATCH] D128064: [Static Analyzer] Small array binding policy

2022-06-17 Thread Domján Dániel 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 rG92bf652d4074: [Static Analyzer] Small array binding policy (authored by isuckatcs). Herald added a subscriber: cfe-commits. Changed prior to

[PATCH] D127993: [Static Analyzer][CFG] Introducing the source array in the CFG of DecompositionDecl

2022-06-17 Thread Domján Dániel 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 rGfc6b2281bfd7: [Static Analyzer][CFG] Introducing the source array in the CFG of… (authored by isuckatcs). Herald added a subscriber: cfe-commits.

[PATCH] D126131: [Clang][AST] BindingDecl ASTDump for tuple like structure

2022-06-14 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcaf2767c47c3: [Clang][AST] Fixed BindingDecl AST-dump for tuple like structures (authored by isuckatcs). Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D124738: [Documentation][Clang] Clang LibASTMatchers tutorial typo fix

2022-06-10 Thread Domján Dániel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1d3d5ecea5f0: [Documentation] Fixed typos in LibASTMatchers tutorial (authored by isuckatcs). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo