[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D156027#4534090 , @tbaeder wrote: > Note that this patch also supercedes: > > 1. https://reviews.llvm.org/D153616 > 2. https://reviews.llvm.org/D153653 > 3. https://reviews.llvm.org/D147591 > > since it handles those cases

[PATCH] D148982: [clang][Interp] Fix ignoring conditional operators

2023-07-25 Thread Timm Bäder 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 rG2606545b0204: [clang][Interp] Fix ignoring conditional operators (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] 2606545 - [clang][Interp] Fix ignoring conditional operators

2023-07-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-26T07:46:04+02:00 New Revision: 2606545b0204e7d2d6434e78640d5732d9381837 URL: https://github.com/llvm/llvm-project/commit/2606545b0204e7d2d6434e78640d5732d9381837 DIFF: https://github.com/llvm/llvm-project/commit/2606545b0204e7d2d6434e78640d5732d9381837.diff

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Kiva via Phabricator via cfe-commits
imkiva added a comment. Looks like I am reading a very old version of the spec haha. Anyway, thank you all for giving me the newest information and useful links! Thanks!! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156214/new/

[PATCH] D148925: [clang][Interp] Fix discarding void-typed comma expressions

2023-07-25 Thread Timm Bäder 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 rGaed9646d8e29: [clang][Interp] Fix discarding void-typed comma expressions (authored by tbaeder). Changed prior to commit:

[clang] aed9646 - [clang][Interp] Fix discarding void-typed comma expressions

2023-07-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-26T07:45:02+02:00 New Revision: aed9646d8e29c1c5c86be65a2fd97029edf628d9 URL: https://github.com/llvm/llvm-project/commit/aed9646d8e29c1c5c86be65a2fd97029edf628d9 DIFF: https://github.com/llvm/llvm-project/commit/aed9646d8e29c1c5c86be65a2fd97029edf628d9.diff

[PATCH] D156277: [Parser][ObjC] Stop parsing on eof

2023-07-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:749 + if (!Tok.is(tok::eof)) +ConsumeToken(); break; Why is there a `ConsumeToken()` call at all here? The token is already being consumed in line 729. Repository:

[PATCH] D147591: [clang][Interp] Handle CXXTemporaryObjectExprs

2023-07-25 Thread Timm Bäder 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 rGe45d1997686c: [clang][Interp] Handle CXXTemporaryObjectExprs (authored by tbaeder). Changed prior to commit:

[clang] e45d199 - [clang][Interp] Handle CXXTemporaryObjectExprs

2023-07-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-26T07:36:26+02:00 New Revision: e45d1997686c6cb0f98c0dc00191d35b3d3e5f95 URL: https://github.com/llvm/llvm-project/commit/e45d1997686c6cb0f98c0dc00191d35b3d3e5f95 DIFF: https://github.com/llvm/llvm-project/commit/e45d1997686c6cb0f98c0dc00191d35b3d3e5f95.diff

[PATCH] D152793: [RISCV] Add MC layer support for Zicfiss.

2023-07-25 Thread Yeting Kuo via Phabricator via cfe-commits
fakepaper56 updated this revision to Diff 544212. fakepaper56 marked 5 inline comments as done. fakepaper56 added a comment. Use RVInstI for SS_Push. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152793/new/ https://reviews.llvm.org/D152793

[PATCH] D150040: [clang][Interp] Call invalid destructors

2023-07-25 Thread Timm Bäder 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 rG10020791b18f: [clang][Interp] Call invalid destructors (authored by tbaeder). Changed prior to commit:

[clang] 1002079 - [clang][Interp] Call invalid destructors

2023-07-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-26T07:19:02+02:00 New Revision: 10020791b18f344dc480b60712f6f3a5d63e86a2 URL: https://github.com/llvm/llvm-project/commit/10020791b18f344dc480b60712f6f3a5d63e86a2 DIFF: https://github.com/llvm/llvm-project/commit/10020791b18f344dc480b60712f6f3a5d63e86a2.diff

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. This LGTM, I will wait for two days before accepting the revision in case other reviewers might have some more comments/suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/

[PATCH] D152793: [RISCV] Add MC layer support for Zicfiss.

2023-07-25 Thread Yeting Kuo via Phabricator via cfe-commits
fakepaper56 updated this revision to Diff 544209. fakepaper56 added a comment. Address Craig's comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152793/new/ https://reviews.llvm.org/D152793 Files:

[PATCH] D148690: [clang][Interp] Handle __extension__ unary operators

2023-07-25 Thread Timm Bäder 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 rG78e774e0c827: [clang][Interp] Handle __extension__ unary operators (authored by tbaeder). Changed prior to commit:

[clang] 78e774e - [clang][Interp] Handle __extension__ unary operators

2023-07-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-26T07:16:45+02:00 New Revision: 78e774e0c827803ce917da7f1cbdbb40892a1788 URL: https://github.com/llvm/llvm-project/commit/78e774e0c827803ce917da7f1cbdbb40892a1788 DIFF: https://github.com/llvm/llvm-project/commit/78e774e0c827803ce917da7f1cbdbb40892a1788.diff

[clang] 5b78868 - [clang][Interp][NFC] Make some locals const

2023-07-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-26T07:12:47+02:00 New Revision: 5b78868661f42a70fa3006b1db41f78a6178d596 URL: https://github.com/llvm/llvm-project/commit/5b78868661f42a70fa3006b1db41f78a6178d596 DIFF: https://github.com/llvm/llvm-project/commit/5b78868661f42a70fa3006b1db41f78a6178d596.diff

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 544205. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Rename value to str in doc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 Files:

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 2 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/reference-to-constructed-temporary.rst:18 + + const std::string& value("hello"); + xgupta wrote: > PiotrZSL wrote: > >

[PATCH] D144164: [clang][Interp] Handle PtrMemOps

2023-07-25 Thread Timm Bäder 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 rG8cb6e476ccaa: [clang][Interp] Handle PtrMemOps (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 8cb6e47 - [clang][Interp] Handle PtrMemOps

2023-07-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-26T07:04:21+02:00 New Revision: 8cb6e476ccaa62b2621a5f68689a6070592f221d URL: https://github.com/llvm/llvm-project/commit/8cb6e476ccaa62b2621a5f68689a6070592f221d DIFF: https://github.com/llvm/llvm-project/commit/8cb6e476ccaa62b2621a5f68689a6070592f221d.diff

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 544201. sandeepkosuri added a comment. Explicitly mentioned `-fopenmp-version=51` in LIT test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files:

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Note that this patch also supercedes: 1. https://reviews.llvm.org/D153616 2. https://reviews.llvm.org/D153653 3. https://reviews.llvm.org/D147591 since it handles those cases more generally. Comment at: clang/lib/AST/Interp/Context.cpp:131 if

[PATCH] D142569: [OpenMP] Introduce kernel environment

2023-07-25 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 544183. tianshilei1992 added a comment. rebase and fix test issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142569/new/ https://reviews.llvm.org/D142569 Files:

[PATCH] D156223: [RISCV] Resolve a few bugs in RISCVVIntrinsicUtils.cpp

2023-07-25 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Does it possible to add a precommit test case to show that we accept unexpected combination of the type? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156223/new/ https://reviews.llvm.org/D156223

[clang] c56514f - Reland "[LoongArch] Support -march=native and -mtune="

2023-07-25 Thread Weining Lu via cfe-commits
Author: Weining Lu Date: 2023-07-26T10:26:38+08:00 New Revision: c56514f21b2cf08eaa7ac3a57ba4ce403a9c8956 URL: https://github.com/llvm/llvm-project/commit/c56514f21b2cf08eaa7ac3a57ba4ce403a9c8956 DIFF: https://github.com/llvm/llvm-project/commit/c56514f21b2cf08eaa7ac3a57ba4ce403a9c8956.diff

[PATCH] D153114: [clangd] [C++20] [Modules] Support C++20 modules for clangd

2023-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @sammccall gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153114/new/ https://reviews.llvm.org/D153114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/reference-to-constructed-temporary.rst:18 + + const std::string& value("hello"); + PiotrZSL wrote: > xgupta wrote: > > The below comment is not matching, do you

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision. tahonermann added a comment. This revision is now accepted and ready to land. I'm happy with this. I noted one last rename suggestion to maintain consistency, but am accepting. Please give Corentin a final chance to raise any concerns. Thank you for being so

[PATCH] D156247: [Clang] Add a warning on uses of coroutine keywords

2023-07-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > however, if there are important unresolved issues, why did we set > __cpp_impl_coroutine ? The discussion is here: https://discourse.llvm.org/t/rfc-could-we-mark-coroutines-as-unreleased-now/69220. My short summary may be: (1) It is not necessary to claim a

[PATCH] D156201: [ASTImporter] Fix corrupted RecordLayout introduced by circular referenced fields

2023-07-25 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 544168. danix800 added a comment. Remove case #1 (fixed by https://reviews.llvm.org/D155574 from @balazske which is better). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156201/new/

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I have deleted the two TODOs in r02c11c5aed59624046125cf512c12f70d2fa358d Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156214/new/ https://reviews.llvm.org/D156214 ___

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:948 - // TODO: The 'q' extension requires rv64. - // TODO: It is illegal to specify 'e' extensions with 'f' and 'd'. craig.topper wrote: > asb wrote: > > imkiva wrote: > > >

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:948 - // TODO: The 'q' extension requires rv64. - // TODO: It is illegal to specify 'e' extensions with 'f' and 'd'. asb wrote: > imkiva wrote: > > wangpc wrote: > > > I think

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:948 // Additional dependency checks. - // TODO: The 'q' extension requires rv64. - // TODO: It is illegal to specify 'e' extensions with 'f' and 'd'. + // The 'q' extension requires rv64. +

[PATCH] D156239: [X86] Support -march=arrowlake, arrowlake-s, lunarlake

2023-07-25 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 544159. FreddyYe marked an inline comment as done. FreddyYe added a comment. Address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156239/new/ https://reviews.llvm.org/D156239 Files:

[PATCH] D156234: [clang][deps] provide support for cc1 command line scanning

2023-07-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. This looks pretty good! I'm not sure unit testing is the best choice here, since we're not checking for low-level properties or hard-to-observe behavior. In general LIT tests are easier to write/maintain/understand and don't require recompiling, so I'd suggest to

[PATCH] D156214: [LLVM][RISCV] Check more extension dependencies

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:948 // Additional dependency checks. - // TODO: The 'q' extension requires rv64. - // TODO: It is illegal to specify 'e' extensions with 'f' and 'd'. + // The 'q' extension requires rv64. +

[PATCH] D155524: [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an earlier stage

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1095-1102 // Gadgets "claim" variables they're responsible for. Once this loop finishes, // the tracker will only track DREs that weren't claimed by any gadgets, // i.e. not

[PATCH] D155524: [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an earlier stage

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ziqingluo-90 marked an inline comment as done. Closed by commit rGcfcf76c6ad72: [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an…

[clang] cfcf76c - [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an earlier stage

2023-07-25 Thread Ziqing Luo via cfe-commits
Author: Ziqing Luo Date: 2023-07-25T16:58:27-07:00 New Revision: cfcf76c6ad72581917fc65b598e3b64ca28c5ce1 URL: https://github.com/llvm/llvm-project/commit/cfcf76c6ad72581917fc65b598e3b64ca28c5ce1 DIFF: https://github.com/llvm/llvm-project/commit/cfcf76c6ad72581917fc65b598e3b64ca28c5ce1.diff

[PATCH] D156277: [Parser][ObjC] Stop parsing on eof

2023-07-25 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. Fixes https://github.com/llvm/llvm-project/issues/64065 Repository: rG LLVM Github Monorepo

[PATCH] D151373: [libclang] Expose arguments of clang::annotate{_type}

2023-07-25 Thread Fridtjof Mund via Phabricator via cfe-commits
fridtjof updated this revision to Diff 544142. fridtjof added a comment. I fixed the failing IBOutletCollection.m test - there was code to do special handling for the respective attribute type, which my patch accidentally skipped previously. I reordered the generic attribute handling to come

[PATCH] D156274: [NFC] Avoid potential dereferencing of nullptr.

2023-07-25 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir created this revision. schittir added reviewers: aaron.ballman, tahonermann, erichkeane. Herald added a project: All. schittir requested review of this revision. Herald added subscribers: cfe-commits, wangpc. Herald added a project: clang. Repository: rG LLVM Github Monorepo

[PATCH] D155544: [AIX][TLS][clang] Add -maix-small-local-exec-tls clang option.

2023-07-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. LGTM for landing after D156203 and D155600 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Basically, I don't want order-of-magnitude compile-time regressions with large global variables. There are basically two components to that: - That the fast path for emitting globals in C continues be fast. - That we rarely end up using evaluateValue() on large global

[PATCH] D154658: Optimize emission of `dynamic_cast` to final classes.

2023-07-25 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. In D154658#4533476 , @MatzeB wrote: > This change results in some of our builds (distributed Thin-LTO in case that > matters) to fail with missing symbols. At a first glance this seems to emit > VTables in some files where it

[PATCH] D155992: [clangd] Use xxh3_64bits for background index file digests

2023-07-25 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG16d79d26b3b6: [clangd] Use xxh3_64bits for background index file digests (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155992/new/

[clang-tools-extra] 16d79d2 - [clangd] Use xxh3_64bits for background index file digests

2023-07-25 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-07-25T16:02:54-07:00 New Revision: 16d79d26b3b6b7ab4b024f478f05569e0a033c76 URL: https://github.com/llvm/llvm-project/commit/16d79d26b3b6b7ab4b024f478f05569e0a033c76 DIFF: https://github.com/llvm/llvm-project/commit/16d79d26b3b6b7ab4b024f478f05569e0a033c76.diff

[PATCH] D154658: Optimize emission of `dynamic_cast` to final classes.

2023-07-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D154658#4533476 , @MatzeB wrote: > This change results in some of our builds (distributed Thin-LTO in case that > matters) to fail with missing symbols. At a first glance this seems to emit > VTables in some files where it

[clang] 61c7a91 - Commit to a primary definition for a class when we load its first

2023-07-25 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-07-25T15:59:21-07:00 New Revision: 61c7a9140becb19c5b1bc644e54452c6f782f5d5 URL: https://github.com/llvm/llvm-project/commit/61c7a9140becb19c5b1bc644e54452c6f782f5d5 DIFF: https://github.com/llvm/llvm-project/commit/61c7a9140becb19c5b1bc644e54452c6f782f5d5.diff

[PATCH] D154658: Optimize emission of `dynamic_cast` to final classes.

2023-07-25 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. This change results in some of our builds (distributed Thin-LTO in case that matters) to fail with missing symbols. At a first glance this seems to emit VTables in some files where it didn't do this before and then fails to resolve some members of that vtable. I'm in

[PATCH] D156234: [clang][deps] provide support for cc1 command line scanning

2023-07-25 Thread Connor Sughrue via Phabricator via cfe-commits
cpsughrue updated this revision to Diff 544127. cpsughrue edited the summary of this revision. cpsughrue added a comment. Fixed formatting issues CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156234/new/ https://reviews.llvm.org/D156234 Files:

[PATCH] D152793: [RISCV] Add MC layer support for Zicfiss.

2023-07-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:75 // CHECK-NOT: __riscv_zvfbfwma {{.*$}} +// CHECK-NOT: __riscv_zicfisslp {{.*$}} This needs to be renamed to remove lp Comment at:

[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 544128. nickdesaulniers added a comment. - rebase for presubmit builders Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76096/new/ https://reviews.llvm.org/D76096 Files: clang/docs/ReleaseNotes.rst

[PATCH] D154784: [clang] Fix crash caused by PseudoObjectExprBitfields::NumSubExprs overflow

2023-07-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/include/clang/AST/Stmt.h:596-597 -// These don't need to be particularly wide, because they're -// strictly limited by the forms of expressions we permit. -unsigned NumSubExprs : 8; -unsigned ResultIndex : 32 -

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 544126. nickdesaulniers added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156175/new/ https://reviews.llvm.org/D156175 Files: clang/lib/CodeGen/CGExprConstant.cpp Index:

[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Nick Desaulniers 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 rGd1199808afa5: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of… (authored by nickdesaulniers). Changed prior to commit:

[clang] d119980 - [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-07-25T15:27:08-07:00 New Revision: d1199808afa5b46dfb6738f123b869d0e2fa050a URL: https://github.com/llvm/llvm-project/commit/d1199808afa5b46dfb6738f123b869d0e2fa050a DIFF:

[PATCH] D155769: [Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-07-25 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added a comment. Interesting. Comment at: clang/docs/StdParSupport.rst:349 + +thread t0{[&]() { + hipSetDevice(accelerator_0); Comment at: clang/docs/StdParSupport.rst:354 +}}; +thread t1{[&]() { +

[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. what's the "exit criteria" for this patch (https://reviews.llvm.org/D76096)? in https://reviews.llvm.org/D76096#4523828 and https://reviews.llvm.org/D76096#4524003 you mention InitListExpr and StringLiteral. In https://reviews.llvm.org/D156185#4533274 I

[PATCH] D156189: [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter fix-its share common code

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1824 + + if (!IdentText) +return {}; t-rasmud wrote: > When will this condition be satisfied? I just want to understand if there are > code examples where there is no

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 544114. RIscRIpt marked 4 inline comments as done. RIscRIpt added a comment. Rename diagnostic messages constants Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132 +case CK_NullToPointer: { + if (llvm::Constant *C = Visit(subExpr, destType)) +if (C->isNullValue()) + return CGM.EmitNullConstant(destType);

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 544113. nickdesaulniers marked 2 inline comments as done. nickdesaulniers added a comment. - remove the check for isNullValue as per @efriedma Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156175/new/

[PATCH] D156189: [-Wunsafe-buffer-usage] Refactor to let local variable fix-its and parameter fix-its share common code

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 544111. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156189/new/ https://reviews.llvm.org/D156189 Files: clang/lib/Analysis/UnsafeBufferUsage.cpp clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-local-var-span.cpp

[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. I don't have any concern with this specific patch; LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156185/new/

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132 +case CK_NullToPointer: { + if (llvm::Constant *C = Visit(subExpr, destType)) +if (C->isNullValue()) + return CGM.EmitNullConstant(destType);

[PATCH] D155997: [Phase Ordering] Don't speculate in SimplifyCFG before PGO annotation

2023-07-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 544109. tejohnson added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155997/new/ https://reviews.llvm.org/D155997 Files: clang/test/CodeGen/pgo-sample-preparation.c

[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D156185#4533083 , @efriedma wrote: > No, that's taking the address of a string literal lvalue. ah! sorry, yeah `const char* foo = "foo";` vs `char foo[10] = "x";` That AST looks like: `-VarDecl 0x55eaf6075ba8

[PATCH] D154838: [analyzer] Add check for null pointer passed to %p of printf family

2023-07-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > Should I cover non-standard (i.e., non ISO C standard) functions from the > `printf_s` family? Should I cover non-standard functions like `dprintf`? The static analyzer, unlike the compiler proper, isn't required to treat all code fairly. It's ok to have different

[PATCH] D154186: [clang][DeclPrinter] Fix AST print of delegating constructors

2023-07-25 Thread Timo Stripf via Phabricator via cfe-commits
strimo378 added a comment. I plan around half a dozen patches only for ast-print functionality. I would love to land it myself and will asked for commit privileges. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154186/new/

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1131-1132 +case CK_NullToPointer: { + if (llvm::Constant *C = Visit(subExpr, destType)) +if (C->isNullValue()) + return CGM.EmitNullConstant(destType);

[clang] b6847ed - For #64088: mark vtable as used if we might emit a reference to it.

2023-07-25 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-07-25T14:42:10-07:00 New Revision: b6847edfc235829b37dd6d734ef5bbfa0a58b6fc URL: https://github.com/llvm/llvm-project/commit/b6847edfc235829b37dd6d734ef5bbfa0a58b6fc DIFF: https://github.com/llvm/llvm-project/commit/b6847edfc235829b37dd6d734ef5bbfa0a58b6fc.diff

[PATCH] D156188: [-Wunsafe-buffer-usage] Refactor and improve for parameter fix-its

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 544104. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156188/new/ https://reviews.llvm.org/D156188 Files: clang/lib/Analysis/UnsafeBufferUsage.cpp clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-parm-span.cpp

[PATCH] D156172: [clang][CodeGen] Emit annotations for function declarations.

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Slightly messed up my example because I forgot the function was unprototyped. The following should show what I mean: void foo(void); void *xxx = (void*)foo; __attribute__((annotate("bar"))) void foo(){} In terms of where the right place is, I don't recall the

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 544101. akhuang added a comment. add TODO Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files: clang/include/clang/CodeGen/CGFunctionInfo.h

[PATCH] D156182: [clang][CodeGenModule] remove declaration of GetAddrOfConstantString

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGef103adf60c6: [clang][CodeGenModule] remove declaration of GetAddrOfConstantString (authored by nickdesaulniers). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] ef103ad - [clang][CodeGenModule] remove declaration of GetAddrOfConstantString

2023-07-25 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-07-25T14:25:25-07:00 New Revision: ef103adf60c6fccd3cc6d76b362c1c37c41da30f URL: https://github.com/llvm/llvm-project/commit/ef103adf60c6fccd3cc6d76b362c1c37c41da30f DIFF:

[PATCH] D156154: [clang][ConstExprEmitter] handle IntegerLiterals

2023-07-25 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG15a484bf6990: [clang][ConstExprEmitter] handle IntegerLiterals (authored by nickdesaulniers). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156154/new/

[clang] 15a484b - [clang][ConstExprEmitter] handle IntegerLiterals

2023-07-25 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-07-25T14:12:50-07:00 New Revision: 15a484bf6990c5c3b759f5bbf99055612c20b924 URL: https://github.com/llvm/llvm-project/commit/15a484bf6990c5c3b759f5bbf99055612c20b924 DIFF:

[PATCH] D156261: [NFC] Cast unchecked return values to void.

2023-07-25 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir created this revision. schittir added reviewers: tahonermann, aaron.ballman. Herald added a project: All. schittir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1981 + // parsed yet). + assert(getLangOpts().MicrosoftExt); + RIscRIpt wrote: > I think I should remove this assertion so this function would be usable > without MS ext, on the other

[PATCH] D156172: [clang][CodeGen] Emit annotations for function declarations.

2023-07-25 Thread Brendan Dahl via Phabricator via cfe-commits
brendandahl added a comment. That example appears to still work the same with my patch: @xxx = global ptr @foo, align 8 @.str = private unnamed_addr constant [4 x i8] c"bar\00", section "llvm.metadata" @.str.1 = private unnamed_addr constant [8 x i8] c"main2.c\00", section

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. I think I'm happy with this. I noted two code changes that I think are no longer needed and offered some final suggestions on some names. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:118-120 +def ext_expand_predef_ms : ExtWarn< +

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/lib/CodeGen/CGClass.cpp:3094 + // reason the name doesn't look as expected then just tack __impl to the + // front. + StringRef CallOpName =

[PATCH] D155524: [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an earlier stage

2023-07-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. LGTM, thanks!! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1095-1102 // Gadgets "claim" variables they're responsible for. Once this loop finishes, // the tracker will only track DREs that weren't claimed by any

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 544090. akhuang added a comment. go back to previous __impl naming method Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files:

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:263 State.StartOfStringLiteral = 0; + State.NoLineBreak = false; State.StartOfLineLevel = 0; Was this uninitialized? Comment at:

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1981 + // parsed yet). + assert(getLangOpts().MicrosoftExt); + I think I should remove this assertion so this function would be usable without MS ext, on the other hand it would be a noop

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 544088. RIscRIpt added a comment. Removed irrelevant changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:3095 + StringRef CallOpName = CallOpFn->getName(); + std::string ImplName = ("__impl" + CallOpName).str(); + akhuang wrote: > rnk wrote: > > akhuang wrote: > > > The old code tried to find

[PATCH] D156192: [-Wunsafe-buffer-usage] Stop generating incorrect fix-its for variable declarations with unsupported specifiers

2023-07-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM! Yeah I agree that we can eventually support a lot of these incrementally, but it's great to establish a safe baseline first. > If there are other specifiers involved, they may be

[PATCH] D156128: [Clang][AArch64] Fix up immediate range of f64f64 mopa/mops intrinsics

2023-07-25 Thread Bryan Chan via Phabricator via cfe-commits
bryanpkc accepted this revision. bryanpkc added a comment. This revision is now accepted and ready to land. Thanks for the catch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156128/new/ https://reviews.llvm.org/D156128

[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

2023-07-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. No, that's taking the address of a string literal lvalue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156185/new/ https://reviews.llvm.org/D156185 ___ cfe-commits mailing

[PATCH] D155526: [-Wunsafe-buffer-usage] Fix a fallthrough case in UPCStandalonePointer getFixits

2023-07-25 Thread Rashmi Mudduluru via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG070358ec9235: [-Wunsafe-buffer-usage] Fix a fallthrough case in UPCStandalonePointer getFixits (authored by t-rasmud). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior

[clang] 070358e - [-Wunsafe-buffer-usage] Fix a fallthrough case in UPCStandalonePointer getFixits

2023-07-25 Thread Rashmi Mudduluru via cfe-commits
Author: Rashmi Mudduluru Date: 2023-07-25T13:40:33-07:00 New Revision: 070358ec92350c13b0b6c60fbb03bf35a7a00251 URL: https://github.com/llvm/llvm-project/commit/070358ec92350c13b0b6c60fbb03bf35a7a00251 DIFF:

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CGClass.cpp:3095 + StringRef CallOpName = CallOpFn->getName(); + std::string ImplName = ("__impl" + CallOpName).str(); + rnk wrote: > akhuang wrote: > > The old code tried to find the "" part of the

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 544086. akhuang added a comment. Add some functions to MicrosoftMangle so we can pass in a custom function name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.h:87-93 +/// Return true if this token is a predefined macro +/// unexpandable by MSVC preprocessor. +inline bool isUnexpandableMsMacro(TokenKind K) { + return K == tok::kw___FUNCTION__ || K ==

  1   2   3   4   >