[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-07-03 Thread Ella Ma 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 rG1bd2d335b649: [analyzer][CStringChecker] Adjust the invalidation operation on the super… (authored by OikawaKirie). Changed prior to commit:

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-07-03 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D152435#4467672 , @OikawaKirie wrote: > I will submit it again later to update the code as you suggested. Feel free to commit it with that modifications included. > Besides, > >> Build Status >> Buildable 242737 >>

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-07-03 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. I will submit it again later to update the code as you suggested. Besides, > Build Status > Buildable 242737 > Build 376801: pre-merge checkslibcxx CI FAILED What does this mean? Was this patch correctly compiled and checked in the previous build?

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-07-03 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:1078 +const MemRegion *R) { +return

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-07-03 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 536662. OikawaKirie added a comment. Sorry for the formatting error... :( CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152435/new/ https://reviews.llvm.org/D152435 Files: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-07-02 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:1054 +SVal SizeV, QualType SizeTy) { + return InvalidateBufferAux( + C, S, BufE, BufV, steakhal wrote: > OikawaKirie wrote: > > steakhal wrote: > > >

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-07-02 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 536578. OikawaKirie marked 12 inline comments as done and an inline comment as not done. OikawaKirie added a comment. 1. Function and variable names: functions: lower camel, variables: upper camel, lambdas: upper camel 2. std::function ->

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-06-22 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D152435#4433147 , @OikawaKirie wrote: > BTW, what does the `Done` checkbox mean in the code comments? "Done" means "Resolved" on GitHub - which is basically that some action was taken or the person who raised the issue

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-06-19 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. BTW, what does the `Done` checkbox mean in the code comments? Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:286-287 + SVal V, + std::function); steakhal wrote: > I'd

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-06-19 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:286-287 + SVal V, + std::function); I'd highly suggest making this a template taking the functor that way. Given that we

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-06-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Let me come back to this once again in the upcoming days to make sure everything is good. Comment at: clang/test/Analysis/pr22954.c:581 clang_analyzer_eval(m27.s3[i] == 1); // expected-warning{{UNKNOWN}}\ expected-warning{{Potential leak of

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-06-17 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added inline comments. Comment at: clang/test/Analysis/issue-55019.cpp:13-14 + +void *malloc(size_t); +void free(void *); + > Ah, I see that it's for c function declarations. If that's the case, have you > considered adding the malloc and free

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-06-17 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 532372. OikawaKirie edited the summary of this revision. OikawaKirie added a comment. Update the implementation of InvalidateBuffer in a multi-entrance-with-callback manner. Update test cases as suggested. CHANGES SINCE LAST ACTION

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-06-13 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Thanks for the elaborated answer on the GH issue. Now it makes sense. And the fix is align with the observations, which is good. I only have concerns about the code quality of the modifier code. It was already in pretty bad shape, and I cannot say we improve it with

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-06-11 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I left my comment at https://github.com/llvm/llvm-project/issues/55019 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152435/new/ https://reviews.llvm.org/D152435 ___

[PATCH] D152435: [analyzer][CStringChecker] Adjust the invalidation operation on the super region of the destination buffer during string copy

2023-06-08 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: pgousseau, NoQ, steakhal, balazske, xazax.hun. OikawaKirie added a project: clang. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware. Herald