[PATCH] D61817: [analyzer] Add a prunable note for skipping virtual base initializers in subclasses.

2019-05-14 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. What about "the most derived class" or "a superclass" instead of "the superclass"? (https://en.cppreference.com/w/cpp/language/derived_class) May the sentence is a little bit too long. It

[PATCH] D61816: [CFG] [analyzer] pr41300: Add a branch to skip virtual base initializers when they are handled by the superclass.

2019-05-16 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. I do not like to have a variable storing/mention one stuff named in plural. It is your decision as it is just my personal feeling. Comment at: clang/include/clang/Analy

[PATCH] D61816: [CFG] [analyzer] pr41300: Add a branch to skip virtual base initializers when they are handled by the superclass.

2019-05-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:451 + if (const auto *CallerCtor = dyn_cast_or_null( + LCtx->getStackFrame()->getCallSite())) { +switch (CallerCtor->getConstructionKind()) { NoQ wrote: > Charu

[PATCH] D61816: [CFG] [analyzer] pr41300: Add a branch to skip virtual base initializers when they are handled by the superclass.

2019-05-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:451 + if (const auto *CallerCtor = dyn_cast_or_null( + LCtx->getStackFrame()->getCallSite())) { +switch (CallerCtor->getConstructionKind()) { --

[PATCH] D61912: [analyzer] print() JSONify: Store implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361972: [analyzer] print() JSONify: Store implementation (authored by Charusso, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D61912?vs=201564

[PATCH] D62082: [analyzer] print() JSONify: Constraints implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361978: [analyzer] print() JSONify: Constraints implementation (authored by Charusso, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D62082?vs=

[PATCH] D62085: [analyzer] print() JSONify: Constructing objects implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361980: [analyzer] print() JSONify: Constructing objects implementation (authored by Charusso, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D61912: [analyzer] print() JSONify: Store implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Hey @lebedev.ri, thanks for the review! In D61912#1521306 , @lebedev.ri wrote: > All these patches bypassed cfe-commits. Bypassed? It is only added when you push your stuff, which is happened as expected. > Why does this inve

[PATCH] D62087: [analyzer] print() JSONify: Program state implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361983: [analyzer] print() JSONify: Program state implementation (authored by Charusso, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D62087?v

[PATCH] D61912: [analyzer] print() JSONify: Store implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. >> In D61912#1521306 , @lebedev.ri >> wrote: >> >>> All these patches bypassed cfe-commits. >> >> >> Bypassed? It is only added when you push your stuff, which is happened as >> expected. > > That is pretty much the opposite

[PATCH] D61912: [analyzer] print() JSONify: Store implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D61912#1521476 , @Szelethus wrote: > I think cfe-commits is added automatically if you add "Clang" to the > "Repository" field when creating a new Differential. Exactly, thanks! Repository: rC Clang CHANGES SINCE LAST A

[PATCH] D62346: [analyzer] print() JSONify: getNodeLabel implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 201988. Charusso marked 4 inline comments as done. Charusso added a comment. - Remove unintended spaces. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62346/new/ https://reviews.llvm.org/D62346 Files: clang/include/clang/Analysis/ProgramPoint.h

[PATCH] D62346: [analyzer] print() JSONify: getNodeLabel implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361997: [analyzer] print() JSONify: getNodeLabel implementation (authored by Charusso, committed by ). Changed prior to commit: https://reviews.llvm.org/D62346?vs=201988&id=201990#toc Repository: rC

[PATCH] D62494: [analyzer][AST] print() JSONify: Stmt implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC362000: [analyzer][AST] print() JSONify: Stmt implementation (authored by Charusso, committed by ). Changed prior to commit: https://reviews.llvm.org/D62494?vs=201909&id=201996#toc Repository: rC Cla

[PATCH] D62495: [analyzer] print() JSONify: Decl revision

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362002: [analyzer] print() JSONify: Decl revision (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D62496: [analyzer] print() JSONify: CFG implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D62496#1518696 , @NoQ wrote: > It's just for escaping weird symbols in pretty-prints, right? Fair enough! Yea, because it writes out both Decl and Stmt craziness. Repository: rC Clang CHANGES SINCE LAST ACTION https://

[PATCH] D62496: [analyzer] print() JSONify: CFG implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362003: [analyzer] print() JSONify: CFG implementation (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

[PATCH] D62497: [analyzer] print() JSONify: SVal implementation

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362008: [analyzer] print() JSONify: SVal implementation (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

[PATCH] D60670: [analyzer] [NFC] PathDiagnostic: Create PathDiagnosticPopUpPiece

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC362014: [analyzer] [NFC] PathDiagnostic: Create PathDiagnosticPopUpPiece (authored by Charusso, committed by ). Changed prior to commit: https://reviews.llvm.org/D60670?vs=200109&id=202021#toc Reposito

[PATCH] D61060: [analyzer] ConditionBRVisitor: Test 'add-pop-up-notes=false'

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362023: [analyzer] ConditionBRVisitor: Test 'add-pop-up-notes=false' (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D58199: [analyzer] ConditionBRVisitor: Remove duplicated code

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362025: [analyzer] ConditionBRVisitor: Remove duplicated code (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https

[PATCH] D58206: [analyzer] ConditionBRVisitor: MemberExpr support

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC362026: [analyzer] ConditionBRVisitor: MemberExpr support (authored by Charusso, committed by ). Changed prior to commit: https://reviews.llvm.org/D58206?vs=195073&id=202044#toc Repository: rC Clang

[PATCH] D58207: [analyzer] ConditionBRVisitor: Boolean support

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362027: [analyzer] ConditionBRVisitor: Boolean support (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

[PATCH] D53720: [analyzer] Remove EndPath function as it is dead code

2019-05-29 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362030: [analyzer] Remove EndPath function as it is dead code (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2019-09-14 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 220215. Charusso edited the summary of this revision. Charusso removed reviewers: hokein, ilya-biryukov, xbolva00, dyung. Charusso set the repository for this revision to rCTE Clang Tools Extra. Charusso added a comment. Herald added a project: clang. After a

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2019-09-14 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Hm, I wanted to upload the new patch here to see the changes with the diff-mode, but it does not work, sorry. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D45050/new/ https://reviews.llvm.org/D45050

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 221070. Charusso marked 9 inline comments as done. Charusso added a comment. - Try to do the math. - Create a consistent dynamic type API. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67079/new/ https://reviews.llvm.org/D67079 Files: clang/incl

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:126 + + // If the casts have a common anchestor it could not be a succeeded downcast. + for (const auto &PreviousBase : PreviousRD->bases()) NoQ wrote: > Charusso

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2019-09-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 3 inline comments as done. Charusso added a comment. Thanks! Comment at: clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:22-33 +constexpr llvm::StringLiteral FuncExprName = "entire-called-function-expr"; +constexpr llvm::StringLiteral Cas

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2019-09-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 221096. Charusso added a comment. - Fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D45050/new/ https://reviews.llvm.org/D45050 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp clang-tools-extra/clang-tidy/bugprone/CMakeLi

[PATCH] D68199: [analyzer] DynamicTypeInfo: Simplify the API

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Charusso retitled this revision from "[analyzer] DynamicTypeInfo

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/DynamicType.cpp:44 + +bool isDerivedFrom(QualType X, QualType Y) { + const CXXRecordDecl *XRD = X->getPointeeCXXRecordDecl(); Szelethus wrote: > Hmm, I think this function answers the ques

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 222370. Charusso marked 2 inline comments as done. Charusso added a comment. - When we have no information whether the cast succeeds or not we assume both. - `CastVisitor` is the new facility which decides whether the assumptions are appropriate. - The math

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added a comment. In D67079#1688648 , @NoQ wrote: > In D67079#1687577 , @Charusso wrote: > > > - `CastVisitor` is the new facility which decides whether the assumpt

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 3 inline comments as done. Charusso added inline comments. Comment at: clang/test/Analysis/cast-value-hierarchy-fp-suppression.cpp:25-27 + if (isa(a)) +if (isa(a)) + clang_analyzer_warnIfReached(); // no-warning NoQ wrote: > Charusso wro

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 4 inline comments as done. Charusso added inline comments. Comment at: clang/test/Analysis/cast-value-hierarchy-fp-suppression.cpp:25-27 + if (isa(a)) +if (isa(a)) + clang_analyzer_warnIfReached(); // no-warning NoQ wrote: > NoQ wrote: >

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-10-01 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 222685. Charusso marked an inline comment as done. Charusso added a comment. - Use the TU's Decls instead of the gathered casts' Decls. - The math is still missing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67079/new/ https://reviews.llvm.org/D

[PATCH] D68199: [analyzer] DynamicTypeInfo: Simplify the API

2019-10-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 222927. Charusso edited the summary of this revision. Charusso added a comment. - No comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68199/new/ https://reviews.llvm.org/D68199 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/D

[PATCH] D68199: [analyzer] DynamicTypeInfo: Simplify the API

2019-10-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 3 inline comments as done. Charusso added a comment. Sorry, I was sure it is working as expected. Comment at: clang/lib/StaticAnalyzer/Core/DynamicType.cpp:53-57 if (const auto *TR = dyn_cast(MR)) -return DynamicTypeInfo(TR->getLocationType(), /*CanBeSub=

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-10-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 222931. Charusso added a comment. - Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67079/new/ https://reviews.llvm.org/D67079 Files: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h clang/include/clang/StaticAna

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-10-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 222932. Charusso added a comment. - Rebase properly. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67079/new/ https://reviews.llvm.org/D67079 Files: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h clang/include/clang/

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-10-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Well, the rebase is a little-bit weird, sorry for the inconvenience. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67079/new/ https://reviews.llvm.org/D67079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D67932: [analyzer] Fix accidentally skipping the call during inlined defensive check suppression.

2019-10-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. > [...] one reason why we can't simply use the error node may be that the > binding to that variable might have already disappeared from the state by the > time the bug is found. Yes, that is pretty interesting. I have found error nodes

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-18 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 14 inline comments as done. Charusso added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:226 +DiagnosticBuilder &Diag) { + if (getLangOpts().CPlusPlus11) { +StringRef NewFuncName = (Name[0] != 'w') ? "strncpy_s" : "wcsn

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-18 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 143025. Charusso marked an inline comment as done. Charusso added a comment. Everything fixed. Thanks you @lebedev.ri for the early comments, I forgot to submit my comment. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cp

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-19 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. I tried my checker on 10 famous open source project, this is the outcome: F5977628: curl_lib_transfer_c.html F5977629: ffmpeg_libavformat_sdp_c.html F5977631: openssl_apps_ca_c.html

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:226 +DiagnosticBuilder &Diag) { + if (getLangOpts().CPlusPlus11) { +StringRef NewFuncName = (Name[0] != 'w') ? "strncpy_s" : "wcsnc

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 143698. Charusso marked an inline comment as done. Charusso added a comment. Changed CXX11 to C11 and made a little refactor. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-t

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 143825. Charusso marked an inline comment as done. Charusso added a comment. Defined an option to switch off the `_s` suffixed functions usage. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeL

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D45050#1071897, @xbolva00 wrote: > Shouldn't it catch in curl also this code? > > urllen = strlen(url_clone); > > > > memcpy(newest, url_clone, urllen); > > Edit: if possible, report these bugs to project developers :) Thanks for your

[PATCH] D68725: [analyzer] MemoryBlockRegion: Generalize AllocaRegion

2019-10-09 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, xazax.hun. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. This patch generalizes the `AllocaRegion` to store met

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2019-10-13 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82f8f8b44cd0: [clang-tidy] New checker for not null-terminated result caused by strlen()… (authored by Charusso). Changed prior to commit: https://reviews.llvm.org/D45050?vs=221096&id=224773#toc Reposi

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2019-10-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D45050#1707483 , @thakis wrote: > This fails on Windows: http://45.33.8.238/win/386/step_7.txt > > Please take a look, and if it's not immediately clear how to fix, b please > revert while you investigate. Oh, thanks! We def

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2019-10-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D45050#1707489 , @xbolva00 wrote: > `typedef __SIZE_TYPE__ size_t;` Hm, yes, I have overestimated the uploaded solution: $ clang/test grep -rn 'typedef __SIZE_TYPE__ size_t;' | wc -l 60 $ clang/test grep -rn 'typedef _

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2019-10-13 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. I think everything is working fine on the build-bot side. One tiny issue on Windows left where the `getLength()` could not obtain the length properly: rL374713 , I will look into that. In D45050#1071898

[PATCH] D69015: [analyzer] Make ExplodedNode identifiers truly stable.

2019-10-15 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. I was not sure why this is not opaque in case of LLDB usage, but now it is perfect, thanks! Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:3079 +

[PATCH] D69015: [analyzer] Make ExplodedNode identifiers truly stable.

2019-10-15 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. > i'd much rather enable graph dumping in noassert builds. Totally! When I am not an advanced developer I definitely would like to print the graph with the release pre-built binaries to measure my stuff when I analyze. Like after someone watch your tutorial and starts

[PATCH] D69150: [analyzer] Fix hidden node traversal in exploded graph dumps.

2019-10-17 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. When you see static bool traverseHiddenNodes( const ExplodedNode *N, llvm::function_ref PreCallback, llvm::function_ref PostCallback, llvm::function_ref Stop) { t

[PATCH] D69155: [analyzer] Fix off-by-one in operator call parameter binding.

2019-10-17 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CallEvent.cpp:325 if (getKind() != CE_CXXAllocator) if (isArgumentConstructedDirectly(Idx)) if (auto AdjIdx = getAdjustedParameterIndex(Idx)) What about this one? It sm

[PATCH] D69155: [analyzer] Fix off-by-one in operator call parameter binding.

2019-10-18 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso marked an inline comment as done. Charusso added a comment. This revision is now accepted and ready to land. I think it will be a great educational material how to touch the core. Good luck! Comment at: clang/lib/StaticAnalyzer/Core/Ca

[PATCH] D68725: [analyzer] MemoryBlockRegion: Generalize AllocaRegion

2019-10-28 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the notes! In D68725#1722136 , @NoQ wrote: > Generally, there's no need to add more information to `MemRegion` and > `SymExpr` objects [...] Well, that was my first idea, then I saw we allow helper-methods inside r

[PATCH] D69540: [analyzer] DynamicSize: Remove 'getExtent()' from regions

2019-10-28 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, mgorny. This patch introduces a placeholder for representing th

[PATCH] D69540: [analyzer] DynamicSize: Remove 'getExtent()' from regions

2019-10-28 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 3 inline comments as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:880 uint64_t Length = UINT64_MAX; - SVal Extent = Top->getExtent(SVB); + SVal Extent = Top->getMemRegionManager().getStaticSize(Top); if (O

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a reviewer: Charusso. Charusso requested changes to this revision. Charusso added a comment. This revision now requires changes to proceed. Could you please mark resolved issues as resolved? I would like to see what we miss, and what has been done. Comment at: c

[PATCH] D70411: [analyzer] CERT STR rule checkers: STR31-C

2020-05-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 265959. Charusso retitled this revision from "[analyzer] CERT: STR31-C" to "[analyzer] CERT STR rule checkers: STR31-C". Charusso added a comment. - Refactor. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70411/new/ https://reviews.llvm.org/D70411

[PATCH] D71033: [analyzer] CERT STR rule checkers: STR32-C

2020-05-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 265962. Charusso retitled this revision from "[analyzer] CERT: STR32-C" to "[analyzer] CERT STR rule checkers: STR32-C". Charusso added a comment. Herald added subscribers: ASDenysPetrov, martong, steakhal. - Refactor. - State out explicitly whether the Anal

[PATCH] D71155: [analyzer] CERT STR rule checkers: STR30-C

2020-05-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 265963. Charusso retitled this revision from "[analyzer] CERT: STR30-C" to "[analyzer] CERT STR rule checkers: STR30-C". Charusso added a comment. Herald added subscribers: ASDenysPetrov, martong, steakhal. - Refactor. CHANGES SINCE LAST ACTION https://r

[PATCH] D71155: [analyzer] CERT STR rule checkers: STR30-C

2020-05-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D71155#1854908 , @NoQ wrote: > Let's separate `CStringChecker` improvements into a separate patch and have a > separate set of tests for it. I was thinking about creating tests, but I cannot figure out any better testing th

[PATCH] D70805: [analyzer] SValHasDescendant: Determine whether the SVal has an SVal descendant

2020-05-25 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso abandoned this revision. Charusso added a comment. Herald added subscribers: ASDenysPetrov, martong, steakhal. Way more sophisticated matching: https://reviews.llvm.org/D77745 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70805/new/ https://reviews.llvm.org/D70805 __

[PATCH] D70411: [analyzer] CERT STR rule checkers: STR31-C

2020-07-15 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 278368. Charusso marked 18 inline comments as done. Charusso edited the summary of this revision. Charusso added a comment. - Resolve most of the review comments. - We really need to specify the design of future checkers. CHANGES SINCE LAST ACTION https:/

[PATCH] D70411: [analyzer] CERT STR rule checkers: STR31-C

2020-07-15 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the reviews! In D70411#2153562 , @Szelethus wrote: > Please do not bypass the previous comments that hadn't reached a conclusion > -- littering inlines about miscellaneous stuff at this stage does more harm > then go

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

2020-04-05 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:33-50 +void SignalInMultithreadedProgramCheck::registerMatchers(MatchFinder *Finder) { + auto signalCall = + callExpr( + ignoringImpCasts(hasDes

[PATCH] D76768: [analyzer] Added support of scan-build and exploded-graph-rewriter regression tests for Windows

2020-04-07 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. I believe it is very strange on a Windows system to have multiple dots in a file. The other issue could be the wildcard `/*/` in a path full of `\`s. The LLVM `lit` (https://llvm.org/docs/CommandGuide/lit.html) has tons of Windows-related shortcuts, which I have never

[PATCH] D76768: [analyzer] Added support of scan-build and exploded-graph-rewriter regression tests for Windows

2020-04-07 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76768/new/ https://reviews.llvm.org/D76768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 9 inline comments as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:216 + const NoteTag *Tag = C.getNoteTag( + [=](BugReport &) -> std::string { +SmallString<128> Msg; NoQ wro

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216246. Charusso marked 15 inline comments as done. Charusso added a comment. Herald added a subscriber: mgorny. - Fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325 Files: clang/include/clang/AST/Type.

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216250. Charusso added a comment. - Added a new test case and refactored that test file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325 Files: clang/include/clang/AST/Type.h clang/include/clang/StaticA

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216312. Charusso marked 3 inline comments as done. Charusso added a comment. - Fix more and publish the previously forgotten comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325 Files: clang/include/

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added inline comments. Comment at: clang/test/Analysis/cast-value-notes.cpp:34 + if (dyn_cast_or_null(C)) { +// no-note: 'Assuming 'C' is a 'Circle', not a 'Circle'' +return; NoQ wrote: > A circle is al

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicCastInfo.h:19 +public: + enum CastKind { Success, Fail }; + NoQ wrote: > I suggest `enum CastResult { Success, Failure }` ("a fail" is slang, also > "resul

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216314. Charusso added a comment. - Remove `CastFromTy` finally from the `getNoteTag()` API as it was uninformative. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325 Files: clang/include/clang/AST/Type.h

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216317. Charusso added a comment. - Make the check-clang pass and simplify a test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325 Files: clang/include/clang/AST/Type.h clang/include/clang/StaticAn

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216322. Charusso marked 7 inline comments as done. Charusso added a comment. - Simplify the template argument obtaining. - Added a tiny new test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66423/new/ https://reviews.llvm.org/D66423 Files:

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the reviews so far! I had a contradiction in my mind about regions, but now everything is okay and the notes are not misleading. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:183 + if (Body) +DRE = dyn_cast(Body);

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216509. Charusso marked 4 inline comments as done and an inline comment as not done. Charusso added a comment. - Fix CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325 Files: clang/include/clang/AST/Type.h

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:83-93 +static QualType getRecordType(QualType Ty) { + Ty = Ty.getCanonicalType(); + + if (Ty->isPointerType()) +return getRecordType

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216513. Charusso added a comment. - Fix printing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66325/new/ https://reviews.llvm.org/D66325 Files: clang/include/clang/AST/Type.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerConte

[PATCH] D66267: [analyzer] TrackConstraintBRVisitor: Do not track unknown values

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the reviews! I hope that mentioned error will be visible by the `BugReporter` revisions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66267/new/ https://reviews.llvm.org/D66267 ___ cfe-commits mailing

[PATCH] D66267: [analyzer] TrackConstraintBRVisitor: Do not track unknown values

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369604: [analyzer] TrackConstraintBRVisitor: Do not track unknown values (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to comm

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 6 inline comments as done. Charusso added a comment. Thanks for the review! The build-bots will fire with that `QualType` fix (1028 TU on its own). I will look into the exploded-graph-rewriter.py after GSoC to fix every stuff like that patch and also invoke my HTML simplification

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Charusso marked an inline comment as done. Closed by commit rL369605: [analyzer] CastValueChecker: Store the dynamic types and casts (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscri

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D66325#1640426 , @thakis wrote: > It looks like this renamed DynamicTypeMap.h but didn't update all users, see > all the files in Checkers at > http://llvm-cs.pcc.me.uk/?q=include.*dynamictypemap.h for example. > > Which targ

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D66325#1640483 , @thakis wrote: > Thanks! Looks like it builds fine now, but the tests are failing: > http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/19297/steps/test-check-all/logs/stdio > Fai

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. return C.getNoteTag( - [=] { + [=]() -> std::string { SmallString<128> Msg; That was the fix by rL369609 . Somehow it converted to a temporary object therefore that was an issue: [175/176] Running the C

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216541. Charusso added a comment. - Fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66423/new/ https://reviews.llvm.org/D66423 Files: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp clang/test/Analysis/Inputs/llvm.h clang/test/Anal

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks for the review! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66423/new/ https://reviews.llvm.org/D66423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-21 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369615: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull() (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. - Repository: rC Clang https://reviews.llvm.org/D66593 Fi

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added a comment. I am not sure how would I fix them, so I just commented them out. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:102 + else if (Ty->isReferenceType()) Ty = Ty.getNonReferenceType();

[PATCH] D65239: [analyzer] RangeConstraintManager: Apply constraint ranges of bitwise operations

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216731. Charusso marked 7 inline comments as done. Charusso edited the summary of this revision. Charusso added a comment. - Fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65239/new/ https://reviews.llvm.org/D65239 Files: clang/include/clang

<    1   2   3   4   5   6   7   >