[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/xray/xray_loongarch64.cpp:23 +enum PatchOpcodes : uint32_t { + PO_ADDID = 0x02c0, // addi.d rd, rj, imm + PO_SD = 0x29c0, // st.d rd, base, offset I think the `PO_` style actually harms

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/xray/xray_loongarch64.cpp:153 + const XRaySledEntry ) XRAY_NEVER_INSTRUMENT { + // FIXME: In the future we'd need to distinguish between non-tail exits and + // tail exits for better

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-05 Thread Sunil K via Phabricator via cfe-commits
koops added inline comments. Comment at: clang/test/OpenMP/generic_loop_ast_print.cpp:26 //PRINT: T j, z; -//PRINT: #pragma omp loop collapse(C) reduction(+: z) lastprivate(j) bind(thread) +//PRINT: #pragma omp simd collapse(C) reduction(+: z) lastprivate(j) //PRINT:

[PATCH] D150221: Add option -fkeep-persistent-storage-variables to emit all variables that have a persistent storage duration

2023-07-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Update (looping back from offline discussion): The LTO use case is covered. There was some confusion over which meaning of "static" was meant by `-fkeep-static-consts`. The "static" meant was storage duration. Furthermore, there is some discussion over

[PATCH] D154531: [AMDGPU] Support -mcpu=native for OpenCL

2023-07-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 537575. yaxunl marked an inline comment as done. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154531/new/ https://reviews.llvm.org/D154531 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D154531: [AMDGPU] Support -mcpu=native for OpenCL

2023-07-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:86 +def warn_drv_multi_gpu_arch : Warning< + "multiple %0 architecture are detected: %1; only the first one is used for " + "'%2'">, InGroup;

[PATCH] D154531: [AMDGPU] Support -mcpu=native for OpenCL

2023-07-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D154531#4475386 , @MaskRay wrote: > Seems reasonable. I assume that there isn't a way to add a portable test. Right. It is difficult to test it with lit tests, but we will test it with internal CI. CHANGES SINCE LAST ACTION

[PATCH] D153205: [clang-format] Support block indenting array/struct list initializers

2023-07-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Do you need to update the current diff to show the net change? For example, the unit tests you added don't show up as a diff right now. Comment at: clang/include/clang/Format/Format.h:95-98 /// \warning -/// Note: This currently only applies

[PATCH] D153600: Implement -frecord-command-line for XCOFF

2023-07-05 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan added inline comments. Comment at: llvm/lib/MC/MCAsmStreamer.cpp:981 + + // Metadata needs to be padded out to an even word size. + size_t MetadataSize = Metadata.size(); scott.linder wrote: > stephenpeckham wrote: > > There's no requirement to pad

[PATCH] D153600: Implement -frecord-command-line for XCOFF

2023-07-05 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan updated this revision to Diff 537572. Jake-Egan added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153600/new/ https://reviews.llvm.org/D153600 Files: clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-05 Thread Limin Zhang via Phabricator via cfe-commits
Ami-zhang updated this revision to Diff 537564. Ami-zhang added a comment. (1) Rebase (2) Make some minor changes to xray-attribute-instrumentation.ll Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140727/new/ https://reviews.llvm.org/D140727

[PATCH] D154559: [clang] Fix constant evaluation about static member function

2023-07-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra, rsmith. Herald added a project: All. yaxunl requested review of this revision. Currently, clang does not allow static constexpr member functions called through a const reference of an object in constant expression, e.g. the

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-07-05 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan added a comment. Hi, the following assertion is getting tripped on AIX: Assertion failed: *FpPragmaCurrentValue == SemaObj->FpPragmaStack.DefaultValue && "Expected a default pragma float_control value", file

[PATCH] D154460: [ODRHash] Stop hashing `ObjCMethodDecl::isPropertyAccessor` as it doesn't capture inherent method quality.

2023-07-05 Thread Volodymyr Sapsai 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 rGf7e0aae7284b: [ODRHash] Stop hashing `ObjCMethodDecl::isPropertyAccessor` as it doesnt… (authored by vsapsai). Repository: rG LLVM Github

[PATCH] D154459: [ODRHash] Stop hashing `ObjCMethodDecl::isOverriding` as it doesn't capture inherent method quality.

2023-07-05 Thread Volodymyr Sapsai 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 rG18530e5d0770: [ODRHash] Stop hashing `ObjCMethodDecl::isOverriding` as it doesnt capture… (authored by vsapsai). Repository: rG LLVM Github

[clang] f7e0aae - [ODRHash] Stop hashing `ObjCMethodDecl::isPropertyAccessor` as it doesn't capture inherent method quality.

2023-07-05 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-07-05T18:04:50-07:00 New Revision: f7e0aae7284b7ad0cf3cc277c5ef8731f564443d URL: https://github.com/llvm/llvm-project/commit/f7e0aae7284b7ad0cf3cc277c5ef8731f564443d DIFF:

[clang] 18530e5 - [ODRHash] Stop hashing `ObjCMethodDecl::isOverriding` as it doesn't capture inherent method quality.

2023-07-05 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-07-05T18:04:32-07:00 New Revision: 18530e5d0770098bc33ff6f02a7b63ea887692a6 URL: https://github.com/llvm/llvm-project/commit/18530e5d0770098bc33ff6f02a7b63ea887692a6 DIFF:

[PATCH] D154459: [ODRHash] Stop hashing `ObjCMethodDecl::isOverriding` as it doesn't capture inherent method quality.

2023-07-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154459/new/ https://reviews.llvm.org/D154459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D154493: [X86] Support some Intel CPUs for cpu_specific/dispatch feature

2023-07-05 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked an inline comment as done. FreddyYe added inline comments. Comment at: llvm/lib/TargetParser/X86TargetParser.cpp:333 { {"pentium"}, CK_Pentium, ~0U, FeatureX87 | FeatureCMPXCHG8B, 'B', false }, { {"pentium-mmx"}, CK_PentiumMMX, ~0U, FeaturesPentiumMMX,

[PATCH] D154556: [OPENMP52] Support Support omp_cur_iteration modifier for doacross clause.

2023-07-05 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 537553. jyu2 added a comment. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154556/new/ https://reviews.llvm.org/D154556 Files: clang/include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D154556: [OPENMP52] Support Support omp_cur_iteration modifier for doacross clause.

2023-07-05 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: ABataev, mikerice, jdoerfert. jyu2 added a project: OpenMP. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. jyu2 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald

[PATCH] D153375: [Clang] Fix incorrect use of direct initialization with copy initialization

2023-07-05 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp:293 + e = {E::E1}; + e = {0}; // expected-error {{cannot initialize a value of type 'E' with an rvalue of type 'int'}} +} rsmith wrote: > This looks valid to me.

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

2023-07-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D153536#4475308 , @cor3ntin wrote: > In D153536#4475240 , @dblaikie > wrote: > >> In D153536#4475199 , @cor3ntin >> wrote: >> >>> In

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

2023-07-05 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/include/clang/Basic/riscv_vector.td:2378 + +multiclass RVVOutBuiltinSetP { What does `P` in this name mean? Is this because they use OP_P as their opcode? If so I don't think that should be part of how we

[PATCH] D154036: [libc] Add support for creating wrapper headers for offloading in clang

2023-07-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 537535. jhuber6 added a comment. Fix guard on the headers for offloading languages Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154036/new/ https://reviews.llvm.org/D154036 Files:

[PATCH] D153205: [clang-format] Support block indenting array/struct list initializers

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

[PATCH] D153600: Implement -frecord-command-line for XCOFF

2023-07-05 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added inline comments. Comment at: llvm/lib/MC/MCAsmStreamer.cpp:993 + // Metadata needs to be padded out to an even word size. + uint32_t PaddedSize = alignTo(std::max((int)MetadataSize, 1), 4); + uint32_t PaddingSize = PaddedSize - MetadataSize;

[PATCH] D154531: [AMDGPU] Support -mcpu=native for OpenCL

2023-07-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:86 +def warn_drv_multi_gpu_arch : Warning< + "multiple %0 architecture are detected: %1; only the first one is used for " + "'%2'">, InGroup;

[PATCH] D153600: Implement -frecord-command-line for XCOFF

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/MC/MCAsmStreamer.cpp:972 +void MCAsmStreamer::emitXCOFFCInfoSym(StringRef Name, StringRef Metadata) { + const char *InfoDirective = "\t.info "; + const char *Separator = ", "; Repository: rG LLVM Github

[PATCH] D153205: [clang-format] Support block indenting array/struct list initializers

2023-07-05 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added inline comments. Comment at: clang/include/clang/Format/Format.h:95-98 /// \warning -/// Note: This currently only applies to parentheses. +/// Note: This currently only applies to parentheses and braced list +/// initializers when

[PATCH] D153600: Implement -frecord-command-line for XCOFF

2023-07-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:2974 +RSOS << "@(#)" << MDS->getString(); +RSOS.write('\0'); + } hubert.reinterpretcast wrote: > stephenpeckham wrote: > > I would use a newline here.

[PATCH] D154552: [clang-format] Add note directive generation for docs

2023-07-05 Thread Gedare Bloom via Phabricator via cfe-commits
gedare created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. gedare requested review of this revision. Herald added a comment. NOTE: Clang-Format Team Automated

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

2023-07-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/cxx2c-placeholder-vars.cpp:2 +// RUN: %clang -cc1 -fsyntax-only -verify -std=c++2c -Wunused-parameter -Wunused %s + +void static_var() { hubert.reinterpretcast wrote: > cor3ntin wrote:

[PATCH] D154531: [AMDGPU] Support -mcpu=native for OpenCL

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Seems reasonable. I assume that there isn't a way to add a portable test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154531/new/ https://reviews.llvm.org/D154531 ___ cfe-commits mailing list

[PATCH] D154484: [clang-format] Add an option to remove redundant parentheses

2023-07-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I reckon you could detect the `=` condition between the matching paren don't you? I ran this on my quite large code base and this was one of the only issues I've seen thus far.. This is a great feature, for my codebase this generated changes in about 10% of

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

2023-07-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/cxx2c-placeholder-vars.cpp:2 +// RUN: %clang -cc1 -fsyntax-only -verify -std=c++2c -Wunused-parameter -Wunused %s + +void static_var() { cor3ntin wrote: > cor3ntin wrote: > > cor3ntin

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-07-05 Thread Gedare Bloom via Phabricator via cfe-commits
gedare created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. gedare requested review of this revision. Changes the AllowShortLoopsOnASingleLine from a boolean to

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/cxx2c-placeholder-vars.cpp:2 +// RUN: %clang -cc1 -fsyntax-only -verify -std=c++2c -Wunused-parameter -Wunused %s + +void static_var() { cor3ntin wrote: > cor3ntin wrote: > > hubert.reinterpretcast

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153536#4475215 , @philnik wrote: > Would it be possible to make `__` also a placeholder, so standard libraries > can use this before C++26? Or is `_` already a reserved identifier? (I don't > think so) I don't see an

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153536#4475240 , @dblaikie wrote: > In D153536#4475199 , @cor3ntin > wrote: > >> In D153536#4474733 , @dblaikie >> wrote: >> >>> Maybe try

[PATCH] D154295: [Driver][MSVC] Support DWARF fission when using LTO on Windows

2023-07-05 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added subscribers: hans, rnk. mstorsjo added a comment. This revision is now accepted and ready to land. I think this looks reasonable, unless e.g. @hans or @rnk would disagree. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-07-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D153536#4475199 , @cor3ntin wrote: > In D153536#4474733 , @dblaikie > wrote: > >> Maybe try testing with more different values, to demonstrate which entities >> the debugger is

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

2023-07-05 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. Would it be possible to make `__` also a placeholder, so standard libraries can use this before C++26? Or is `_` already a reserved identifier? (I don't think so) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153536/new/

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D153536#4474733 , @dblaikie wrote: > Maybe try testing with more different values, to demonstrate which entities > the debugger is finding? > > int _ = 1; > int _ = 2; > { > int _ = 3; > int _ = 7; > } > > Or

[PATCH] D153835: [Sema] Clone VisibilityAttr for functions in template instantiations

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153835/new/ https://reviews.llvm.org/D153835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-07-05 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/cxx2c-placeholder-vars.cpp:2 +// RUN: %clang -cc1 -fsyntax-only -verify -std=c++2c -Wunused-parameter -Wunused %s + +void static_var() { hubert.reinterpretcast wrote: > hubert.reinterpretcast wrote:

[PATCH] D154495: clang: Attach !fpmath metadata to __builtin_sqrt based on language flags

2023-07-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:5602 +// source are correctly rounded. +SetFPAccuracy(Val, 2.5); + } arsenm wrote: > yaxunl wrote: > > the spec says sqrt relative error is 3ULP > >

[PATCH] D154396: [clang] Add support for SerenityOS

2023-07-05 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.h:38 + +class LLVM_LIBRARY_VISIBILITY Serenity : public ToolChain { +public: Have you considered inheriting from `Generic_GCC` to allow more code reuse? Repository: rG LLVM Github

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 537498. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGOpenMPRuntime.h clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

[PATCH] D154484: [clang-format] Add an option to remove redundant parentheses

2023-07-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan planned changes to this revision. owenpan added a comment. Yep! After reformating `clang/lib/Format/` and rebuilding clang-format, I got the same warning: WhitespaceManager.cpp:233:45: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:591 + auto = + *(static_cast(())); + RT.getKmpcFreeShared(CGF, AddrSizePair); Same, just CGOpenMPRuntime = CGM.getOpenMPRuntime(); Comment at:

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:699-710 + /// Get call to __kmpc_alloc_shared + virtual std::pair + getKmpcAllocShared(CodeGenFunction , const VarDecl *VD) { +llvm_unreachable("not implemented"); + } + + /// Get call to

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1606 + CGOpenMPRuntimeGPU = + *(static_cast(())); + if (RT.isDelayedVariableLengthDecl(*this, )) { doru1004 wrote: > ABataev wrote: > > ABataev wrote: > > > 1. use

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1606 + CGOpenMPRuntimeGPU = + *(static_cast(())); + if (RT.isDelayedVariableLengthDecl(*this, )) { ABataev wrote: > ABataev wrote: > > 1. use

[PATCH] D154388: Don't pass -ibuiltininc, which is used only by the driver, to CC1

2023-07-05 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ahatanak marked an inline comment as done. Closed by commit rGa2b7297dff34: Dont pass -ibuiltininc, which is used only by the driver, to CC1 (authored by ahatanak).

[clang] a2b7297 - Don't pass -ibuiltininc, which is used only by the driver, to CC1

2023-07-05 Thread Akira Hatanaka via cfe-commits
Author: Akira Hatanaka Date: 2023-07-05T14:03:21-07:00 New Revision: a2b7297dff345e3fc4886c7e76a67d32ea2cd134 URL: https://github.com/llvm/llvm-project/commit/a2b7297dff345e3fc4886c7e76a67d32ea2cd134 DIFF:

[PATCH] D153205: [clang-format] Support block indenting array/struct list initializers

2023-07-05 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/include/clang/Format/Format.h:95-98 /// \warning -/// Note: This currently only applies to parentheses. +/// Note: This currently only applies to parentheses and braced list +/// initializers when

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1606 + CGOpenMPRuntimeGPU = + *(static_cast(())); + if (RT.isDelayedVariableLengthDecl(*this, )) { ABataev wrote: > 1. use `static_cast(CGM.getOpenMPRuntime())` > 2. It

[PATCH] D148654: Modify BoundsSan to improve debuggability

2023-07-05 Thread Oskar Wirga via Phabricator via cfe-commits
oskarwirga added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-07-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/cxx2c-placeholder-vars.cpp:2 +// RUN: %clang -cc1 -fsyntax-only -verify -std=c++2c -Wunused-parameter -Wunused %s + +void static_var() { hubert.reinterpretcast wrote: >

[PATCH] D145227: [LLVM][OHOS] Clang toolchain and targets

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Herald added a subscriber: wangpc. Comment at: clang/lib/Driver/ToolChains/OHOS.h:38 + bool isPICDefaultForced() const override { return false; } + bool useRelaxRelocations() const override { return false; } + UnwindLibType

[PATCH] D154495: clang: Attach !fpmath metadata to __builtin_sqrt based on language flags

2023-07-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:5602 +// source are correctly rounded. +SetFPAccuracy(Val, 2.5); + } yaxunl wrote: > the spec says sqrt relative error is 3ULP >

[PATCH] D154397: [Driver] Default to -ftls-model=initial-exec on SerenityOS

2023-07-05 Thread Daniel Bertalan via Phabricator via cfe-commits
BertalanD added a comment. Hi MaskRay! Your blog post (alongside the Drepper TLS doc) proved to be a very helpful resource for our implementation of the dynamic TLS interface. I currently have a SerenityOS PR open that implements

[PATCH] D154396: [clang] Add support for SerenityOS

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Serenity.cpp:85 + auto linkerIs = [Exec](const char *name) { +return llvm::sys::path::filename(Exec).equals_insensitive(name) || + llvm::sys::path::stem(Exec).equals_insensitive(name);

[clang] cf08c10 - [NFC][clang] add extra member-alignment testcase

2023-07-05 Thread David Tenty via cfe-commits
Author: David Tenty Date: 2023-07-05T16:44:05-04:00 New Revision: cf08c103266b7ee59cbc2352c4d20f27472cb257 URL: https://github.com/llvm/llvm-project/commit/cf08c103266b7ee59cbc2352c4d20f27472cb257 DIFF: https://github.com/llvm/llvm-project/commit/cf08c103266b7ee59cbc2352c4d20f27472cb257.diff

[PATCH] D154396: [clang] Add support for SerenityOS

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Upstreaming support requires rigid testing, otherwise it's fairly easy for other contributors to break your code while refactoring. https://maskray.me/blog/2021-08-08-toolchain-testing "I don't know whether a test is needed" `clang/test/Driver` has many tests that

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 537485. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGOpenMPRuntime.h

[PATCH] D154397: [Driver] Default to -ftls-model=initial-exec on SerenityOS

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I don't think this belongs to the upstream, either. Note: musl's TLS implementation is very clean and may be a good reference. https://maskray.me/blog/2021-02-14-all-about-thread-local-storage > glibc ld.so reserves some space in static TLS blocks and allows dlopen on

[PATCH] D154543: [llvm] Move StringExtras.h include from Error.h to Error.cpp

2023-07-05 Thread Elliot Goodrich via Phabricator via cfe-commits
IncludeGuardian created this revision. Herald added subscribers: ormris, hiraditya. Herald added a project: All. IncludeGuardian requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay. Herald added projects: clang, LLVM. Add missing parts that caused

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-07-05 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 537478. doru1004 marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 Files: clang/lib/CodeGen/CGDecl.cpp

[PATCH] D154130: [lit] Avoid os.path.realpath on Windows due to MAX_PATH limitations

2023-07-05 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian added a comment. Herald added a subscriber: wangpc. How do I take action on the test failure? It runs without issues on my machine: tristan@nuc-on-wood:~/project-llvm$ python3 build/bin/llvm-lit -sv --filter test.toy build/tools/mlir /test/ Testing Time: 0.55s Excluded:

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

2023-07-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/cxx2c-placeholder-vars.cpp:2 +// RUN: %clang -cc1 -fsyntax-only -verify -std=c++2c -Wunused-parameter -Wunused %s + +void static_var() { hubert.reinterpretcast wrote: > Can we have

[clang] 4b5ca17 - Remove unused test file

2023-07-05 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-07-05T15:59:22-04:00 New Revision: 4b5ca175431c559a91ffd40333a0fae9e8ac424c URL: https://github.com/llvm/llvm-project/commit/4b5ca175431c559a91ffd40333a0fae9e8ac424c DIFF: https://github.com/llvm/llvm-project/commit/4b5ca175431c559a91ffd40333a0fae9e8ac424c.diff

[PATCH] D154495: clang: Attach !fpmath metadata to __builtin_sqrt based on language flags

2023-07-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:5602 +// source are correctly rounded. +SetFPAccuracy(Val, 2.5); + } the spec says sqrt relative error is 3ULP

[PATCH] D154388: Don't pass -ibuiltininc, which is used only by the driver, to CC1

2023-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1309 +} else if (A->getOption().matches(options::OPT_ibuiltininc)) { + // This is used only by the driver.

[PATCH] D154366: [clang][ExprConstant] Print template arguments when describing stack frame

2023-07-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Do we not already have some function name printing helper we could be reusing that might have some smarts about not printing deduced template arguments, using preferred names, whatever else? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-07-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:542 +N = Decls.size(); + } + This is going to fire on every single ordinary lookup that finds multiple declarations, right? I haven't fully internalized the issue you're solving

[clang] 92f4bf2 - Fix aggregate CTAD with string literals adding extra const

2023-07-05 Thread Yuanfang Chen via cfe-commits
Author: Mital Ashok Date: 2023-07-05T11:54:51-07:00 New Revision: 92f4bf268998201ec05dab9917c2873afc578a94 URL: https://github.com/llvm/llvm-project/commit/92f4bf268998201ec05dab9917c2873afc578a94 DIFF: https://github.com/llvm/llvm-project/commit/92f4bf268998201ec05dab9917c2873afc578a94.diff

[PATCH] D154301: Fix aggregate CTAD with string literals adding extra const

2023-07-05 Thread Yuanfang Chen 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 rG92f4bf268998: Fix aggregate CTAD with string literals adding extra const (authored by MitalAshok, committed by ychen). Repository: rG LLVM Github

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

2023-07-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Maybe try testing with more different values, to demonstrate which entities the debugger is finding? int _ = 1; int _ = 2; { int _ = 3; int _ = 7; } Or something like that. But, honestly, if the point is that these variables should be unnameable -

[PATCH] D135849: [llvm] Return canonical virtual path from `RedirectingFileSystem`

2023-07-05 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D135849#4469376 , @benlangmuir wrote: > In D135849#4469347 , @jansvoboda11 > wrote: > >> It'd be really nice to have DirectoryEntry::getDir() API, so that we can >> walk up the

[PATCH] D86993: Document Clang's expectations of the C standard library.

2023-07-05 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. In D86993#4474392 , @rjmccall wrote: > In D86993#4474267 , @RalfJung wrote: > >> The first point is important for LLVM's own memcpy/memmove intrinsics, which >> are documented as NOPs on

[PATCH] D152109: Update clang-repl documentation

2023-07-05 Thread Vassil Vassilev 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 rG1ac3e13c3e4a: [clang-repl] Improve the clang-repl documentation. (authored by Krishna-13-cyber, committed by v.g.vassilev). Repository: rG LLVM

[clang] 1ac3e13 - [clang-repl] Improve the clang-repl documentation.

2023-07-05 Thread Vassil Vassilev via cfe-commits
Author: Krishna-13-cyber Date: 2023-07-05T18:27:22Z New Revision: 1ac3e13c3e4ab6816116a6e6997f81acf1039849 URL: https://github.com/llvm/llvm-project/commit/1ac3e13c3e4ab6816116a6e6997f81acf1039849 DIFF: https://github.com/llvm/llvm-project/commit/1ac3e13c3e4ab6816116a6e6997f81acf1039849.diff

[PATCH] D153738: Add LibClang guide

2023-07-05 Thread Manuel via Phabricator via cfe-commits
manuel5975p updated this revision to Diff 537443. manuel5975p marked 9 inline comments as done. manuel5975p added a comment. Incorporate Aaron Ballman's corrections Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153738/new/

[PATCH] D153906: [clang] Allow disassembly of multi-module bitcode files

2023-07-05 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a comment. Yes, I'm working on a new test that's less target dependent. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153906/new/ https://reviews.llvm.org/D153906 ___ cfe-commits mailing

[PATCH] D86993: Document Clang's expectations of the C standard library.

2023-07-05 Thread Ralf via Phabricator via cfe-commits
RalfJung added a comment. I was told that "glibc explicitly only marks memcpy arguments as nonnull for external use of headers (i.e. the nonnull assumptions are disabled when compiling the implementation)"... okay now re-reading this, that's a statement about glibc, not GCC. Anyway this is

[PATCH] D154502: [AST] Fix bug in UnresolvedSet::erase of last element

2023-07-05 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: clang/unittests/AST/UnresolvedSetTest.cpp:11 +}; +} // namespace clang + jroelofs wrote: > This ODR violation broke the build for me because it's picking up the > definition from Decl.h instead of this one. > > ``` >

[PATCH] D154502: [AST] Fix bug in UnresolvedSet::erase of last element

2023-07-05 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: clang/unittests/AST/UnresolvedSetTest.cpp:11 +}; +} // namespace clang + This ODR violation broke the build for me because it's picking up the definition from Decl.h instead of this one. ```

[PATCH] D86993: Document Clang's expectations of the C standard library.

2023-07-05 Thread Stephen Peckham via Phabricator via cfe-commits
stephenpeckham added a comment. Is memmove() expected to perform a lot worse than memcpy()? Why not just use memmove() all the time. In some library implementations, memcpy() and memmove() are the same function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D154366: [clang][ExprConstant] Print template arguments when describing stack frame

2023-07-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a subscriber: dblaikie. cjdb added a comment. Generally in favour of this, but I wonder if we ought to have a way of suppressing it when the specialisation is known and ends up being a gargantuan name (this is a discussion, not an action item). cc @dblaikie Repository: rG LLVM

[PATCH] D86993: Document Clang's expectations of the C standard library.

2023-07-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. You can't just consider the declared function signatures; `memcpy`ing two non-empty objects with perfect overlap is a violation of `restrict`, and yet IIRC GCC is known to assume that that works in some places. (I can't duplicate that off-hand, though — GCC seems

[PATCH] D154484: [clang-format] Add an option to remove redundant parentheses

2023-07-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Here is a potential failure scenario (test.cpp) void *bar(); void foo() { void *p; int i = 0; while ((p = bar())) { i++; } } (.clang-format) Language: Cpp RemoveParentheses: ReturnStatement clang-format test.cpp >

[PATCH] D86993: Document Clang's expectations of the C standard library.

2023-07-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D86993#4474403 , @RalfJung wrote: > Yeah, agreed. Though I hear that GCC makes similar assumptions, so this > should count as something I think. (I don't have a source for this, so it > should probably be verified.) glibc's

[PATCH] D154531: [AMDGPU] Support -mcpu=native for OpenCL

2023-07-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, arsenm, MaskRay. Herald added subscribers: kerbowa, Anastasia, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: wdng. When -mcpu=native is specified, try

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

2023-07-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/cxx2c-placeholder-vars.cpp:2 +// RUN: %clang -cc1 -fsyntax-only -verify -std=c++2c -Wunused-parameter -Wunused %s + +void static_var() { Can we have tests for: ``` struct { int _, _; }

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2023-07-05 Thread Guillot Tony via Phabricator via cfe-commits
to268 updated this revision to Diff 537422. to268 added a comment. Minor code reformatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133289/new/ https://reviews.llvm.org/D133289 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D145823: [OpenMP][CodeGen] Add codegen for combined 'loop' directives.

2023-07-05 Thread David Pagan 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 rGeb61bde829bc: [OpenMP][CodeGen] Add codegen for combined loop directives. (authored by ddpagan). Herald added a project: clang. Herald added a

[PATCH] D86993: Document Clang's expectations of the C standard library.

2023-07-05 Thread Ralf via Phabricator via cfe-commits
RalfJung added a comment. Yeah, agreed. Though I hear that GCC makes similar assumptions, so this should count as something I think. (I don't have a source for this, so it should probably be verified.) Anyway I don't think LLVM documenting its assumptions should be blocked on changing the C

[PATCH] D86993: Document Clang's expectations of the C standard library.

2023-07-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D86993#4474267 , @RalfJung wrote: > The first point is important for LLVM's own memcpy/memmove intrinsics, which > are documented as NOPs on size 0 (and e.g. Rust relies on that). Right, I understand that these assumptions

  1   2   3   >