[clang-tools-extra] 7baf5d3 - [modularize] Stabilize iteration order when processing module maps

2023-07-20 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-07-20T22:44:23-07:00 New Revision: 7baf5d3841ee16df66e218b1b892d3d2a3f0680b URL: https://github.com/llvm/llvm-project/commit/7baf5d3841ee16df66e218b1b892d3d2a3f0680b DIFF: https://github.com/llvm/llvm-project/commit/7baf5d3841ee16df66e218b1b892d3d2a3f0680b.diff

[PATCH] D155798: [X86] Support -march=graniterapids-d and update -march=graniterapids

2023-07-20 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked 2 inline comments as done. FreddyYe added inline comments. Comment at: clang/test/Preprocessor/predefined-arch-macros.c:1925 // CHECK_GNR_M64: #define __AMX_BF16__ 1 -// CHECK_GNR_M64: #define __AMX_COMPLEX__ 1 +// CHECK_GNR_M64-NOT: #define __AMX_COMPLEX__ 1

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

2023-07-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:234 + if (!LT || !RT || !T) +return this->bail(BO); aaron.ballman wrote: > Should we be checking `!T` earlier (it's used within the `Discard` lambda > with an unprotected

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

2023-07-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 542762. tbaeder marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144164/new/ https://reviews.llvm.org/D144164 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Context.cpp

[PATCH] D155890: [clang-tidy] Add folly::Optional to unchecked-optional-access

2023-07-20 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp requested changes to this revision. carlosgalvezp added a comment. This revision now requires changes to proceed. This should be a configuration option, we should not hardcore project-specific things in the source code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] dda8ac8 - Sarif: stabilize artifacts order

2023-07-20 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-07-20T21:37:50-07:00 New Revision: dda8ac8d3a6a7de7c1cc3f031bb5296bae74d754 URL: https://github.com/llvm/llvm-project/commit/dda8ac8d3a6a7de7c1cc3f031bb5296bae74d754 DIFF: https://github.com/llvm/llvm-project/commit/dda8ac8d3a6a7de7c1cc3f031bb5296bae74d754.diff

[clang] 99b2a11 - [Driver] -fopenmp-targets=: stabilize OrderedOffloadingToolchains value order

2023-07-20 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-07-20T21:17:04-07:00 New Revision: 99b2a1143f932c2da8395a69072f177f596547b2 URL: https://github.com/llvm/llvm-project/commit/99b2a1143f932c2da8395a69072f177f596547b2 DIFF: https://github.com/llvm/llvm-project/commit/99b2a1143f932c2da8395a69072f177f596547b2.diff

[PATCH] D155501: Add new option -fkeep-persistent-storage-variables to Clang release notes

2023-07-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast 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/D155501/new/ https://reviews.llvm.org/D155501

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

2023-07-20 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. I vote for splitting the patch to make both the review and any future debugging or git archeology easier. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153059/new/ https://reviews.llvm.org/D153059 ___ cfe-commits

[PATCH] D155674: [RISCV] Update zihintntl to 1p0

2023-07-20 Thread Piyou Chen via Phabricator via cfe-commits
BeMg abandoned this revision. BeMg added a comment. duplicate with https://reviews.llvm.org/D151547 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155674/new/ https://reviews.llvm.org/D155674 ___

[clang] ac52488 - [clang] fix for D155342

2023-07-20 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-07-20T20:30:37-07:00 New Revision: ac524886094db58112ca176e1d727330a94634a8 URL: https://github.com/llvm/llvm-project/commit/ac524886094db58112ca176e1d727330a94634a8 DIFF:

[PATCH] D155863: [X86][Regcall] Add an option to respect regcall ABI v.4 in win64

2023-07-20 Thread Bing Yu via Phabricator via cfe-commits
yubing added a comment. ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155863/new/ https://reviews.llvm.org/D155863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-07-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D153536#4512897 , @dblaikie wrote: > but at least at a first blush I can't reproduce the failures shown... @dblaikie, you //did// reproduce the issue with the members. Both entries have DW_AT_decl_line 2 and

[PATCH] D154696: [Clang] Diagnose jumps into statement expressions

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D154696#4513510 , @cor3ntin wrote: > FYI, this can be relanded after https://reviews.llvm.org/D155342 is merged D155342 is all merged up Repository: rG LLVM Github Monorepo

[PATCH] D155342: [clang][JumpDiagnostics] ignore non-asm goto target scopes

2023-07-20 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 rGf023f5cdb2e6: [clang][JumpDiagnostics] ignore non-asm goto target scopes (authored by nickdesaulniers). Repository: rG LLVM Github Monorepo

[clang] f023f5c - [clang][JumpDiagnostics] ignore non-asm goto target scopes

2023-07-20 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-07-20T19:58:22-07:00 New Revision: f023f5cdb2e6c19026f04a15b5a935c041835d14 URL: https://github.com/llvm/llvm-project/commit/f023f5cdb2e6c19026f04a15b5a935c041835d14 DIFF:

[PATCH] D155342: [clang][JumpDiagnostics] ignore non-asm goto target scopes

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added inline comments. Comment at: clang/lib/Sema/JumpDiagnostics.cpp:669 +if (JumpScope != TargetScope) + DiagnoseIndirectOrAsmJump(G, JumpScope, LD, TargetScope); + }

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

2023-07-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. > In GCC I added the numbers for "loongarch64" and "la464" although they are > the same, and GCC does not have "empty". But yes we can do things later here. Ah, I just realize `TuneCPU` is always not empty because: 27 LoongArchSubtarget

[PATCH] D155798: [X86] Support -march=graniterapids-d and update -march=graniterapids

2023-07-20 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/Preprocessor/predefined-arch-macros.c:1925 // CHECK_GNR_M64: #define __AMX_BF16__ 1 -// CHECK_GNR_M64: #define __AMX_COMPLEX__ 1 +// CHECK_GNR_M64-NOT: #define __AMX_COMPLEX__ 1 +// CHECK_GNRD_M64: #define __AMX_COMPLEX__ 1

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

2023-07-20 Thread Xi Ruoyao via Phabricator via cfe-commits
xry111 added a comment. In D155824#4521047 , @SixWeining wrote: > In D155824#4518597 , @xry111 wrote: > >> Do we need to convert Xuerui's label alignment change to use the -mtune >> framework? > > How to set

[PATCH] D151683: [clang] Enable C++11-style attributes in all language modes

2023-07-20 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik updated this revision to Diff 542743. philnik added a comment. - Address comments - Try to fix CI - Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151683/new/ https://reviews.llvm.org/D151683 Files:

[PATCH] D154931: [LoongArch] Support InlineAsm for LSX and LASX

2023-07-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:56 addRegisterClass(MVT::f64, ::FPR64RegClass); + if (Subtarget.hasExtLSX()) { +for (auto VT : {MVT::v4f32, MVT::v2f64, MVT::v16i8, MVT::v8i16, MVT::v4i32,

[PATCH] D155861: [Headers][doc] Add SHA1/SHA256 intrinsic descriptions

2023-07-20 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155861/new/ https://reviews.llvm.org/D155861 ___ cfe-commits mailing list

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

2023-07-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D155824#4518597 , @xry111 wrote: > Do we need to convert Xuerui's label alignment change to use the -mtune > framework? How to set the numbers if `TuneCPU` is empty? If there is no differences among `empty`,

[PATCH] D150338: [-Wunsafe-buffer-usage] Improving insertion of the [[clang::unsafe_buffer_usage]] attribute

2023-07-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Looks like the patch has landed, let's close the revision? 樂 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150338/new/ https://reviews.llvm.org/D150338 ___ cfe-commits mailing list

[PATCH] D155859: [Headers][doc] Add misc non-AVX2 intrinsic descriptions

2023-07-20 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/rdseedintrin.h:56 +/// ELSE +/// Store16(__p, 0) +/// result := 0 32 Comment at: clang/lib/Headers/rdseedintrin.h:84 +/// ELSE +/// Store16(__p, 0) +/// result := 0

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

2023-07-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I just want to add to this, that the NFC part is actually insanely valuable (despite technically not doing anything). This patch is so complex primarily because `UnsafeBufferUsage.cpp` already has 1300 lines of code in unstructured static functions - that's more than half

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

2023-07-20 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 542735. danix800 edited the summary of this revision. danix800 added a comment. Herald added a reviewer: gkistanova. Update clang/docs/ReleaseNotes.rst to reflect this fix. Repository: rZORG LLVM Github Zorg CHANGES SINCE LAST ACTION

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

2023-07-20 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 542732. ellis added a comment. If `#!special-case-list-v2` is the first line in the special case list, then we will use globs to match patterns. Otherwise, we fall back to the original behavior of using regexes to match patterns. Once this feature is stable,

[PATCH] D155798: [X86] Support -march=graniterapids-d and update -march=graniterapids

2023-07-20 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked an inline comment as done. FreddyYe added inline comments. Comment at: clang/test/Preprocessor/predefined-arch-macros.c:1925 // CHECK_GNR_M64: #define __AMX_BF16__ 1 -// CHECK_GNR_M64: #define __AMX_COMPLEX__ 1 +// CHECK_GNR_M64-NOT: #define __AMX_COMPLEX__ 1

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

2023-07-20 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(); + The old code tried to find the "" part of the function name and replace the

[clang] 2565887 - [clang][test] Remove unused variable 'SM' (NFC)

2023-07-20 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2023-07-21T07:59:30+08:00 New Revision: 25658879a022ca9a8d91ed214701bfd724d159a8 URL: https://github.com/llvm/llvm-project/commit/25658879a022ca9a8d91ed214701bfd724d159a8 DIFF: https://github.com/llvm/llvm-project/commit/25658879a022ca9a8d91ed214701bfd724d159a8.diff LOG:

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-07-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak abandoned this revision. ahatanak added a comment. It looks like a7579b25df78a9f53d62300020d4ae3c4734 fixed the crash. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-07-20 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 542721. akhuang added a comment. Change impl function naming scheme Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://reviews.llvm.org/D154007 Files:

[PATCH] D155549: [clang] adds `conceptDecl` as an ASTMatcher

2023-07-20 Thread Christopher Di Bella 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 rG38e1c597033d: [clang] adds `conceptDecl` as an ASTMatcher (authored by cjdb). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 38e1c59 - [clang] adds `conceptDecl` as an ASTMatcher

2023-07-20 Thread Christopher Di Bella via cfe-commits
Author: Christopher Di Bella Date: 2023-07-20T23:33:46Z New Revision: 38e1c597033de0c7655abb39335b364408865d2a URL: https://github.com/llvm/llvm-project/commit/38e1c597033de0c7655abb39335b364408865d2a DIFF:

[PATCH] D149162: [Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder

2023-07-20 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added a comment. In D149162#4520747 , @MaskRay wrote: > In D149162#4520497 , @agozillon > wrote: > >> In D149162#4520395 , @MaskRay >> wrote: >> >>> In

[PATCH] D155890: [clang-tidy] Add folly::Optional to unchecked-optional-access

2023-07-20 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added a comment. This revision is now accepted and ready to land. Thank you! Do you have commit access or do you need me to commit this patch for you? Comment at:

[PATCH] D155809: [NFC] [Clang] Fix strict weak ordering in ItaniumVTableBuilder

2023-07-20 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a reviewer: clang-language-wg. shafik added a comment. I am not sure about this change but I think we at least need a test and this does not seem non-functional if it prevents a crash. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D149162: [Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D149162#4520497 , @agozillon wrote: > In D149162#4520395 , @MaskRay wrote: > >> In D149162#4517500 , @MaskRay >> wrote: >> >>>

[PATCH] D155890: [clang-tidy] Add folly::Optional to unchecked-optional-access

2023-07-20 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. To be honest, all those things just should be configurable instead of hardcoding them. For example, a project that I work for got 4 different custom optional implementations, and this check is useless for all of them. And still no boost::optional support. Repository:

[PATCH] D155549: [clang] adds `conceptDecl` as an ASTMatcher

2023-07-20 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 542706. cjdb edited the summary of this revision. cjdb added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. just trying to get CI close to green :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-07-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5542 + if (!getLangOpts().HIPStdPar) +ErrorUnsupported(E, "builtin function"); AlexVlx wrote: > efriedma wrote: > > This doesn't make sense; we can't just ignore bits of the

[PATCH] D155342: [clang][JumpDiagnostics] ignore non-asm goto target scopes

2023-07-20 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/JumpDiagnostics.cpp:669 +if (JumpScope != TargetScope) + DiagnoseIndirectOrAsmJump(G, JumpScope, LD, TargetScope); + } Do we have a test that checks this diagnostic? Repository:

[PATCH] D155898: [clangd] Fix go-to-type target location

2023-07-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, wangpc, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Previously it'd ~always jump

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2023-07-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D139586#4363725 , @cor3ntin wrote: > @hubert.reinterpretcast I'll try to look at that but unless I'm mistaken, > the wording excludes function parameters > >> The fourth context is when a temporary object

[PATCH] D154503: [Sema] Fix handling of functions that hide classes

2023-07-20 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:507 + // C++ [basic.scope.hiding]p2: + // A class name or enumeration name can be hidden by the name of john.brawn wrote: > shafik wrote: > > This section does not exist anymore, it

[PATCH] D155191: clang/HIP: Directly use f32 exp and log builtins

2023-07-20 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. 5f1d3834a2bc3b77e126a278a0e7f00bce5576fc CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155191/new/ https://reviews.llvm.org/D155191

[clang] 5f1d383 - clang/HIP: Directly use f32 exp and log builtins

2023-07-20 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2023-07-20T18:14:24-04:00 New Revision: 5f1d3834a2bc3b77e126a278a0e7f00bce5576fc URL: https://github.com/llvm/llvm-project/commit/5f1d3834a2bc3b77e126a278a0e7f00bce5576fc DIFF:

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-20 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:10299 if (!HasNonDeletedCopyOrMoveConstructor()) { PrintDiagAndRemoveAttr(0); I tried to change this condition to `!RD.isAnonymousStructOrUnion() &&

[PATCH] D155895: git squash commit for trivial-abi-vs-anonymous-unions.

2023-07-20 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza created this revision. Herald added a project: All. lukasza requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. 1480d173fca1c83809ed5ac350c19021c7036a99 Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`. Consider the

[PATCH] D155705: [clang] Fix specialization of non-templated member classes of class templates

2023-07-20 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Your explanation makes sense, I wish we had some documentation someplace that covered how it is expected to work with some examples with expected results. Maybe we should think about tests that might exercise this code a bit more. The definition of

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

2023-07-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D154658#4516554 , @rjmccall wrote: > LGTM, except, should we have a way to turn this optimization off specifically? Sure. I suppose even for an internal linkage vtable there could be a reason to want to turn this off (eg, if

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

2023-07-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 542693. rsmith added a comment. Herald added a subscriber: MaskRay. - Add option to disable vptr-based dynamic_cast optimization. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154658/new/

[PATCH] D155890: [clang-tidy] Add folly::Optional to unchecked-optional-access

2023-07-20 Thread Anton Dukeman via Phabricator via cfe-commits
adukeman created this revision. adukeman added reviewers: njames93, ymandel, sgatev. Herald added subscribers: PiotrZSL, carlosgalvezp, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. adukeman requested review of this revision. Herald added projects: clang, clang-tools-extra.

[PATCH] D149162: [Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder

2023-07-20 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added a comment. In D149162#4520395 , @MaskRay wrote: > In D149162#4517500 , @MaskRay wrote: > >> `registerTargetGlobalVariable` relies on the iteration order of StringMap, >> which is not guaranteed.

[PATCH] D149162: [Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D149162#4517500 , @MaskRay wrote: > `registerTargetGlobalVariable` relies on the iteration order of StringMap, > which is not guaranteed. The bug is caught by D155789 > > > curl -L

[PATCH] D155885: [include-cleaner] Switch Include from FileEntry* -> FileEntryRef

2023-07-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: PiotrZSL, carlosgalvezp, arphaman. Herald added a reviewer: njames93. Herald added a project: All. sammccall requested review of this revision. Herald added a project: clang-tools-extra. Herald added a

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

2023-07-20 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5542 + if (!getLangOpts().HIPStdPar) +ErrorUnsupported(E, "builtin function"); efriedma wrote: > This doesn't make sense; we can't just ignore bits of the source code. I > guess

[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

2023-07-20 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin updated this revision to Diff 542660. DiggerLin added a comment. 1. rebase the code 2. for the `env OBJECT_MODE=` or is `env OBJECT_MODE=""` , the `ranlib` and `ar` in AIX OS , have different behaviors(ranlib looks as -X32 , but `ar` and `nm` output error ), I change `llvm-ranlib` as

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Farid Zakaria via Phabricator via cfe-commits
fzakaria updated this revision to Diff 542663. fzakaria added a comment. Added comment to explain why we are disabling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155857/new/ https://reviews.llvm.org/D155857 Files:

[PATCH] D76169: [WIP][AST] Allow ExprConstant to evaluate structs in C.

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers requested changes to this revision. nickdesaulniers added a comment. This revision now requires changes to proceed. Herald added a project: All. Folded into D151587 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D155529: [clang-format] Add SpaceInParensOption for __attribute__ keyword

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 542655. gedare added a comment. Add missing parser check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155529/new/ https://reviews.llvm.org/D155529 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D155878: [clangd] Loose include-cleaner matching for verbatim headers

2023-07-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 542653. sammccall added a comment. Herald added a subscriber: ChuanqiXu. extract isPreferredProvider helper Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155878/new/ https://reviews.llvm.org/D155878 Files:

[PATCH] D155529: [clang-format] Add SpaceInParensOption for __attribute__ keyword

2023-07-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Format/ConfigParseTest.cpp:220 CHECK_PARSE_NESTED_BOOL(SpaceBeforeParensOptions, BeforeNonEmptyParentheses); +

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Nice work. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155239/new/ https://reviews.llvm.org/D155239

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

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added inline comments. Comment at: clang/test/Sema/builtins.c:181-186 + ASSERT(!OPT(test17_c)); + ASSERT(!OPT(_c[0])); + ASSERT(!OPT((char*)test17_c)); ASSERT(!OPT(test17_d));// expected-warning

[PATCH] D142702: [Clang][AArch64][SME] Generate target features from +(no)sme.* options

2023-07-20 Thread Bryan Chan via Phabricator via cfe-commits
bryanpkc added inline comments. Comment at: clang/test/Driver/aarch64-implied-sme-features.c:49 +// RUN: %clang -target aarch64-linux-gnu -march=armv8-a+nosme+sme-i16i64 %s -### 2>&1 | FileCheck %s --check-prefix=SME-SUBFEATURE-CONFLICT-REV +// SME-SUBFEATURE-CONFLICT-REV:

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/Expr.cpp:3462-3468 ->isConstantInitializer(Ctx, false, Culprit); case CXXDefaultArgExprClass: return cast(this)->getExpr() ->isConstantInitializer(Ctx, false, Culprit); case

[PATCH] D155529: [clang-format] Add SpaceInParensOption for __attribute__ keyword

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 542651. gedare added a comment. Add one more attribute test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155529/new/ https://reviews.llvm.org/D155529 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D155529: [clang-format] Add SpaceInParensOption for __attribute__ keyword

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 542650. gedare added a comment. Rebase onto D155239 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155529/new/ https://reviews.llvm.org/D155529 Files:

[PATCH] D142702: [Clang][AArch64][SME] Generate target features from +(no)sme.* options

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/aarch64-implied-sme-features.c:49 +// RUN: %clang -target aarch64-linux-gnu -march=armv8-a+nosme+sme-i16i64 %s -### 2>&1 | FileCheck %s --check-prefix=SME-SUBFEATURE-CONFLICT-REV +// SME-SUBFEATURE-CONFLICT-REV:

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-07-20 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/unittests/Interpreter/CodeCompletionTest.cpp:71 +Completer(std::string("void app("), 9); + EXPECT_EQ((size_t)0, out.length()); +} capfredf wrote: > @v.g.vassilev The way I fixed this is a bit hacky. Do

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added a comment. In D155239#4520067 , @HazardyKnusperkeks wrote: > Everything is fine, I just need to know how the attribute stuff is formatted > with plain LLVM style. `__attribute__` is formatted with plain LLVM style in 5-10 other test

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 542649. gedare added a comment. Add more __attribute__ test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155239/new/ https://reviews.llvm.org/D155239 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D155239#4520081 , @gedare wrote: > In D155239#4520067 , > @HazardyKnusperkeks wrote: > >> Everything is fine, I just need to know how the attribute stuff is formatted >>

[PATCH] D155842: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision. tahonermann added a comment. This is a good change since the default copy constructor would do bad things when `ownsOutputFile` is true. The copy assignment operator is already implicitly deleted because of the presence of a data member of reference type,

[PATCH] D155635: [OpenMP] [Reduction] Allow PLUS (+) operator on reduction clauses in OMP > 52

2023-07-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155635/new/ https://reviews.llvm.org/D155635 ___ cfe-commits mailing list

[PATCH] D155878: [clangd] Loose include-cleaner matching for verbatim headers

2023-07-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This updates clangd to take advantage

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 542632. gedare added a comment. fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155239/new/ https://reviews.llvm.org/D155239 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D155846: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. > there's no bug being fixed which makes me think this should go back to the > static analysis vendor to report this as a false positive. I agree. I'll try to isolate a reproducible test case and report it to the vendor. Repository: rG LLVM Github Monorepo

[PATCH] D154324: [C++20] [Modules] [ODRHash] Use CanonicalType for base classes

2023-07-20 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D154324#4516964 , @alexfh wrote: > In D154324#4516917 , @ChuanqiXu > wrote: > >> Maybe we got something wrong with this. I'd like to revert this patch in >> case it breaks something.

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

2023-07-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/test/Sema/builtins.c:181-186 + ASSERT(!OPT(test17_c)); + ASSERT(!OPT(_c[0])); + ASSERT(!OPT((char*)test17_c)); ASSERT(!OPT(test17_d));// expected-warning {{folding}} ASSERT(!OPT(_d[0]));// expected-warning

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added a comment. In D155239#4520067 , @HazardyKnusperkeks wrote: > Everything is fine, I just need to know how the attribute stuff is formatted > with plain LLVM style. oh, sorry. plain llvm style. I will look for a good place to add that.

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/baremetal.cpp:348 +// RUN: %clang %s -### --target=powerpc-unknown-eabi 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-PPCEABI %s MaskRay wrote: > Without a sysroot, we may pick up

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:16748 + verifyFormat("SomeType *__attribute__( ( attr ) ) *a = NULL;", Spaces); + verifyFormat("void __attribute__( ( naked ) ) foo( int bar )", Spaces); and here Repository:

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:16791 + verifyFormat("SomeType *__attribute__((attr)) *a = NULL;", Spaces); + verifyFormat("void __attribute__((naked)) foo(int bar)", Spaces); @HazardyKnusperkeks here.

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Everything is fine, I just need to know how the attribute stuff is formatted with plain LLVM style. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155239/new/ https://reviews.llvm.org/D155239

[PATCH] D154093: [clang-format] Break long strings in Verilog

2023-07-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Apart from that I'm okay. Comment at: clang/lib/Format/WhitespaceManager.cpp:1428 + // case, it is allowed if there is a replacement for the empty range + // between 2 tokens and another non-empty range at the start of the second

[PATCH] D155783: [clang-format] Fix variable lacks of blank when previous operator is star

2023-07-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Please provide a diff with the full context (`-U99` will do the trick). And another context is needed, just `x * y` will never be (meaningful) be formatted. At least a `;` is missing, and I'd argue if your example is just ... something ... x * y;

[PATCH] D154368: [Clang] Fix constraint checking of non-generic lambdas.

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some questions about comments in the test. Comment at: clang/test/SemaTemplate/concepts.cpp:531 SingleDepthReferencesTopLambda(v); //

[PATCH] D155635: [OpenMP] [Reduction] Allow PLUS (+) operator on reduction clauses in OMP > 52

2023-07-20 Thread Fazlay Rabbi via Phabricator via cfe-commits
mdfazlay added a comment. In D155635#4512243 , @ABataev wrote: > In D155635#4512188 , @mdfazlay > wrote: > >> In D155635#4512183 , @ABataev >> wrote: >> >>> Tests? >>

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision as: rsmith. rsmith added a comment. This revision is now accepted and ready to land. Seems reasonable to me. Given that this affects all of LLVM I'd like to wait a day or so to see if anyone has concerns. Comment at:

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Perhaps this can be placed beside `llvm/cmake/config-ix.cmake` `-Wmaybe-uninitialized`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155857/new/ https://reviews.llvm.org/D155857

[clang] 04cc892 - Speculatively fix Clang build bots

2023-07-20 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-07-20T15:11:52-04:00 New Revision: 04cc892eedf579584f642670efd71a5e6fd1494d URL: https://github.com/llvm/llvm-project/commit/04cc892eedf579584f642670efd71a5e6fd1494d DIFF: https://github.com/llvm/llvm-project/commit/04cc892eedf579584f642670efd71a5e6fd1494d.diff

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Perhaps `-Wno-nonnull` should be GCC specific (i.e. not apply to Clang). This option will disable certain warnings related to Clang `_Nonnull` (seems unused in llvm-project) and `__attribute__((nonnull))` (used in a few places). Repository: rG LLVM Github Monorepo

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

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/test/Sema/builtins.c:181-186 + ASSERT(!OPT(test17_c)); + ASSERT(!OPT(_c[0])); + ASSERT(!OPT((char*)test17_c)); ASSERT(!OPT(test17_d));// expected-warning {{folding}} ASSERT(!OPT(_d[0]));//

[PATCH] D154755: [clang-format] Fix formatting of if statements with BlockIndent

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare marked 3 inline comments as done. gedare added a comment. I have fixed the bug in a different way that avoids using `BlockIndent` on `if` conditionals. `AlwaysBreak` will continue to apply to `if` conditionals by default. I may propose a style option to control that behavior later.

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

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 542627. nickdesaulniers retitled this revision from "[clang] allow const structs to be constant expressions in initializer lists" to "[clang] allow const structs to be constant expressions for C". nickdesaulniers edited the summary of this revision.

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-07-20 Thread Fred Fu via Phabricator via cfe-commits
capfredf added inline comments. Comment at: clang/unittests/Interpreter/CodeCompletionTest.cpp:71 +Completer(std::string("void app("), 9); + EXPECT_EQ((size_t)0, out.length()); +} @v.g.vassilev The way I fixed this is a bit hacky. Do you have a better idea?

  1   2   3   >