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

2020-07-13 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: NoQ, dcoughlin. OikawaKirie added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. The first crash re

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

2020-07-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. > do you accidentally have a test case to reproduce the crash @NoQ I am now working with the reporter of this bug to make a simple test case to trigger the crash. > looks like a good opportunity for `SmartPtr` checker and `llvm::Optional`! @vsavchenko It seems not

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

2020-07-14 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. > Might in the future I would spend some time on it - we will see. @steakhal My boss always asks me about how to improve the performance for SMT solver based constraint solving, on both the engine side and the SMT solver side. If there is anything that our research

[PATCH] D85105: [doxygen] Fix bad doxygen results for BugReporterVisitors.h

2020-08-02 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: NoQ, vsavchenko. OikawaKirie added a project: clang. Herald added subscribers: cfe-commits, Charusso. OikawaKirie requested review of this revision. Because of `{@code x}` will trigger a Doxygen bug. And as far as I am thinking,

[PATCH] D85105: [doxygen] Fix bad doxygen results for BugReporterVisitors.h

2020-08-11 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 284952. OikawaKirie marked an inline comment as done. OikawaKirie added a comment. Now it has a link to the `getEndPath`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85105/new/ https://reviews.llvm.org/D85105 Files: clang/include/clang/Stat

[PATCH] D85105: [doxygen] Fix bad doxygen results for BugReporterVisitors.h

2020-08-12 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 284991. OikawaKirie added a comment. Ok, I got it. I will pay attention to this in the future submits. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85105/new/ https://reviews.llvm.org/D85105 Files: clang/include/clang/StaticAnalyzer/Core/Bug

[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] 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-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-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] 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] 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] 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] 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] 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] D85105: [doxygen] Fix bad doxygen results for BugReporterVisitors.h

2020-08-23 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. @vsavchenko @NoQ The patch has been updated as required. Is there anything I need to do with the patch? Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:56 /// last node should be unique. - /// Use {@code

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

2020-09-08 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. We have tried to trigger the crash with the original project where the crash was encountered. But the problem is we cannot trigger the crash with the project, and we have lost all the previous records about this crash. Besides, both I and the bug reporter himself ar

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

2020-09-09 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. After reviewing the code of this snippet, I think it would be very difficult to make a regression test case for the crash, as far as what I know about Z3 and SMT solvers. First of all, all calls to `Solver->check()` will return `true` for sat, `false` for unsat, an

[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] 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-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-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] 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] D91410: [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref

2020-11-13 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: serge-sans-paille, ahmedcharles, niravd, echristo, maskray0, pcc, tejohnson, espindola, courbet, andreadb, epastor, enderby, lhames, whchung, ftynse. OikawaKirie added projects: LLVM, clang, MLIR. Herald added subscribers: llvm-commi

[PATCH] D91540: [preprocessor] Assertions on the inferrable null pointers in Preprocessor befere dereference

2020-11-16 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: dnsampaio, rsmith, lattner, ilya-biryukov. OikawaKirie added a project: clang. Herald added a subscriber: cfe-commits. OikawaKirie requested review of this revision. This patch asserts on some smart pointers that can be statically inf

[PATCH] D91410: [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref

2020-11-18 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D91410#2400018 , @tejohnson wrote: > > ... the new checking is a mix of assert and fatal errors. Is that intended? No. The added checks are based on the checks on other calls to the `Target::createXXX` functions in thi

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

2020-11-19 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie created this revision. OikawaKirie added reviewers: aaron.ballman, avl, mehdi_amini, ilya-biryukov, tejohnson, jansvoboda11. OikawaKirie added projects: LLVM, clang. Herald added subscribers: llvm-commits, cfe-commits, dexonsmith, steven_wu, hiraditya. OikawaKirie requested review of

[PATCH] D91410: [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref

2020-11-20 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 306590. OikawaKirie added a comment. 1. Replace fatal errors with assertions. >> In D91410#2400018 , @tejohnson >> wrote: > > If these are not likely due to user input issues, then perhaps they should > all be as

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

2020-11-22 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. In D91844#2408897 , @dexonsmith wrote: > Is it possible to split these up into separate patches for unrelated code? Since these are reported by one static scan, and these reported places cannot be categorized with others, I c

[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

[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] D89987: [analyzer] [NFC] Rename SymbolRef to SymExprRef

2020-10-22 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Since `SymbolRef` is just a `const SymExpr *` in the current codebase, I'd prefer using `const SymExpr *` directly, just like how `MemRegion` is used, which would be clearer than both `SymbolRef` and `SymExprRef` as far as I am thinking. Different from `ProgramStat

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

  1   2   >