[PATCH] D155445: [analyzer][docs] Add CSA release notes

2023-07-17 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie accepted this revision. OikawaKirie added a comment. LGTM for my part. Thx. Since I am not very familiar with other changes, I have no detailed suggestions for the order. Comment at: clang/docs/ReleaseNotes.rst:922-923 +- The ``CStringChecker`` will invalidate les

[PATCH] D155445: [analyzer][docs] Add CSA release notes

2023-07-17 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. The key idea of my commit 1bd2d335b649 : - For string APIs that will not provide the copy length (`strcpy`), we will use the buffer decl and literal length to infer whether it overflows. If the cop

[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: https

[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? How

[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 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 clang/test/Anal

[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: > > > Sho

[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 -> llvm::function_r

[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 hig

[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 declar

[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 https://reviews.llv

[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

[PATCH] D129737: [analyzer] Fixing SVal::getType returns Null Type for NonLoc::ConcreteInt in boolean type

2022-07-14 Thread Ella Ma via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG32fe1a4be95c: [analyzer] Fixing SVal::getType returns Null Type for NonLoc::ConcreteInt in… (authored by OikawaKirie). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D129737: [analyzer] Fixing SVal::getType returns Null Type for NonLoc::ConcreteInt in boolean type

2022-07-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: vsavchenko, NoQ, ASDenysPetrov. OikawaKirie added a project: clang. Herald added subscribers: steakhal, manas, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a p

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2022-05-03 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D92160#3485400 , @Kale wrote: > In D92160#2449507 , @dexonsmith > wrote: > >> But it's possible we don't need this. If it's safe for us to update the >> tests and make `FileManager:

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2022-03-21 Thread Ella Ma via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9f90254286dc: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space… (authored by OikawaKirie). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2022-03-21 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 416861. OikawaKirie edited the summary of this revision. OikawaKirie added a comment. - Add FIXME in test case. - Add discourse topic link in summary. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102669/new/ https://reviews.llvm.org/D102669 Fi

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2022-03-20 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Herald added a project: All. Thanks, @keith. I agree with @keith to commit this patch without using on-demand-parsing through cc1. As this patch has nothing to do with the target triple issue we found. In the current version, I use the PCH file to load the external

[PATCH] D116924: [clang-extdef-mapping] Allow clang-extdef-mapping tool to output customized filename for each index entry

2022-02-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116924/new/ https://reviews.llvm.org/D116924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D102614: [index] Add support for type of pointers to class members

2022-02-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102614/new/ https://reviews.llvm.org/D102614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2022-02-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. I think I have found out the reason for the problem, and it proved my guesses. When executing the test case of the static analyzer, we usually use `%clang_analyze_cc1` as the entry, which is `%clang_cc1 -analyze`. And we usually do not set a target triple, as it is

[PATCH] D116329: [clang-check] Adjust argument adjusters for clang-check to strip options blocking the static analyzer

2022-01-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. It seems that it is not committed on my behalf. Maybe you have forgotten to add me as the author? Sad : ( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116329/new/ https://reviews.llvm.org/D116329

[PATCH] D116329: [clang-check] Adjust argument adjusters for clang-check to strip options blocking the static analyzer

2022-01-13 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Could you please commit it on my behalf (Ella Ma )? Thanks a lot. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116329/new/ https://reviews.llvm.org/D116329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D116329: [clang-check] Adjust argument adjusters for clang-check to strip options blocking the static analyzer

2022-01-13 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 399841. OikawaKirie added a comment. Updated as suggested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116329/new/ https://reviews.llvm.org/D116329 Files: clang/test/Tooling/clang-check-analyze-save-temps.cpp clang/tools/clang-check/Clang

[PATCH] D116924: [clang-extdef-mapping] Allow clang-extdef-mapping tool to output customized filename for each index entry

2022-01-10 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: martong, NoQ, steakhal. OikawaKirie added a project: clang. Herald added subscribers: arphaman, rnkovacs. OikawaKirie requested review of this revision. Herald added a subscriber: cfe-commits. The clang-extdef-mapping tool can only ou

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2022-01-05 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 397767. OikawaKirie added a comment. To make it work on Windows, Linux, and Mac OS, using `echo` to create the external function map, and using AST file for CTU analysis. Tested on Windows, Linux, and Mac OS under x64. CHANGES SINCE LAST ACTION https:

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2022-01-04 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 397289. OikawaKirie added a comment. Replace on-demand-parsing with loading AST file for the new test case. Tested on Linux and MacOS(x86). If it can also pass the CI test on Windows, I think we can have another try on landing this patch. Besides, as men

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

2022-01-04 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 397207. OikawaKirie edited the summary of this revision. OikawaKirie added a comment. In D115716#3217786 , @Szelethus wrote: > First off, your patch is great, and I'm pretty sure we want it! > > I remember working

[PATCH] D116329: [clang-check] Adjust argument adjusters for clang-check to strip options blocking the static analyzer

2021-12-27 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: kbobyrev, sammccall, labath. OikawaKirie added a project: clang. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. OikawaKirie requested review of this revision. Herald added

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-22 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. I have confirmed that this problem is not due to this patch. Besides, on Mac, both m1 and intel, the on-demand-parsing as well as loading an AST file generated via driver argument `-emit-ast` will also trigger this problem. However, when loading an AST file generated

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-22 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D102669#3206089 , @steakhal wrote: > Prior to this patch, it worked on M1 ; after > landing it broke something, so we clearly shouldn't land this. I do not think it is this patch that breaks t

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-21 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D102669#3199270 , @steakhal wrote: > We shouldn't skip mac targets. I CC ASTImporter folks, they probably have an > M1 . I am not intended to ignore this problem triggered on M1

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-16 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. It seems that it is not this patch that triggers the problem, which is similar to D75665 . IMO it is the problem of on-demand-parsing, but I do not have a Mac M1 device to reproduce this bug. Maybe we can

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-16 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Could you please revert this on my behalf? I currently have no idea to fix this problem. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102669/new/ https://reviews.llvm.org/D102669 _

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-16 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. I do not know how this error happens. Maybe we can currently revert this patch an have another try in the future. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102669/new/ https://reviews.llvm.org/D102669

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-16 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. It seems this patch has nothing to do with the failure in the Linux build. I think it is now ready to land. Thanks a lot for your suggestions during the revision. Could you please commit this patch on my behalf? Thanks. Ella Ma CHANGES SINCE LAST ACTION https://

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-15 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 394748. OikawaKirie added a comment. Fix `YAML:1:293: error: Unrecognized escape code` error by replacing lit substitution pattern `%S` to `%/S`. Fix `cp` problems by removing the file copy operations. CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-15 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. When running my test case `ctu-lookup-name-with-space.cpp` on Windows, `llvm-lit` reports `'cp': command not found`. And this is the reason why it fails on Windows. And when I remove the `cp`s and replace them with original file names, clang reports `YAML:1:293: err

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

2021-12-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: NoQ, steakhal, vsavchenko, ASDenysPetrov. OikawaKirie added a project: clang. Herald added subscribers: manas, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. OikawaKirie requ

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-09 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 393064. OikawaKirie added a comment. 1. Revert function `CrossTranslationUnitContext::getLookupName` 2. Add length when dumping the CTU index mapping via function `createCrossTUIndexString` 3. Remove the assertions during CTU map query process 4. Make fun

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-09 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added inline comments. Comment at: clang/lib/CrossTU/CrossTranslationUnit.cpp:154-172 + // Find the length delimiter. + const size_t LengthDelimiter = LineRef.find(':'); + if (StringRef::npos == LengthDelimiter) +return false; + + // Parse the length of Lookup

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-06 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added inline comments. Comment at: clang/lib/CrossTU/CrossTranslationUnit.cpp:154-172 + // Find the length delimiter. + const size_t LengthDelimiter = LineRef.find(':'); + if (StringRef::npos == LengthDelimiter) +return false; + + // Parse the length of Lookup

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-06 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added inline comments. Comment at: clang/lib/CrossTU/CrossTranslationUnit.cpp:154-172 + // Find the length delimiter. + const size_t LengthDelimiter = LineRef.find(':'); + if (StringRef::npos == LengthDelimiter) +return false; + + // Parse the length of Lookup

[PATCH] D102614: [index] Add support for type of pointers to class members

2021-12-05 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. ping What do you think about this patch? Can it be landed now? Or I should debug the crash in the Windows version detected with the previous version of my patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102614/new/ https://reviews.llvm.org/D102614 __

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-05 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added inline comments. Comment at: clang/lib/CrossTU/CrossTranslationUnit.cpp:154-172 + // Find the length delimiter. + const size_t LengthDelimiter = LineRef.find(':'); + if (StringRef::npos == LengthDelimiter) +return false; + + // Parse the length of Lookup

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-12-05 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 391968. OikawaKirie added a comment. 1. Fix formatting bugs 2. Update lookup name format as `: ` in all comments and documents 3. Add the new test case as a part of `clang/test/Analysis/func-mapping-test.cpp` to verify the lookup name 4. Change the macro

[PATCH] D102149: [analyzer][ctu] Allow loading invocation list from a compilation database automatically detected from the ctu-dir

2021-11-30 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie abandoned this revision. OikawaKirie added a comment. Herald added a subscriber: manas. It seems that this issue has better solutions outside the CTU module, I will drop this revision as mentioned above. Sorry for the delay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-11-30 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 390653. OikawaKirie marked an inline comment as done. OikawaKirie edited the summary of this revision. OikawaKirie added a comment. Herald added a subscriber: manas. It has been a long period since the last discussion, I hope you can still remember this b

[PATCH] D102614: [index] Add support for type of pointers to class members

2021-05-24 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 347581. OikawaKirie added a comment. Update the test case to avoid a crash in the Windows version of the `c-index-test` tool. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102614/new/ https://reviews.llvm.org/D102614 Files: clang/lib/Index/U

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-24 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D101763#2777821 , @steakhal wrote: > It seems like everything passes. Yeey, good job! > Shall I commit this tomorrow on your behalf? I do not have commit access to the code base. It would be appreciated if you could commi

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-24 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 347446. OikawaKirie added a comment. Re-submit the patch to re-build the code. Sorry for the spam of submitting an incomplete diff which triggers a patch apply failure. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101763/new/ https://reviews.

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-24 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 347441. OikawaKirie added a comment. Re-submit the patch to re-build the code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101763/new/ https://reviews.llvm.org/D101763 Files: clang/include/clang/CrossTU/CrossTranslationUnit.h clang/lib/Cr

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-24 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 347327. OikawaKirie added a comment. Herald added a subscriber: manas. In D101763#2768549 , @martong wrote: > First of all, thank you for the patch! > We had a meeting with my colleges (@steakhal, @gamesh411) and

[PATCH] D102614: [index] Add support for type of pointers to class members

2021-05-19 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added inline comments. Comment at: clang/lib/Index/USRGeneration.cpp:897 +if (const MemberPointerType *MPT = T->getAs()) { + VisitType(QualType(MPT->getClass(), 0)); + Out << "::*"; akyrtzi wrote: > A bit better to do `VisitTagDecl(MPT->

[PATCH] D102149: [analyzer][ctu] Allow loading invocation list from a compilation database automatically detected from the ctu-dir

2021-05-19 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D102149#2768541 , @martong wrote: > Thank you for the patch! > > Though, the idea is nice, there is a serious technical obstacle here: we > cannot use the clangTooling lib as a dependency of the CTU lib because that > wou

[PATCH] D102062: [analyzer][ctu] Append ctu-dir to ctu-invocation-list for non-absolute paths

2021-05-19 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie abandoned this revision. OikawaKirie added a comment. In D102062#2768569 , @martong wrote: > First of all, thank you for the patch! > We had a meeting with my colleges (@steakhal, @gamesh411) and we agreed in > the following. > > We'd like to

[PATCH] D102149: [analyzer][ctu] Allow loading invocation list from a compilation database automatically detected from the ctu-dir

2021-05-18 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D102149#2765402 , @martong wrote: > Thank you @OikawaKirie for working on this many CTU related patches! I am > going to find time for a thorough review and going to pursue @gamesh411 as > well to do the same! On the othe

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-05-18 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie marked an inline comment as done. OikawaKirie added a comment. In D102669#2765233 , @steakhal wrote: > I'm not really familiar with the extdefmap part, but I'm surprised that we > are using spaces as separators. > Shouldn't we consider using

[PATCH] D102159: [index][analyzer][ctu] Eliminate white spaces in the CTU lookup name.

2021-05-17 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie abandoned this revision. OikawaKirie added a comment. It seems impossible and not so reasonable to eliminate all white space characters in the USR as mentioned in the test case of revision D102669 . This patch is split to revision D102669

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2021-05-17 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: gamesh411, martong, hgabii. OikawaKirie added a project: clang. Herald added subscribers: steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, arphaman, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.

[PATCH] D102614: [index] Add support for type of pointers to class members

2021-05-17 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added a reviewer: akyrtzi. OikawaKirie added a project: clang. Herald added a subscriber: arphaman. OikawaKirie requested review of this revision. Herald added a subscriber: cfe-commits. Required in D102159 that we s

[PATCH] D102159: [index][analyzer][ctu] Eliminate white spaces in the CTU lookup name.

2021-05-10 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D102159#2749033 , @akyrtzi wrote: > Maybe we could also handle this kind of type instead of leaving it > 'unhandled'? What `Type` is it? The member function pointer type, see the test case. Although it would be perfect t

[PATCH] D102159: [index][analyzer][ctu] Eliminate white spaces in the CTU lookup name.

2021-05-10 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: akyrtzi, martong, steakhal. OikawaKirie added a project: clang. Herald added subscribers: ASDenysPetrov, dkrupp, donat.nagy, Szelethus, arphaman, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. OikawaKiri

[PATCH] D102149: [analyzer][ctu] Allow loading invocation list from a compilation database automatically detected from the ctu-dir

2021-05-09 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: steakhal, gamesh411, martong, balazske. OikawaKirie added a project: clang. Herald added subscribers: ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, mgorny.

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-08 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. > FileCheck error: '' is empty. It fails again on the build bot, another dead end. Maybe I need a Debian server to reproduce the problem encountered in the test case. In D101763#2745918 , @steakhal wrote: > In D101763#27458

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-08 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 343818. OikawaKirie added a comment. Monitor function `open` together with `openat` to fix the failure in the test case. As some distros actually call function `open` rather than forward to function `openat`, both functions should be monitored by `strace

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-07 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D101763#2741629 , @steakhal wrote: > Okay, so you 'just' want an indication for the given open call. What about > using `strace`? > `strace -e trace=openat %clang_cc1 ... 2>&1 | grep '"invocations.yaml"' | > FileCheck %s`

[PATCH] D102062: [analyzer][ctu] Append ctu-dir to ctu-invocation-list for non-absolute paths

2021-05-07 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D102062#2744267 , @steakhal wrote: > On second thought the current behavior is reasonable. The behavior of all CTU affairs are related to the `ctu-dir` rather than CWD, such as loading the external function map file and l

[PATCH] D102062: [analyzer][ctu] Append ctu-dir to ctu-invocation-list for non-absolute paths

2021-05-07 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: gamesh411, steakhal, martong, balazske. OikawaKirie added a project: clang. Herald added subscribers: ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. OikawaKir

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-07 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 343626. OikawaKirie added a comment. In D101763#2743984 , @steakhal wrote: > By inspecting the output that is piped to the `count`, I have a suspicion: > > openat(AT_FDCWD, "invocations.yaml", O_RDONLY|O_CLOEXEC

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-06 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 343585. OikawaKirie added a comment. Replace `wc -l` with `count`. Sorry for the spam. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101763/new/ https://reviews.llvm.org/D101763 Files: clang/include/clang/CrossTU/CrossTranslationUnit.h cla

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-06 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 343582. OikawaKirie added a comment. - Update the test case as suggested. - Add a case branch for the `index_error_code::success` error code in function `IndexErrorCategory::message` to silent the compiler warnings. CHANGES SINCE LAST ACTION https://r

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-06 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 343346. OikawaKirie added a comment. In D101763#2741536 , @steakhal wrote: > Overall, it looks promising. But I don't quite get this test. > There is no invocation yaml in the temp directory. So, you are probably

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-05 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 343293. OikawaKirie added a comment. Add a regression test case by mocking the `open` function. When this function is called with the file name of the invocation list, the mocked `open` function will reject the open operation and dump a log. And we will

[PATCH] D97265: [clang] Allow clang-check to customize analyzer output file or dir name

2021-05-05 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Ping @sammccall again for landing this patch on my behalf. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97265/new/ https://reviews.llvm.org/D97265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-03 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: gamesh411, balazske, martong, xazax.hun. OikawaKirie added a project: clang. Herald added subscribers: steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. OikawaKir

[PATCH] D97265: [clang] Allow clang-check to customize analyzer output file or dir name

2021-04-28 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. If this patch is OK, could you please commit it on my behalf (Ella Ma )? Thx. And I will continue working on the `-Xanalyzer` option for clang-check, as it is too complex when adding analyzer options via the `-extra-arg` option. CHANGES SINCE LAST ACTION https://

[PATCH] D83660: [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h.

2021-04-25 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D83660#2675064 , @mikhail.ramalho wrote: > Indeed it looks like a copy & paste error, I'm surprised no one found it > earlier. > > Regarding the tests, we used to have `make check-clang-analysis-z3` (or > something simila

[PATCH] D97265: [clang] Allow clang-check to customize analyzer output file or dir name

2021-04-24 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. ping @sammccall again Do I need to add other reviewers if you are busy doing your job? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97265/new/ https://reviews.llvm.org/D97265 ___ cfe-commits mailing list cfe-com

[PATCH] D83660: [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h.

2021-03-31 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D83660#2661369 , @martong wrote: >> BTW, I was obstructed by the z3 requirement in the regression test case when >> I tried to understand your test case. Even though I set the variables >> LLVM_Z3_INSTALL_DIR and LLVM_ENAB

[PATCH] D83660: [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h.

2021-03-27 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 333708. OikawaKirie added a comment. In D83660#2597025 , @steakhal wrote: > I'm somewhat bothered that this patch is not landed yet. :| > > I made a **crude** mock to trigger the bug using `LD_PRELOAD`. F15707493:

[PATCH] D98918: [clang][lit] Allow test cases to use the compiler that are used to compile Clang

2021-03-19 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D98918#2636735 , @steakhal wrote: > > Oh, wait a minute. The `config.host_cxx` was already there. > Where is the symmetry :D It looks much better now, thanks. Sounds not bad if it matters to you :P > Regarding D83660 <

[PATCH] D98918: [clang][lit] Allow test cases to use the compiler that are used to compile Clang

2021-03-18 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: thakis, steakhal. OikawaKirie added a project: clang. OikawaKirie requested review of this revision. Herald added a subscriber: cfe-commits. Required by D83660 . Test cases may want to use the host co

[PATCH] D97265: [clang] Allow clang-check to customize analyzer output file or dir name

2021-03-17 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. @sammccall ping. Updated as you mentioned in D97265#2581653 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97265/new/ https://reviews.llvm.org/D97265 ___ cfe-commits mail

[PATCH] D97265: [clang] Allow clang-check to customize analyzer output file or dir name

2021-03-07 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 328927. OikawaKirie added a comment. Replace concatenating the output from clang-check and plist with separated checks to workaround the test failure on Windows. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97265/new/ https://reviews.llvm.org/

[PATCH] D97265: [clang] Allow clang-check to customize analyzer output file or dir name

2021-03-04 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 328396. OikawaKirie retitled this revision from "[clang] Allow clang-check to customize output file name" to "[clang] Allow clang-check to customize analyzer output file or dir name". OikawaKirie edited the summary of this revision. OikawaKirie added a co

[PATCH] D97265: [clang] Allow clang-check to customize output file name

2021-02-23 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D97265#2581653 , @sammccall wrote: > > It looks like either we're in syntax-only mode (and -o will be ignored > regardless) or we're in analyzer mode, and want -o. > It seems tempting to just stop stripping it in this c

[PATCH] D97251: [llvm] Add assertions for the smart pointers with the possibility to be null in ClangAttrEmitter

2021-02-23 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie requested review of this revision. OikawaKirie added a comment. @aaron.ballman My only concern is the recursive call to this function on line 1359. If you think it is also OK for the recursive call on line 1359, I will update the patch as you mentioned above. BTW, how can I test an

[PATCH] D97265: [clang] Allow clang-check to customize output file name

2021-02-23 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: hokein, sammccall, kbobyrev, alexfh. OikawaKirie added a project: clang. OikawaKirie requested review of this revision. Herald added a subscriber: cfe-commits. Required by https://stackoverflow.com/questions/58073606 As the output ar

[PATCH] D91844: [llvm][clang] Add checks for the smart pointers with the possibility to be null

2021-02-22 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie abandoned this revision. OikawaKirie added a comment. Split to - D97251 (clang/utils/TableGen/ClangAttrEmitter.cpp) - D97185 (llvm/lib/DWARFLinker/DWARFLinker.cpp) - D97254 (llvm/l

[PATCH] D97251: [llvm] Add assertions for the smart pointers with the possibility to be null in ClangAttrEmitter

2021-02-22 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. As a recursive function it is, the original patch in D91844 was adding assertions where the function is called other places in the file. To confirm it will not lead to a crash here, I re-build my code base with clang and clang-tool

[PATCH] D97251: [llvm] Add assertions for the smart pointers with the possibility to be null in ClangAttrEmitter

2021-02-22 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: dexonsmith, aaron.ballman, pcc. OikawaKirie added a project: clang. OikawaKirie requested review of this revision. Herald added a subscriber: cfe-commits. Split from D91844 . The return value of creat

[PATCH] D92634: [Analyzer] Diagnose signed integer overflow

2021-01-04 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D92634#2477342 , @danielmarjamaki wrote: >> However, the mainstream compilers like GCC and Clang implement this as the >> overflowed value, and some programmers also use this feature to do some >> tricky things. > > hmm..

[PATCH] D92634: [Analyzer] Diagnose signed integer overflow

2021-01-03 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D92634#2476161 , @danielmarjamaki wrote: >> Besides, the return value should be the exact value computed from the two >> integers, even unknown, rather than undefined. As the developers may >> overflow an integer on purpo

[PATCH] D92634: [Analyzer] Diagnose signed integer overflow

2020-12-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. I think it could be better to implement this check with a checker on `PreStmt` and so on. And IMO, checkers have enough functionalities to report these problems. Besides, the return value should be the exact value computed from the two integers, even unknown, rathe

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Replies from the original author Hao Zhang --- Sorry for replying late. > I think it would be good to understand why the tests failed. Are some clients > relying on the name matching the query? If so, why? I'm currently working on this. Maybe try making `FileMana

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-10 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Replies from the original author Hao Zhang -- > ...split the data structures between relative and absolute paths. The > existing data structures would only store absolute paths, but there are new > ones f

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-09 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Replies from the original author Hao Zhang (Sorry for the wrong email address in the previous reply.) -- Thanks for your reply. I noticed this problem when I was using clang-check to analyze a project whic

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-09 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D92160#2443405 , @dexonsmith wrote: > In D92160#2443413 , @dexonsmith wrote: > Replies on my own: > Can you tell me more about the scenario this happens? You can first manual

[PATCH] D92639: [analyzer] Add control flow arrows to the analyzer's HTML reports

2020-12-04 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. It is really a good idea! The operations that would not leave an event in the report are now clearly printed. But there are three arrows that confuse me in the example report: the assignment `x = 0` (x -> 0 -> x), the function call `dereference(x)` (x -> dereferen

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-11-26 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: dexonsmith, harlanhaskins, rsmith, arphaman, MaskRay, bkramer, ilya-biryukov. OikawaKirie added a project: clang. Herald added a subscriber: cfe-commits. OikawaKirie requested review of this revision. ClangTool will make FileManager

  1   2   >