[PATCH] D156948: [clang][modules] Add -Wsystem-headers-in-module=

2023-08-08 Thread Ian Anderson via Phabricator via cfe-commits
iana accepted this revision. iana added inline comments. Comment at: clang/include/clang/Basic/DiagnosticOptions.h:128 + /// whether -Wsystem-headers is enabled on a per-module basis. + std::vector SystemHeaderWarningsModules; + benlangmuir wrote: >

[PATCH] D157474: [RISCV] Add missing Xsfvcp extension check in clang sema

2023-08-08 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat created this revision. Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD,

[PATCH] D157471: [OpenMP][OMPD][Doc] Update the implementation details of OMPD

2023-08-08 Thread Vignesh Balasubramanian via Phabricator via cfe-commits
Vigneshbalu created this revision. Herald added subscribers: guansong, yaxunl. Herald added a project: All. Vigneshbalu requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald added a project: clang. Updating the

[clang-tools-extra] ebb0a21 - [GlobPattern] Update invalid glob pattern diagnostic for unmatched '['

2023-08-08 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-08-08T20:25:10-07:00 New Revision: ebb0a210995dcf69d9696f8e14629e1378e63a21 URL: https://github.com/llvm/llvm-project/commit/ebb0a210995dcf69d9696f8e14629e1378e63a21 DIFF: https://github.com/llvm/llvm-project/commit/ebb0a210995dcf69d9696f8e14629e1378e63a21.diff

[clang] 201c105 - [NFC] [C++20] [Modules] Adopt a test case from MSVC

2023-08-08 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-08-09T11:14:43+08:00 New Revision: 201c10537a3c1ad4a86b840834c204575d10d589 URL: https://github.com/llvm/llvm-project/commit/201c10537a3c1ad4a86b840834c204575d10d589 DIFF: https://github.com/llvm/llvm-project/commit/201c10537a3c1ad4a86b840834c204575d10d589.diff

[PATCH] D157066: [clang][modules][deps] Create more efficient API for visitation of `ModuleFile` inputs

2023-08-08 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai accepted this revision. vsapsai added a comment. The existing `FilenameAsRequested` usage looks good to me. Unfortunately, don't know how to make sure all places where `FilenameAsRequested` is required instead of `Filename` are updated. Repository: rG LLVM Github Monorepo CHANGES

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

2023-08-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Got it. The explanation makes sense. A well designed and scaling solution is what I (and probably every one) want. Then from the expectation, the difference between supporting header modules and C++20 named modules from the **user** side may be: - For supporting

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-08 Thread Lu Weining via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. SixWeining marked an inline comment as done. Closed by commit rGf62c9252fc0f: [LoongArch] Support -march=native and -mtune= (authored by SixWeining). Repository: rG

[clang] f62c925 - [LoongArch] Support -march=native and -mtune=

2023-08-08 Thread Weining Lu via cfe-commits
Author: Weining Lu Date: 2023-08-09T10:29:50+08:00 New Revision: f62c9252fc0f1fa0a0f02033659db052c2202a4c URL: https://github.com/llvm/llvm-project/commit/f62c9252fc0f1fa0a0f02033659db052c2202a4c DIFF: https://github.com/llvm/llvm-project/commit/f62c9252fc0f1fa0a0f02033659db052c2202a4c.diff

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-08 Thread Lu Weining via Phabricator via cfe-commits
SixWeining marked an inline comment as done. SixWeining added inline comments. Comment at: clang/lib/Basic/Targets/LoongArch.cpp:203 + StringRef ArchName = getCPU(); + Builder.defineMacro("__loongarch_arch", Twine("\"") + ArchName + Twine("\"")); + MaskRay

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-08 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 548442. SixWeining marked an inline comment as done. SixWeining added a comment. Address @MaskRay's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155824/new/ https://reviews.llvm.org/D155824

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

[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

[PATCH] D157467: [RISCV] Add missing REQUIRES for zvk-invalid.c test

2023-08-08 Thread Brandon Wu 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 rGadb76c31ec42: [RISCV] Add missing REQUIRES for zvk-invalid.c test (authored by 4vtomat). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] adb76c3 - [RISCV] Add missing REQUIRES for zvk-invalid.c test

2023-08-08 Thread via cfe-commits
Author: 4vtomat Date: 2023-08-08T18:45:37-07:00 New Revision: adb76c31ec42a12690ae0c86edd368f7f066480d URL: https://github.com/llvm/llvm-project/commit/adb76c31ec42a12690ae0c86edd368f7f066480d DIFF: https://github.com/llvm/llvm-project/commit/adb76c31ec42a12690ae0c86edd368f7f066480d.diff LOG:

[PATCH] D157467: [RISCV] Add missing REQUIRES for zvk-invalid.c test

2023-08-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung accepted this revision. dyung added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157467/new/ https://reviews.llvm.org/D157467 ___

[PATCH] D157467: [RISCV] Add missing REQUIRES for zvk-invalid.c test

2023-08-08 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat created this revision. Herald added subscribers: jobnoorman, VincentWu, vkmr, luismarques, sameer.abuasal, s.egerton, Jim, benna, psnobl, rogfer01, shiva0217, kito-cheng, simoncook, asb, arichardson. Herald added a project: All. 4vtomat requested review of this revision. Herald added

[PATCH] D138810: [RISCV] Support vector crypto extension C intrinsics

2023-08-08 Thread Brandon Wu via Phabricator via cfe-commits
4vtomat added a comment. In D138810#4571579 , @dyung wrote: > The test you added clang/test/Sema/zvk-invalid.c is failing on bots, for > example https://lab.llvm.org/buildbot/#/builders/139/builds/47055. > > Is the test missing a `REQUIRES:

[PATCH] D138810: [RISCV] Support vector crypto extension C intrinsics

2023-08-08 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. The test you added clang/test/Sema/zvk-invalid.c is failing on bots, for example https://lab.llvm.org/buildbot/#/builders/139/builds/47055. Is the test missing a `REQUIRES: riscv-registered-target` line by any chance? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D157297: [clang] Fixes compile error like error: expected unqualified-id for ::_tzcnt_u32(mask);

2023-08-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. The description is not clear to me. You should describe the reason rather than phenomenon. My understanding is double colon cannot operator cannot resolve functions with parentheses. But I didn't find enough proof in Google. It'd be more persuasive if you can find it

[PATCH] D157054: [clang] NFC: Use compile-time option spelling when generating command line

2023-08-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 548425. jansvoboda11 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157054/new/ https://reviews.llvm.org/D157054 Files: clang/lib/Frontend/CompilerInvocation.cpp Index:

[PATCH] D157029: [llvm] Construct option's prefixed name at compile-time

2023-08-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 548423. jansvoboda11 added a comment. Rebase, remove unnecessary changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157029/new/ https://reviews.llvm.org/D157029 Files:

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. Some test suggestions Comment at: clang/lib/Basic/Targets/LoongArch.cpp:203 + StringRef ArchName = getCPU(); + Builder.defineMacro("__loongarch_arch", Twine("\"") + ArchName + Twine("\"")); + Use the

[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

2023-08-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. > Thanks! We might need someone from clangd to help here. The logs do not have > any information explaining what's failing with the test, and looking at the > test code, I struggle to see how these changes would impact that test. We've > had some significant issues

[PATCH] D138810: [RISCV] Support vector crypto extension C intrinsics

2023-08-08 Thread Brandon Wu 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 rG2a05a5215f69: [RISCV] Support vector crypto extension C intrinsics (authored by 4vtomat). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D156762: [-Wunsafe-buffer-usage][NFC] Refactor `getFixIts`---where fix-its are generated

2023-08-08 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. I see you've started to address the big comment in D157441 , so, LGTM, thanks a lot for splitting stuff up! I have one tiny stylistic nitpick.

[PATCH] D157410: [Flang] Enable Rpass flag

2023-08-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:521 + // -R[no-]group[=regexp] and -R[no-]everything flags + Args.AddAllArgs(CmdArgs, options::OPT_R_Group); These are options, not flags (boolean). Repository: rG LLVM

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Joseph Huber 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 rG61709bbae37a: [OpenMP] Ensure wrapper headers are included on both host and device (authored by jhuber6). Repository: rG LLVM Github Monorepo

[clang] 61709bb - [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-08-08T19:07:47-05:00 New Revision: 61709bbae37af4e01cf93c6d112ba984bbd9a7ea URL: https://github.com/llvm/llvm-project/commit/61709bbae37af4e01cf93c6d112ba984bbd9a7ea DIFF: https://github.com/llvm/llvm-project/commit/61709bbae37af4e01cf93c6d112ba984bbd9a7ea.diff

[PATCH] D157441: [-Wunsafe-buffer-usage] Use `Strategy` to determine whether to fix a parameter

2023-08-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ooo nice!! > Extend PointerAssignmentGadget and PointerInitGadget to generate fix-its for > cases where the left-hand side has won't fix strategy and the right-hand side > has std::span strategy. Hmm, is this intertwined with other changes, or is this completely separate?

[PATCH] D153059: [-Wunsafe-buffer-usage] Group parameter fix-its

2023-08-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Ok I think this looks great and almost good to go. I love how the core change in the grouping algorithm is actually tiny and simple! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1891-1892 + for (unsigned i = 0; i < NumParms; i++) { +if

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-08 Thread Ronan Keryell via Phabricator via cfe-commits
keryell added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5542 + if (!getLangOpts().HIPStdPar) +ErrorUnsupported(E, "builtin function"); AlexVlx wrote: > efriedma wrote: > > AlexVlx wrote: > > > efriedma wrote: > > > > This doesn't make

[PATCH] D157454: [NFC][Clang] Fix static analyzer concern about null value dereference

2023-08-08 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews created this revision. eandrews added reviewers: aaron.ballman, tahonermann. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. Herald added a project: All. eandrews requested review of this revision. InterfacePointerType is

[PATCH] D138810: [RISCV] Support vector crypto extension C intrinsics

2023-08-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138810/new/ https://reviews.llvm.org/D138810

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-08 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: rjmccall, efriedma, yaxunl, arsenm. AlexVlx added a project: clang. Herald added a project: All. AlexVlx requested review of this revision. Herald added subscribers: cfe-commits, wdng. After https://reviews.llvm.org/D153092, for targets that

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) enh wrote: > hiraditya wrote: > > xbolva00 wrote: > > > yabinc wrote: > > > > enh wrote: > > >

[PATCH] D157436: [clang-tidy] `performance-faster-string-find` generates incorrect fixes for single quote character literals

2023-08-08 Thread Fabian Wolff 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 rG5b95d17da1f0: [clang-tidy] `performance-faster-string-find` generates incorrect fixes for… (authored by fwolff). Repository: rG LLVM Github

[clang-tools-extra] 5b95d17 - [clang-tidy] `performance-faster-string-find` generates incorrect fixes for single quote character literals

2023-08-08 Thread Fabian Wolff via cfe-commits
Author: Fabian Wolff Date: 2023-08-09T00:55:45+02:00 New Revision: 5b95d17da1f0719f0af711e032d36b18fcb92070 URL: https://github.com/llvm/llvm-project/commit/5b95d17da1f0719f0af711e032d36b18fcb92070 DIFF: https://github.com/llvm/llvm-project/commit/5b95d17da1f0719f0af711e032d36b18fcb92070.diff

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/test/Headers/stdckdint.cpp:1 +// RUN: %clang_cc1 -emit-llvm -fgnuc-version=4.2.1 -std=gnu++11 %s -o - | FileCheck %s + ZijunZhao wrote: > enh wrote: > > ZijunZhao wrote: > > > enh wrote: > > > > hiraditya wrote: > >

[PATCH] D157129: [NFC] Fix unnecessary copy with auto.

2023-08-08 Thread Srividya Sundaram via Phabricator via cfe-commits
srividya-sundaram added a comment. In D157129#4564766 , @steakhal wrote: > I went over the patch and I found only a single debatable case for taking by > reference. > To clarify why I would prefer taking by value: value semantics is good for > local

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

2023-08-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1494-1505 +Decl *Sema::getCurLocalScopeDecl() { + if (const BlockScopeInfo *BSI = getCurBlock()) +return BSI->TheDecl; + else if (const LambdaScopeInfo *LSI = getCurLambda()) +return

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Zijun Zhao via Phabricator via cfe-commits
ZijunZhao added inline comments. Comment at: clang/test/Headers/stdckdint.cpp:1 +// RUN: %clang_cc1 -emit-llvm -fgnuc-version=4.2.1 -std=gnu++11 %s -o - | FileCheck %s + enh wrote: > ZijunZhao wrote: > > enh wrote: > > > hiraditya wrote: > > > > seems like we

[PATCH] D142569: [OpenMP] Introduce kernel environment

2023-08-08 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. The changes in this patch do not actually work correctly with kernels that really need to be in Generic mode. The ExecMode value recovered in the kmpc_kernel_init function is 3 in the case where it needs to be 1. The problem lies with the OpenMPOpt changes since

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/test/Headers/stdckdint.cpp:1 +// RUN: %clang_cc1 -emit-llvm -fgnuc-version=4.2.1 -std=gnu++11 %s -o - | FileCheck %s + ZijunZhao wrote: > enh wrote: > > hiraditya wrote: > > > seems like we don't have a -std=gnu23,

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Zijun Zhao via Phabricator via cfe-commits
ZijunZhao added inline comments. Comment at: clang/test/Headers/stdckdint.cpp:1 +// RUN: %clang_cc1 -emit-llvm -fgnuc-version=4.2.1 -std=gnu++11 %s -o - | FileCheck %s + enh wrote: > hiraditya wrote: > > seems like we don't have a -std=gnu23, or -std=c23

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157438/new/ https://reviews.llvm.org/D157438

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

2023-08-08 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. In D153914#4570148 , @cor3ntin wrote: > We will commit on your behalf, what name/email do you want us to use? > Thanks! Thanks for asking; keep the name/email as-is in the commit you see: `Author: Richard Dzenis `

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

2023-08-08 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 548366. RIscRIpt marked 4 inline comments as done. RIscRIpt added a comment. Address review comments, rebase onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1190-1191 // the resource directory at clang/lib/Headers/llvm_libc_wrappers. -if (C.getActiveOffloadKinds() == Action::OFK_None) { +if ((getToolChain().getTriple().isNVPTX() || +

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1190-1191 // the resource directory at clang/lib/Headers/llvm_libc_wrappers. -if (C.getActiveOffloadKinds() == Action::OFK_None) { +if ((getToolChain().getTriple().isNVPTX() || +

[PATCH] D157445: [CodeGen][UBSan] getUBSanFunctionTypeHash does not handle the attributed function case correctly, leading to an assertion failure. This patch desugars the QualType if it is of Attribu

2023-08-08 Thread Usama Hameed via Phabricator via cfe-commits
usama54321 created this revision. Herald added a project: All. usama54321 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. rdar://113144087 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D157445 Files:

[PATCH] D157441: [-Wunsafe-buffer-usage] Use `Strategy` to determine whether to fix a parameter

2023-08-08 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1624 // Inserts the [0] -std::optional EndOfOperand = -getEndCharLoc(BaseDeclRefExpr, SM, Ctx.getLangOpts()); -if (EndOfOperand) { +if (auto LocPastOperand = +

[PATCH] D154300: [CUDA][HIP] Fix template argument deduction

2023-08-08 Thread Yaxun Liu 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 rGea72a4e6547f: [CUDA][HIP] Fix template argument deduction (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github

[clang] ea72a4e - [CUDA][HIP] Fix template argument deduction

2023-08-08 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-08-08T17:39:01-04:00 New Revision: ea72a4e6547feaa82e132746c6777b3b69aed0d5 URL: https://github.com/llvm/llvm-project/commit/ea72a4e6547feaa82e132746c6777b3b69aed0d5 DIFF:

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) hiraditya wrote: > xbolva00 wrote: > > yabinc wrote: > > > enh wrote: > > > > enh wrote: > > > > >

[PATCH] D157441: [-Wunsafe-buffer-usage] Use `Strategy` to determine whether to fix a parameter

2023-08-08 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 created this revision. ziqingluo-90 added reviewers: t-rasmud, NoQ, jkorous, malavikasamak. Herald added a project: All. ziqingluo-90 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Use `Strategy` to determine whether to fix

[PATCH] D157440: [clang][ConstExprEmitter] handle BinaryOperators that don't have signedness or overflow concerns for integrals

2023-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 548358. nickdesaulniers edited the summary of this revision. nickdesaulniers added a comment. - use const & - add link to issue tracker Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157440/new/

[PATCH] D157440: [clang][ConstExprEmitter] handle BinaryOperators that don't have signedness or overflow concerns for integrals

2023-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Handles binary operators: & ^ | == != Check that each side evaluates to a ConstantInt then combine the

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: clang/test/Headers/stdckdint.cpp:1 +// RUN: %clang_cc1 -emit-llvm -fgnuc-version=4.2.1 -std=gnu++11 %s -o - | FileCheck %s + seems like we don't have a -std=gnu23, or -std=c23 standard flag for this in clang yet.

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1190-1191 // the resource directory at clang/lib/Headers/llvm_libc_wrappers. -if (C.getActiveOffloadKinds() == Action::OFK_None) { +if ((getToolChain().getTriple().isNVPTX() || +

[clang-tools-extra] f263f45 - [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 Thread Fabian Wolff via cfe-commits
Author: Fabian Wolff Date: 2023-08-08T23:07:10+02:00 New Revision: f263f45ba6494c7516a11b1af920d6ca98e79d2b URL: https://github.com/llvm/llvm-project/commit/f263f45ba6494c7516a11b1af920d6ca98e79d2b DIFF: https://github.com/llvm/llvm-project/commit/f263f45ba6494c7516a11b1af920d6ca98e79d2b.diff

[PATCH] D157428: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 Thread Fabian Wolff 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 rGf263f45ba649: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions`… (authored by fwolff). Repository: rG LLVM Github

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1190-1191 // the resource directory at clang/lib/Headers/llvm_libc_wrappers. -if (C.getActiveOffloadKinds() == Action::OFK_None) { +if ((getToolChain().getTriple().isNVPTX() || +

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) xbolva00 wrote: > yabinc wrote: > > enh wrote: > > > enh wrote: > > > > enh wrote: > > > > >

[PATCH] D157384: [clang] Added Attr::getVariety function

2023-08-08 Thread Timo Stripf via Phabricator via cfe-commits
strimo378 abandoned this revision. strimo378 added a comment. @aaron.ballman Thank you for the information. Strange that I missed that ... I even used the function somewhere else o_O Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157384/new/

[PATCH] D155383: [clang][AST] TextNodeDumper learned to output exception specifications

2023-08-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D155383#4507928 , @strimo378 wrote: > There are many ast-dump tests about decls but there are nearly no other type > tests. We should still be adding tests for these changes, to ensure we don't regress the behavior

[PATCH] D157436: [clang-tidy] `performance-faster-string-find` generates incorrect fixes for single quote character literals

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157436/new/ https://reviews.llvm.org/D157436

[PATCH] D154014: [SpecialCaseList] Use Globs instead of Regex

2023-08-08 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 548349. ellis added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154014/new/ https://reviews.llvm.org/D154014 Files: clang/docs/SanitizerSpecialCaseList.rst

[PATCH] D157436: [clang-tidy] `performance-faster-string-find` generates incorrect fixes for single quote character literals

2023-08-08 Thread Fabian Wolff via Phabricator via cfe-commits
fwolff updated this revision to Diff 548347. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157436/new/ https://reviews.llvm.org/D157436 Files: clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp

[PATCH] D157428: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157428/new/ https://reviews.llvm.org/D157428

[PATCH] D157428: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 Thread Fabian Wolff via Phabricator via cfe-commits
fwolff marked an inline comment as done. fwolff added a comment. Thanks for reviewing this @PiotrZSL! In D157428#4570497 , @PiotrZSL wrote: > What about switchStmt ? The `AllowIntegerConditions` and `AllowPointerConditions` options only apply to `int

[PATCH] D155858: Add a concept AST node.

2023-08-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a subscriber: aaron.ballman. hokein added a comment. adding @aaron.ballman, who might have opinion on this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155858/new/ https://reviews.llvm.org/D155858

[PATCH] D157040: [OpenMP][IR] Set correct alignment for internal variables

2023-08-08 Thread Hao Jin via Phabricator via cfe-commits
erjin updated this revision to Diff 548344. erjin added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. se Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157040/new/ https://reviews.llvm.org/D157040 Files:

[PATCH] D157428: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 Thread Fabian Wolff via Phabricator via cfe-commits
fwolff updated this revision to Diff 548342. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157428/new/ https://reviews.llvm.org/D157428 Files: clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! Comment at: clang/docs/ReleaseNotes.rst:59 +- Improved `__builtin_offsetof` support, allowing qualified name in member designator. You should also link to

[PATCH] D157435: [Sema] Do not emit -Wmissing-variable-declarations for register variables

2023-08-08 Thread Nathan Chancellor 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 rGa22d385f9656: [Sema] Do not emit -Wmissing-variable-declarations for register variables (authored by nathanchance). Repository: rG LLVM Github

[clang] a22d385 - [Sema] Do not emit -Wmissing-variable-declarations for register variables

2023-08-08 Thread Nathan Chancellor via cfe-commits
Author: Nathan Chancellor Date: 2023-08-08T13:41:21-07:00 New Revision: a22d385f9656c95f5ce4155ea705aab6f8ef6d82 URL: https://github.com/llvm/llvm-project/commit/a22d385f9656c95f5ce4155ea705aab6f8ef6d82 DIFF:

[PATCH] D157435: [Sema] Do not emit -Wmissing-variable-declarations for register variables

2023-08-08 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance updated this revision to Diff 548337. nathanchance added a comment. - Update formatting in release notes - Add GCC bug link to commit message - Remove unnecessary REQUIRES: in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

2023-08-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, tra, JonChesterfield, yaxunl, sivachandra. Herald added a subscriber: guansong. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, sstefan1,

[PATCH] D157428: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:199-202 +- Improved :doc:`readability-implicit-bool-conversion + ` check to take do-while loops into + account for the ``AllowIntegerConditions`` and ``AllowPointerConditions`` + options.

[PATCH] D157435: [Sema] Do not emit -Wmissing-variable-declarations for register variables

2023-08-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM aside from some minor nits. Comment at: clang/docs/ReleaseNotes.rst:126-127 of a base class is not called in the constructor of its derived class. +- Clang no longer emits

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1101-1102 +MPM.addPass(StdParAcceleratorCodeSelectionPass()); +} +else if (LangOpts.HIPStdParInterposeAlloc) { + MPM.addPass(StdParAllocationInterpositionPass());

[PATCH] D157436: [clang-tidy] `performance-faster-string-find` generates incorrect fixes for single quote character literals

2023-08-08 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp:40 + // "'" is OK, but ''' is not, so add a backslash + if (ClosePos - OpenPos == 2 && Result[OpenPos + 1] == '\'') +Result.replace(OpenPos + 1, 1, "\\'");

[PATCH] D157428: [clang-tidy] `readability-implicit-bool-conversion.AllowIntegerConditions` ignores `DoStmt`s

2023-08-08 Thread Fabian Wolff via Phabricator via cfe-commits
fwolff updated this revision to Diff 548334. fwolff added a comment. Mention this change in the release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157428/new/ https://reviews.llvm.org/D157428 Files:

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM from HIP side. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D157429: [NFC] [Clang] Fix static analyzer concern

2023-08-08 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. In D157429#4570540 , @aaron.ballman wrote: > LGTM with a small formatting nit. Thanks for the review! I committed the patch after fixing the formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157429: [NFC] [Clang] Fix static analyzer concern

2023-08-08 Thread Elizabeth Andrews 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 rG6a4779cc235c: [NFC] Fix static analyzer concern (authored by eandrews). Herald added a project: clang. Changed prior to commit:

[clang] 6a4779c - [NFC] Fix static analyzer concern

2023-08-08 Thread Elizabeth Andrews via cfe-commits
Author: Elizabeth Andrews Date: 2023-08-08T13:28:15-07:00 New Revision: 6a4779cc235c171f7a5049726f58e14a2cc4e6c8 URL: https://github.com/llvm/llvm-project/commit/6a4779cc235c171f7a5049726f58e14a2cc4e6c8 DIFF:

[PATCH] D157435: [Sema] Do not emit -Wmissing-variable-declarations for register variables

2023-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Thanks for the patch; I think it's better not to warn rather than expect users to add an `unsigned long currest_stack_pointer;` declaration before the definition for

[PATCH] D157436: [clang-tidy] `performance-faster-string-find` generates incorrect fixes for single quote character literals

2023-08-08 Thread Fabian Wolff via Phabricator via cfe-commits
fwolff created this revision. fwolff added reviewers: PiotrZSL, carlosgalvezp. fwolff added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. fwolff requested review of this revision. Herald added a subscriber:

[PATCH] D157435: [Sema] Do not emit -Wmissing-variable-declarations for register variables

2023-08-08 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance created this revision. nathanchance added reviewers: aaron.ballman, nickdesaulniers. Herald added a subscriber: pengfei. Herald added a project: All. nathanchance requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When building

[PATCH] D157432: [clang][ConstExprEmitter] handle Unary Not on integers

2023-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1402 +return nullptr; + } + A lot of these visitor methods for UnaryOperator are going to look almost the same; I think I might prefer to have a `VisitUnaryOperator`

[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

2023-08-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D153536#4570561 , @vitalybuka wrote: > In D153536#4570534 , @aaron.ballman > wrote: > >> In D153536#4570513 , @vitalybuka >> wrote:

[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

2023-08-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. Not a test update The second line of the test triggers: RUN: not --crash clangd -lit-test -sync=0 < %s 2> %t.async.err == Signalled while building preamble Filename:

[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

2023-08-08 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: sammccall. cor3ntin added a comment. Looking at the failing test (`clang-tools-extra/clangd/test/crash-preamble.test`), I'd be very surprising if it is related to a front end change like this PR. Any idea @sammccall ? Repository: rG LLVM Github Monorepo

[PATCH] D157434: [include-cleaner] Add a simple heuristic to handle token-pasting symbols.

2023-08-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang-tools-extra. include-cleaner didn't report the usage of token-pasting symbols, as these symbols are spelled in a "scratch space"

[PATCH] D157432: [clang][ConstExprEmitter] handle Unary Not on integers

2023-08-08 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider the following statement: int x = ~0; With the following AST: `-VarDecl 0x5647bdb12d60

[PATCH] D157420: [clang] Enable constexpr on LZCNT/POPCNT MS extension intrinsics

2023-08-08 Thread Alejandro Aguirre via Phabricator via cfe-commits
alexguirre updated this revision to Diff 548323. alexguirre added a comment. Added __lzcnt / __popcnt to the constexpr lists in LanguageExtensions.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157420/new/ https://reviews.llvm.org/D157420

[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

2023-08-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D153536#4570534 , @aaron.ballman wrote: > In D153536#4570513 , @vitalybuka > wrote: > >> This patch brakes https://lab.llvm.org/buildbot/#/builders/168/builds/14997 >> Not sure

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

2023-08-08 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. can we try not gating this on PGO as suggested? minimizing differences between pipelines is nice, and as mentioned it'll help with other cases Comment at: llvm/test/Transforms/PhaseOrdering/simplifycfg-speculate-blocks.ll:1 +;; Check that SimplifyCFG

  1   2   3   >