[PATCH] D157238: [clang][ASTImporter] Add import of 'DependentSizedExtVectorType'

2023-08-06 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 547615. danix800 added a comment. Apply git-clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157238/new/ https://reviews.llvm.org/D157238 Files: clang/docs/LibASTMatchersReference.html clang/doc

[PATCH] D157248: [clang][ASTMatcher] Add Matcher 'convertVectorExpr'

2023-08-06 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added reviewers: PiotrZSL, aaron.ballman. danix800 added a project: clang. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. Add Matcher `convertVectorExpr`. Repository: rG LLVM Github Monor

[PATCH] D157248: [clang][ASTMatcher] Add Matcher 'convertVectorExpr'

2023-08-06 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 547625. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157248/new/ https://reviews.llvm.org/D157248 Files: clang/docs/LibASTMatchersReference.html clang/docs/ReleaseNotes.rst clang/include/clang/ASTMatcher

[PATCH] D157249: [clang][ASTImporter] Add import of 'ConvertVectorExpr'

2023-08-06 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added reviewers: balazske, aaron.ballman. danix800 added a project: clang. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: All. danix800 requested review of this revision. Heral

[PATCH] D157238: [clang][ASTImporter] Add import of 'DependentSizedExtVectorType'

2023-08-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D157238#4565051 , @balazske wrote: > `ASTImporter` part looks good, I did not check the generated documentation > for correctness. Matcher part will be committed in https://reviews.llvm.org/D157237, these code is added here

[PATCH] D157249: [clang][ASTImporter] Add import of 'ConvertVectorExpr'

2023-08-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D157249#4565580 , @aaron.ballman wrote: >> Depends on https://reviews.llvm.org/D157248 > > FWIW, this would usually be done via a "patch stack": > https://kurtisnusbaum.medium.com/stacked-diffs-keeping-phabricator-diffs-smal

[PATCH] D157249: [clang][ASTImporter] Add import of 'ConvertVectorExpr'

2023-08-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 547781. danix800 added a comment. Cleanup since D157248 is landed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157249/new/ https://reviews.llvm.org/D157249 Files: clang/

[PATCH] D157238: [clang][ASTImporter] Add import of 'DependentSizedExtVectorType'

2023-08-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 547783. danix800 added a comment. Cleanup since D157237 is landed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157238/new/ https://reviews.llvm.org/D157238 Files: clang/

[PATCH] D157238: [clang][ASTImporter] Add import of 'DependentSizedExtVectorType'

2023-08-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D157238#4565442 , @balazske wrote: > In D157238#4565260 , @danix800 > wrote: > >> In D157238#4565051 , @balazske >> wrote: >> >>> `ASTImport

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a reviewer: aaron.ballman. danix800 added a project: clang. Herald added a subscriber: ChuanqiXu. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-proje

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/Sema/SemaCoroutine.cpp:321 - return S.BuildCallExpr(nullptr, Result.get(), Loc, Args, Loc, nullptr); + auto EndLoc = Args.empty() ? Loc : Args.back()->getBeginLoc(); + return S.BuildCallExpr(nullptr, Result.get(), Loc, Ar

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 547843. danix800 added a comment. Use `getEndLoc()` instead of `getBeginLoc()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157296/new/ https://reviews.llvm.org/D157296 Files: clang/lib/Sema/SemaCoroutine

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. 1. Use invalid loc: `SourceLocation()` ExprWithCleanups 0x55d1067162c8 'void' `-CoyieldExpr 0x55d106716280 'void' |-CXXMemberCallExpr 0x55d106715ed8 'std::suspend_always':'std::suspend_always' | |-MemberExpr 0x55d106715ea8 '' .yield_value 0x55d10670b220

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-08 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 548434. danix800 edited the summary of this revision. danix800 added a comment. Cleanup duplicated boilerplate testcase code. Append a few extra child nodes of `CoyieldExpr` dumped in testcase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157296/n

[PATCH] D157296: [AST][Coroutine] Fix CoyieldExpr missing end loc

2023-08-08 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. I'll finish this patch when CI build succeeds. For future improvement I might start with the idea of marking those generated inner exprs as implicit, this seems to be easier. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157296/new/ https://reviews.llvm.org/D1

[PATCH] D157584: [clang][Sema] Skip access check on arrays of zero-length element

2023-08-09 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. Bound check on array of zero-sized element isn't meaningful. Fixes https://github.com/llvm/llvm-project/issues/64564

[PATCH] D158948: [clang][ASTImporter] Add import of type-related nodes

2023-09-08 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158948#4642422 , @haowei wrote: > Looking at > https://github.com/llvm/llvm-project/blob/37a20cc68f545647e614c5ba4ae311dc3fd277e9/clang/lib/Testing/CommandLineArgs.cpp#L47, > this is were the unreachable code was hit. Is it

[PATCH] D158948: [clang][ASTImporter] Add import of type-related nodes

2023-09-08 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. @haowei I noticed https://github.com/llvm/llvm-project/pull/65823, is it related to your work? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158948/new/ https://reviews.llvm.org/D158948 __

[PATCH] D154701: Overridden CXXMethodDecl::isVirtual() assertion failed before fully imported.

2023-07-07 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. For non-pure methods with no written `virtual`, `isVirtual()` tries to count size of overridden methods. For importing,

[PATCH] D154764: [clang] ASTImport: force recomputing ASTRecordLayout when importing

2023-07-08 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. Herald added a subscriber: martong. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. RecordLayout is cached for RecordDecl. Force recomputing in case staled one is retu

[PATCH] D154764: [clang] ASTImport: force recomputing ASTRecordLayout when importing

2023-07-09 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 538500. danix800 added a comment. Apply git-clang-format. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154764/new/ https://reviews.llvm.org/D154764 Files: clang/include/clang/AST/ASTContext.h clang/lib/AST/ExprConstant.cpp clang/lib/AST/Rec

[PATCH] D154983: [clang-extdef-mapping] register necessary targest for ms-style asm block

2023-07-11 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang-tools-extra. Herald added a project: All. danix800 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Without targets registered gives: `error: MS-style inline assembly is not av

[PATCH] D154701: [clang] Overridden CXXMethodDecl::isVirtual() assertion failed before fully imported.

2023-07-11 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/test/Analysis/ctu-astimport-virtual-assertion/main.cpp:22 + +#include "Inputs/input.h" balazske wrote: > Such tests are not in the //Analysis// folder but in the //ASTMerge// folder > instead. I would say that th

[PATCH] D154983: [clang-extdef-mapping] register necessary targest for ms-style asm block

2023-07-11 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. I don't have merge permission, can anyone do the merge plz? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154983/new/ https://reviews.llvm.org/D154983 ___ cfe-commits mailing li

[PATCH] D154983: [clang-extdef-mapping] register necessary targest for ms-style asm block

2023-07-12 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. Thanks! @thieta Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154983/new/ https://reviews.llvm.org/D154983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D154701: [ASTImporter] Fix 'isVirtual()' assert failure while importing overridden methods

2023-07-13 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 539910. danix800 retitled this revision from "[clang] Overridden CXXMethodDecl::isVirtual() assertion failed before fully imported." to "[ASTImporter] Fix 'isVirtual()' assert failure while importing overridden methods". danix800 edited the summary of this

[PATCH] D154764: [ASTImporter] Fields are imported first and reordered for correct layout.

2023-07-13 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 540254. danix800 retitled this revision from "[clang] [ASTImporter]: force recomputing ASTRecordLayout when importing" to "[ASTImporter] Fields are imported first and reordered for correct layout.". danix800 edited the summary of this revision. danix800 set

[PATCH] D155321: [clang][Analysis] ExprMutationAnalyzer: break infinite recursion on recursive function call

2023-07-14 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a reviewer: shuaiwang. danix800 added projects: clang, clang-tools-extra. Herald added subscribers: PiotrZSL, carlosgalvezp, manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. Herald added a reviewer: NoQ. Herald added

[PATCH] D155396: [Sema][ObjC] Propagating value-dependent errors into BlockExpr

2023-07-16 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a reviewer: aaron.ballman. danix800 added a project: clang. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. Fix https://github.com/llvm/llvm-project/issues/63863 Repository: rG LLVM

[PATCH] D154764: [ASTImporter] Fields are imported first and reordered for correct layout.

2023-07-17 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D154764#4505339 , @balazske wrote: > If I see correctly this change does that the re-ordered members are imported > before all other, specially fields come before functions. This way order of > fields is already correct when

[PATCH] D154764: [ASTImporter] Fields are imported first and reordered for correct layout.

2023-07-17 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 541037. danix800 added a comment. Remove unnecessary braces. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154764/new/ https://reviews.llvm.org/D154764 Files: clang/lib/AST/ASTImporter.cpp clang/unittests

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-23 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. danix800

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-24 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158707#4613743 , @donat.nagy wrote: > Thanks for creating this commit, it's a useful improvement! > > I added some inline comments on minor implementation details; moreover, note > that "Releted checkers:" (instead of "rela

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-24 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:202-203 // CHECK UPPER BOUND - DefinedOrUnknownSVal Size = getDynamicExtent(state, Reg, svalBuilder); + SVal Size = svalBuilder.convertToArrayIndex( + getDynamicExtent(

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-24 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp:180-183 + SVal CountReached = + SVB.evalBinOp(State, BO_GE, Idx, Count, ASTCtx.BoolTy); + if (!CountReached.isUndef() && + State->assume(*CountReac

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-24 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/test/Analysis/array-bound-v2-constraint-check.c:1 -// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.security.ArrayBoundV2,debug.ExprInspection \ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix,alpha.security.Array

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-24 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/DynamicExtent.cpp:92 + + return ElementCount.castAs(); +} donat.nagy wrote: > Are you sure that this cannot cause crashes? (E.g. did you check that there > is no corner case when `getElem

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-24 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158707#4614100 , @steakhal wrote: > As a general comment on requiring all extents to be of unsigned APSInts. > Checkers, like the `MallocChecker`, binds the result of arbitrary > expression's values (the argument of malloc,

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-24 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 553335. danix800 edited the summary of this revision. danix800 added a comment. 1. `getDynamicExtent()` can return both signed/unsigned results. They are converted to signed version as `ArrayIndexType` to keep consistency. All other APIs return this version

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-24 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 553351. danix800 edited the summary of this revision. danix800 added a comment. `MPIChecker` is not strictly related to this revision. Will be moved into another revison. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-08-24 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added reviewers: steakhal, donat.nagy, dcoughlin. danix800 added a project: clang. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. H

[PATCH] D158858: [analyzer] MPIChecker: add defensive checking (check against nullptr)

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added reviewers: donat.nagy, steakhal. danix800 added a project: clang. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald added

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 553514. danix800 edited the summary of this revision. danix800 added a comment. 1. Move out complicated computation into separate function; 2. Only check `ConreteInt` request count. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158813#4616816 , @steakhal wrote: > Let me try to summarize some of the variables: > > So, given an invocation like `MPI_Waitall(C, Requests, Statues)`: > > - `MR` is `lval(Requests)` > - `ElementCount` is the number of eleme

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp:46-48 +if (!ErrorNode) + return; + steakhal wrote: > If these hunks are not closely related to the issue you intend to fix in this > PR, I'd suggess

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp:185-188 +CharUnits ElemSizeInChars = ASTCtx.getTypeSizeInChars(ElemType); +int64_t ElemSizeInBits = +(ElemSizeInChars.isZero() ? 1 : ElemSizeInChars.getQuantit

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp:189-190 +ASTCtx.getCharWidth(); +const NonLoc MROffset = +SVB.makeArrayIndex(MR->getAsOffset().getOffset() / ElemSizeInBits); steakhal w

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/test/Analysis/mpichecker.cpp:286-288 + for (int i = 0; i < 3; ++i) +MPI_Ireduce(MPI_IN_PLACE, &buf, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD, +&rs.req[i]); steakhal wrote: > This loop here im

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp:192-198 +SVal Count = CE.getArgSVal(0); +for (size_t i = 0; i < ArrSize; ++i) { + const NonLoc Idx = Ctx.getSValBuilder().makeArrayIndex(i); + auto CountReac

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp:195 + const NonLoc Idx = Ctx.getSValBuilder().makeArrayIndex(i); + auto CountReached = SVB.evalBinOp(State, BO_GE, Idx, Count, ASTCtx.BoolTy) +

[PATCH] D158858: [analyzer] MPIChecker: add defensive checking (check against nullptr)

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158858#4617510 , @steakhal wrote: > Makes sense. > Would thus test crash without the early returns? And now they wouldn't? Yes, the original crash shown in https://godbolt.org/z/39P7W6KPa Repository: rG LLVM Github Monor

[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. Herald added a subscriber: ChuanqiXu. Herald added a project: All. danix800 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add a few type-related Matchers - bitIntType - constantMatrixType - dependentAddres

[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158872#4618252 , @PiotrZSL wrote: > LGTM. > Nothing fancy, looks straight forward. > You may want to wait for an Aaron Ballman opinion. Thanks for the reviewing. Ping @aaron.ballman, could you please take a look at this rev

[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

2023-08-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 553697. danix800 added a comment. Update docs for `bitIntType` & `dependentBitIntType`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158872/new/ https://reviews.llvm.org/D158872 Files: clang/docs/LibASTMat

[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

2023-08-26 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 553779. danix800 added a comment. Update doc: fix improper naming in objc testcase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158872/new/ https://reviews.llvm.org/D158872 Files: clang/docs/LibASTMatchers

[PATCH] D158948: [clang][ASTImporter] Add import of type-related nodes

2023-08-26 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a reviewer: balazske. danix800 added a project: clang. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: All. danix800 requested review of this revision. Herald added a subs

[PATCH] D158953: [analyzer] MmapWriteExecChecker: use getAs instead of castAs

2023-08-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a reviewer: steakhal. danix800 added a project: clang. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald adde

[PATCH] D158953: [analyzer] MmapWriteExecChecker: use getAs instead of castAs

2023-08-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158953#4620125 , @steakhal wrote: > Could you please simplify the test case? > You could basically get rid of everything there, except for forwarding one > top level parameter as the proto argument to the mmap call. No prob

[PATCH] D158953: [analyzer] MmapWriteExecChecker: use getAs instead of castAs

2023-08-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 553798. danix800 added a comment. Simplify testcase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158953/new/ https://reviews.llvm.org/D158953 Files: clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.c

[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

2023-08-28 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158872#4622124 , @aaron.ballman wrote: > Are these matchers going to be used in-tree (by clang-tidy, or something > else)? We typically do not add new AST matches until there's a need for them > because the AST matchers ha

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-29 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/DynamicExtent.cpp:34 +if (auto SSize = +SVB.convertToArrayIndex(*Size).getAs()) + return *SSize; donat.nagy wrote: > I think it's a good convention if `getDynamicExtent

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-29 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 554383. danix800 added a comment. 1. Cleanup unnecessary undef/zero checking; 2. Use better defensive API for getting `ConstantArrayType`; 3. Comment on bool argument for readability; 4. Add more test for extent with offset cases. Repository: rG LLVM Gith

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-29 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158707#4621377 , @steakhal wrote: > In D158707#4621270 , @donat.nagy > wrote: > >> In D158707#4621135 , @steakhal >> wrote: >> >>> Oh, so w

[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

2023-08-29 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158872#4626272 , @sammccall wrote: > In D158872#4626095 , @aaron.ballman > wrote: > >> Out of curiosity, are you testing on Windows with MSVC? My understanding on >> build time perf

[PATCH] D158948: [clang][ASTImporter] Add import of type-related nodes

2023-08-29 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 554545. danix800 added a comment. 1. Simplify error handling 2. Remove unnecessary tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158948/new/ https://reviews.llvm.org/D158948 Files: clang/lib/AST/ASTIm

[PATCH] D158948: [clang][ASTImporter] Add import of type-related nodes

2023-08-29 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. Changes planned for https://reviews.llvm.org/D158872 is still under discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158948/new/ https://reviews.llvm.org/D158948 ___ cf

[PATCH] D159163: [analyzer][NFC] Workaround miscompilation on recent MSVC

2023-08-29 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a reviewer: steakhal. danix800 added a project: clang. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: NoQ. Herald adde

[PATCH] D158872: [clang][ASTMatchers] Add a few type-related Matchers

2023-08-29 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158872#4627313 , @PiotrZSL wrote: > From a mine perspective when it comes to clang-tidy: > > - I personally do not care about Objective-C specific matchers - I do not > plan to use them. > - I personally avoid using "Type" b

[PATCH] D158948: [clang][ASTImporter] Add import of type-related nodes

2023-08-30 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 554603. danix800 added a comment. Pulling local matchers for testcases, since https://reviews.llvm.org/D158872 is abandoned. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158948/new/ https://reviews.llvm.org/D158948 Files: clang/lib/AST/ASTImpo

[PATCH] D159163: [analyzer][NFC] Workaround miscompilation on recent MSVC

2023-08-30 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D159163#4627497 , @steakhal wrote: > Feel free to merge it. Thanks! > I'd be curious to see if this bug is tracked at Microsoft. I searched but no result so I submitted it to MS: https://developercommunity.visualstudio.com/t

[PATCH] D159263: [clang-tidy] misc-include-cleaner: remove duplicated includes & fixes

2023-08-31 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added reviewers: VitaNuo, kadircet, sammccall. danix800 added a project: clang-tools-extra. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. danix800 requested review of this revisi

[PATCH] D159263: [clang-tidy] misc-include-cleaner: remove duplicated includes & fixes

2023-08-31 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp:227 + << Inc.SymRef.Target.name(); + if (!AlreadyInserted.contains(Inc.Missing.resolvedPath())) { +DB << FixItHint::CreateInsertion( sammcc

[PATCH] D159263: [clang-tidy] misc-include-cleaner: remove duplicated includes & fixes

2023-08-31 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp:169 + else +Unused.push_back(&I); + continue; sammccall wrote: > If we want this policy, it should be provided at the include-cleaner library

[PATCH] D159263: [clang-tidy] misc-include-cleaner: fix duplicated fixes

2023-08-31 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 555059. danix800 retitled this revision from "[clang-tidy] misc-include-cleaner: remove duplicated includes & fixes" to "[clang-tidy] misc-include-cleaner: fix duplicated fixes". danix800 edited the summary of this revision. danix800 added a comment. 1. Use

[PATCH] D158707: [analyzer] Fix a few size-type signedness inconsistency related to DynamicExtent

2023-08-31 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. Thanks for clarifying! If no further comments I'll commit this revison in a day or two! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158707/new/ https://reviews.llvm.org/D158707 _

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-09-01 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. https://github.com/llvm/llvm-project/commit/12559064e05a11e8418425de59d8745f0cfb1122 mistakingly linked here. The actual revision is D158707 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-09-01 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D158499#4634166 , @steakhal wrote: > @danix800 FYI I think you used the wrong revision link in the commit. Maybe > mark this revision as "abandoned" again, to reflect the actual status. Sorry for this mistake. D158707

[PATCH] D159263: [clang-tidy] misc-include-cleaner: avoid duplicated fixes

2023-09-03 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. Ping @kadircet~, could you please take a look at this revision? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159263/new/ https://reviews.llvm.org/D159263 ___ cfe-commits mailin

[PATCH] D159263: [clang-tidy] misc-include-cleaner: avoid duplicated fixes

2023-09-05 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D159263#4638167 , @kadircet wrote: > Thanks a lot for the patch @danix800 ! > > I initially was rather focused on behavior of this check in workflows that > require seeing "self-contained-diags", but also I rather see the bul

[PATCH] D159263: [clang-tidy] misc-include-cleaner: avoid duplicated fixes

2023-09-05 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 555867. danix800 edited the summary of this revision. danix800 added a comment. 1. Revert to internal set (not using `IncludeCleaner`); 2. Only do deduplication when not `areDiagsSelfContained()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

2023-09-05 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. Ping~, could anyone have a look at this revision please? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158813/new/ https://reviews.llvm.org/D158813 ___ cfe-commits maili

[PATCH] D159263: [clang-tidy] misc-include-cleaner: avoid duplicated fixes

2023-09-05 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. Duplicated to https://github.com/llvm/llvm-project/pull/65431, abandon this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159263/new/ https://reviews.llvm.org/D159263 ___ c

[PATCH] D144780: Explicit cast on customized offsetof should not be ignored when evaluating as const

2023-02-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 created this revision. danix800 added a project: clang. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Herald added a project: All. danix800 requested review of this revision. Herald added a subscriber: cfe-commits. If ignored, the subexpr is a UnaryOperator (&

[PATCH] D144780: Explicit cast on customized offsetof should not be ignored when evaluating as const

2023-02-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. In D144780#4154487 , @steakhal wrote: > I love it. Short, to the point. Thanks. > I think this is the right way to fix this. > Good job. > Can you merge the change? Or should I do it on you behalf? I've no permission to merge, p

[PATCH] D144780: Explicit cast on customized offsetof should not be ignored when evaluating as const

2023-02-27 Thread Ding Fei via Phabricator via cfe-commits
danix800 added a comment. danix800 (danix...@gmail.com) is OK, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144780/new/ https://reviews.llvm.org/D144780 ___ cfe-commits mailing list cfe-commits@

<    1   2