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

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. In D154357#4492625 , @cwalther wrote: > I am unable to provoke any problem with my tests by putting various things in > `/usr/lib/gcc/`, and I also

[PATCH] D151730: [RISCV] Support target attribute for function

2023-07-12 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. - Asm tests are a no in Clang - You seem to have some crazy long lists that I doubt need to be that long for test coverage (nor do you need so many variations, surely) - CHECL is not CHECK - You have some very strange spacing in CHECK lines Repository: rG LLVM Github M

[PATCH] D155123: [Driver] Warn about -mios-version-min instead of erroring out when targeting MachO embedded architectures

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/macho-embedded.c:16 +// CHECK-MACHO-EMBEDDED-DIAG: clang: warning: argument unused during compilation: '-mios-version-min=5' // CHECK-MACHO-EMBEDDED: "-triple" "{{thumbv[67]e?m}}-apple-unknown-macho" ---

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:225 + + Ensures that incomplete switch statements without default cases are + flagged, covering cases beyond enums where the compiler may not issue warnings. PiotrZSL wrote: > ac

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 539857. xgupta marked 12 inline comments as done. xgupta added a comment. Address all comments excpet in SwitchMissingDefaultCaseCheck.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D4784/new/ https://reviews.

[PATCH] D151730: [RISCV] Support target attribute for function

2023-07-12 Thread Piyou Chen via Phabricator via cfe-commits
BeMg updated this revision to Diff 539856. BeMg added a comment. separate the change to RISCVAsmPrinter.cpp into another patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151730/new/ https://reviews.llvm.org/D151730 Files: clang/lib/Basic/Targ

[PATCH] D153701: [WIP][Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-07-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:8901-8914 + // [P2718R0] Lifetime extension in range-based for loops. + // + // 6.7.7 [class.temporary] p5: + // There are four contexts in which temporaries are destroyed at a different

[PATCH] D144829: [WIP][BPF] Add a few new insns under cpu=v4

2023-07-12 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 539842. yonghong-song edited the summary of this revision. yonghong-song added a comment. - rename some insn names or mode names (movs -> movsx, lds -> ldsx, MEMS -> MEMSX) etc to be consistent with kernel. - add 5 llc flags to control on/off for each k

[PATCH] D155152: [dataflow] Remove deprecated BoolValue flow condition accessors

2023-07-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: mboehme. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. sammccall requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use the

[PATCH] D154290: [Clang] Implement P2741R3 - user-generated static_assert messages

2023-07-12 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:16408 +Char) || +!Char.isInt()) + return false; Why are we specifically checking `!isInt()` what `Kind` do we expect?

[PATCH] D154359: [clang] Reset FP options before template instantiation

2023-07-12 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfde5924dcc69: [clang] Reset FP options before template instantiation (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154359/new/ http

[clang] fde5924 - [clang] Reset FP options before template instantiation

2023-07-12 Thread Serge Pavlov via cfe-commits
Author: Serge Pavlov Date: 2023-07-13T11:49:00+07:00 New Revision: fde5924dcc69fe814085482df259b8cfee236f2c URL: https://github.com/llvm/llvm-project/commit/fde5924dcc69fe814085482df259b8cfee236f2c DIFF: https://github.com/llvm/llvm-project/commit/fde5924dcc69fe814085482df259b8cfee236f2c.diff

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/docs/ReleaseNotes.rst:268 +- ``-ffat-lto-objects`` can now be used to emit object files with both object + code and LLVM bitcode. Previously this flag was ignored for GCC compatibility. + You can insert the https

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

2023-07-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144164/new/ https://reviews.llvm.org/D144164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D154262: [clang][Interp] LambdaThisCaptures

2023-07-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154262/new/ https://reviews.llvm.org/D154262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

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

2023-07-12 Thread Limin Zhang via Phabricator via cfe-commits
Ami-zhang updated this revision to Diff 539836. Ami-zhang added a comment. Remove unnecessary '\' symbol in xray-attribute-instrumentation.ll Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140727/new/ https://reviews.llvm.org/D140727 Files: clang

[PATCH] D154822: [clang] Support '-fgpu-default-stream=per-thread' for NVIDIA CUDA

2023-07-12 Thread boxu.zhang via Phabricator via cfe-commits
boxu-zhang added a comment. In D154822#4494287 , @tra wrote: >> Can anyone push this? > > I can help with this. How do you want your commit to be attributed? The patch > currently has `boxu.zhang `. Do you want it to be > changed to something else? Jus

[PATCH] D155148: Add SM4 instructions.

2023-07-12 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For more details about these instructions, please refer to

[PATCH] D155147: Add SM3 instructions.

2023-07-12 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For more details about these instructions, please refer to

[PATCH] D155146: Add SHA512 instructions.

2023-07-12 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For more details about this instruction, please refer to t

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

2023-07-12 Thread Limin Zhang via Phabricator via cfe-commits
Ami-zhang updated this revision to Diff 539818. Ami-zhang added a comment. Make xray-attribute-instrumentation.ll less sensitive to .Ltmp/.Lxray_fn_idx label changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140727/new/ https://reviews.llvm.or

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

2023-07-12 Thread Limin Zhang via Phabricator via cfe-commits
Ami-zhang added inline comments. Comment at: llvm/test/CodeGen/LoongArch/xray-attribute-instrumentation.ll:24 +; CHECK-NEXT: .Lxray_sleds_start0: +; CHECK-NEXT: .Ltmp0: +; CHECK-NEXT: .dword .Lxray_sled_begin0-.Ltmp0 MaskRay wrote: > See `llvm/test/CodeGen/X86/xr

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-12 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. A thought occurs: in older versions of LLVM, the data layout mechanism worked differently and permitted targets to declare that they supported multiple different data layout strings, by overriding `isCompatibleDataLayout`. This mechanism was removed in D67631

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

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. One nit about the test. Comment at: llvm/test/CodeGen/LoongArch/xray-attribute-instrumentation.ll:24 +; CHECK-NEXT: .Lxray_sleds_start0: +; CHECK-NEXT: .Ltmp0: +; CHECK-NEX

[PATCH] D146777: [clang] Preliminary fat-lto-object support

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D146777#4491842 , @paulkirth wrote: > Rebase and try to accomodate Unified LTO changes. > > Based on the Unified LTO patches, I think this is the correct handling for > FatLTO, but I'd like to get a second opinion before landin

[PATCH] D155123: [Driver] Warn about -mios-version-min instead of erroring out when targeting MachO embedded architectures

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/test/Driver/macho-embedded.c:9 +// RUN: %clang -arch armv7m -target thumbv7-apple-ios -mios-version-min=5 -### -c %s 2>&1 | FileCheck %s --check-

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86-64 datalayout

2023-07-12 Thread Trevor Gross via Phabricator via cfe-commits
tmgross added a comment. Thank you Craig and Harald for getting back so quick. I suppose that leaves it up to what level of `AutoUpgrade` changes would be accepted at a minimum. @efriedma would you consider the changes suggested by @hvdijk sufficient under any circumstances or would you still

[PATCH] D151047: [clang-format] Fix indent for selective formatting.

2023-07-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/unittests/Format/FormatTestSelective.cpp:641-646 + Style = getLLVMStyle(); + Style.FixNamespaceComments = false; + Code = "namespace ns {\n" + "#define REF(alias) alias alias_var;\n" + "}"; + EXPECT_EQ(Code, for

[PATCH] D153989: [compiler-rt] Move crt into builtins

2023-07-12 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D153989#4492342 , @phosek wrote: > In D153989#4492229 , @arichardson > wrote: > >> I think reduplication of build logic makes sense but these are conceptually >> separate things.

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

2023-07-12 Thread Yurong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG677a1da6fafd: [clang] Fix crash caused by PseudoObjectExprBitfields::NumSubExprs overflow (authored by yronglin). Changed prior to commit: https://reviews.llvm.org/D154784?vs=539563&id=539798#toc Repos

[clang] 677a1da - [clang] Fix crash caused by PseudoObjectExprBitfields::NumSubExprs overflow

2023-07-12 Thread via cfe-commits
Author: yrong Date: 2023-07-13T07:58:08+08:00 New Revision: 677a1da6fafddb13aebd4c170c8452029a05858d URL: https://github.com/llvm/llvm-project/commit/677a1da6fafddb13aebd4c170c8452029a05858d DIFF: https://github.com/llvm/llvm-project/commit/677a1da6fafddb13aebd4c170c8452029a05858d.diff LOG: [c

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

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

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

2023-07-12 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5104 +if (CallInfo.isDelegateCall()) { + NeedCopy = false; +} else if (Addr.getAlignment() < Align && rnk wrote: > Please add a comment about this. We need to avoid c

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

2023-07-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5104 +if (CallInfo.isDelegateCall()) { + NeedCopy = false; +} else if (Addr.getAlignment() < Align && Please add a comment about this. We need to avoid copying uncopyable

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

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

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

2023-07-12 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1319 + // Check if the invoker is being emitted (could be in any calling conv). + for (CallingConv CC : {CC_C, CC_X86StdCall, CC_X86FastCall, CC_X86ThisCall, CC_X86VectorCall}) +if (MD->getPar

[PATCH] D155094: Refactoring and asserts in LevelIndentTracker. (NFC)

2023-07-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:92-96 + unsigned LevelIndent = Line.First->OriginalColumn; + if (static_cast(LevelIndent) - Offset >= 0) +LevelIndent -= Offset; + assert(Line.Level < IndentForLevel.size

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-07-12 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Looks like this bug is caused by this commit: https://github.com/llvm/llvm-project/issues/63782#issuecomment-1633312909 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 ___

[PATCH] D155131: [clang][modules] Deserialize included files lazily

2023-07-12 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. Now that it's not eagerly deserialized, should `Preprocessor::alreadyIncluded` call `HeaderInfo.getFileInfo(File)` to ensure the information is up to date? Similarly, we expose the list of files in `Preprocessor::getIncludedFiles` -- is it okay if this list is inco

[PATCH] D154716: [SemaCXX] Fix bug where unexpanded lambda captures where assumed to be expanded

2023-07-12 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:13323 // If this is an init-capture pack, consider expanding the pack now. if (OldVD->isParameterPack()) { Based on the changes is this comment still accurate? Repository: rG

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

2023-07-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D154658#4490468 , @rjmccall wrote: > Oh, this does matter on platforms using pointer authentication, because each > vptr field is signed with a constant discriminator derived from the name of > the class that introduced it. O

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

2023-07-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 539776. rsmith marked an inline comment as done. rsmith added a comment. Herald added a reviewer: jdoerfert. Herald added subscribers: jplehr, sstefan1. - Avoid emitting the type_info when detecting whether it would be null. - Bring back class type in GetVTable

[clang] 5007c78 - [PS4][clang] Fix -funified-lto/-flto-unit default on PS4

2023-07-12 Thread Matthew Voss via cfe-commits
Author: Matthew Voss Date: 2023-07-12T15:32:40-07:00 New Revision: 5007c78ce0936824972ec6ba3cfa598192087ee1 URL: https://github.com/llvm/llvm-project/commit/5007c78ce0936824972ec6ba3cfa598192087ee1 DIFF: https://github.com/llvm/llvm-project/commit/5007c78ce0936824972ec6ba3cfa598192087ee1.diff

[PATCH] D154716: [SemaCXX] Fix bug where unexpanded lambda captures where assumed to be expanded

2023-07-12 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/SemaCXX/lambda-pack-expansion.cpp:36 + +template void f(); + Can we also have an example similar to the bug report where we have multiple arguments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D155131: [clang][modules] Deserialize included files lazily

2023-07-12 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: benlangmuir, vsapsai, Bigcheese. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In D114095

[PATCH] D152604: [Driver] Default -fsanitize-address-globals-dead-stripping to true for ELF

2023-07-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D152604#4494975 , @rnk wrote: > It sounds like two users have hit this now: Chromium and Rust folks. This is > a flag flip, so it's pretty small and safe to rollback, and IMO we should > consider that while we debug the under

[PATCH] D153989: [compiler-rt] Move crt into builtins

2023-07-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D153989#4494278 , @phosek wrote: > Thanks for this heads up, this should be addressed in > rG926f3759ec62a8f170e76a60316cc0bdd9dd2ec9 > . That didn't work,

[PATCH] D152632: [Clang] Add warnings for CWG2521

2023-07-12 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. This breaks libc++: https://buildkite.com/llvm-project/clang-ci/builds/26#01894b7d-8d6f-4893-ab14-1147229390dc Doesn't mean don't land it, but please try to address the issues in this patch to keep everyone green. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

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

2023-07-12 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added a comment. - a major change to the patch: Parameters are now grouped after the grouping of all variables. The groups that contain parameters of the function will form a union group. - changes to the grouping algorithm: Groups will reside in the vector `Groups` and being ac

[PATCH] D20291: [ms] Reintroduce feature guards in intrinsic headers in Microsoft mode

2023-07-12 Thread Alexander Neumann via Phabricator via cfe-commits
Neumann-A added a comment. Herald added a project: All. Should this be reverted due to: https://github.com/llvm/llvm-project/issues/53520 https://github.com/llvm/llvm-project/issues/63492 I mean: yes faster compile is nice to have but having diverging behavior from MSVC seems like the wrong way

[PATCH] D155123: [Driver] Warn about -mios-version-min instead of erroring out when targeting MachO embedded architectures

2023-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: arphaman, t.p.northover, MaskRay. ahatanak added a project: clang. Herald added a subscriber: kristof.beyls. Herald added a project: All. ahatanak requested review of this revision. Sometimes users pass this option when targeting embedded a

[PATCH] D155111: [clangd] Fix build failures observed on build bots for missing libs

2023-07-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. To clarify the issue - the kind of builds that seems to be broken is builds with `BUILD_SHARED_LIBS=ON`. The reason is that these libraries are needed is because the `clangd` target includes `$`, so all the dependencies of `clangDaemonTweaks` would need to be included

[PATCH] D155111: [clangd] Fix build failures observed on build bots for missing libs

2023-07-12 Thread Ahsan Saghir 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 rG915659bfa1e9: [clangd] Fix build failures observed on build bots for missing libs (authored by saghir). Repository: rG LLVM Github Monorepo CHANG

[clang-tools-extra] 915659b - [clangd] Fix build failures observed on build bots for missing libs

2023-07-12 Thread Ahsan Saghir via cfe-commits
Author: Ahsan Saghir Date: 2023-07-12T16:15:26-05:00 New Revision: 915659bfa1e9fe2e2c748ac84d33881e248f9ad5 URL: https://github.com/llvm/llvm-project/commit/915659bfa1e9fe2e2c748ac84d33881e248f9ad5 DIFF: https://github.com/llvm/llvm-project/commit/915659bfa1e9fe2e2c748ac84d33881e248f9ad5.diff

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

2023-07-12 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. In D154696#4494899 , @cor3ntin wrote: > The issue is that `VerifyIndirectOrAsmJumps` does not consider that label > may be local label at all, I'm not exactly sure how to improve that. > The fact it works currently seems ki

[PATCH] D155111: [clangd] Fix build failures observed on build bots for missing libs

2023-07-12 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. Lets get this committed to unblock the bots and if it is not the correct/desired fix, the author can subsequently provide the more appropriate fix. Repository: rG LLVM Github Monorepo

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

2023-07-12 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 539720. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153059/new/ https://reviews.llvm.org/D153059 Files: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Analysis/UnsafeB

[PATCH] D154856: [MemProf] Use new option/pass for profile feedback and matching

2023-07-12 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Ok, turns out I had old test binaries around that got automatically picked up by `lit`. Sorry for the noise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154856/new/ https://reviews.llvm.org/D154856

[PATCH] D152604: [Driver] Default -fsanitize-address-globals-dead-stripping to true for ELF

2023-07-12 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. In D152604#4494975 , @rnk wrote: > It sounds like two users have hit this now: Chromium and Rust folks. s/Rust/Firefox/. And it looks like we're hitting it for the same reason: linking a static rust (LTOed) library with C++ cod

[PATCH] D155094: Refactoring and asserts in LevelIndentTracker. (NFC)

2023-07-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:91 void adjustToUnmodifiedLine(const AnnotatedLine &Line) { -unsigned LevelIndent = Line.First->OriginalColumn; -if (static_cast(LevelIndent) - Offset >= 0) - LevelIndent -= Off

[PATCH] D154928: [clang][Interp] Call dtor of Floating values

2023-07-12 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154928/new/ https://reviews.llvm.org/D154928

[PATCH] D152604: [Driver] Default -fsanitize-address-globals-dead-stripping to true for ELF

2023-07-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. It sounds like two users have hit this now: Chromium and Rust folks. This is a flag flip, so it's pretty small and safe to rollback, and IMO we should consider that while we debug the underlying issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D154790: [HIP] Use native math functions for `-fcuda-approx-transcendentals`

2023-07-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 8 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Headers/__clang_hip_math.h:160 +__DEVICE__ +float __exp10f(float __x) { return __ocml_native_exp10_f32(__x); } + arsenm wrote: > We should have llvm.exp10 but don't today

[PATCH] D139148: Fix nullptr dereference found by Coverity static analysis tool

2023-07-12 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir added a comment. Landing this one fell through the cracks, hence the delay between accepting and committing the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139148/new/ https://reviews.llvm.org/D139148 ___

[PATCH] D139148: Fix nullptr dereference found by Coverity static analysis tool

2023-07-12 Thread Sindhu Chittireddy via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG472232a80d03: [NFC] Fix potential dereferencing of nullptr (authored by schittir). Herald added a subscriber: wangpc. Changed prior to commit: https://reviews.llvm.org/D139148?vs=481989&id=539705#toc R

[clang] 472232a - [NFC] Fix potential dereferencing of nullptr

2023-07-12 Thread Sindhu Chittireddy via cfe-commits
Author: Sindhu Chittireddy Date: 2023-07-12T13:26:03-07:00 New Revision: 472232a80d036a00570cb3b0a9a261113859ea93 URL: https://github.com/llvm/llvm-project/commit/472232a80d036a00570cb3b0a9a261113859ea93 DIFF: https://github.com/llvm/llvm-project/commit/472232a80d036a00570cb3b0a9a261113859ea93.

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

2023-07-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. The issue is that `VerifyIndirectOrAsmJumps` does not consider that label may be local label at all, I'm not exactly sure how to improve that. The fact it works currently seems kind of brittle, what prevent incorrect jumps to be ill-formed is that we looked if a label

[PATCH] D155111: [clangd] Fix build failures observed on build bots for missing libs

2023-07-12 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir added a comment. @mstorsjo @ivanmurashko Can you please take a look at this? This is blocking our builds on the PowerPC buildbots. Thanks a lot for your time! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155111/new/ https://reviews.llvm.or

[PATCH] D155111: [clangd] Fix build failures observed on build bots for missing libs

2023-07-12 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir added a comment. This is to fix failures in the build bot: https://lab.llvm.org/buildbot/#/builders/57/builds/28356 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155111/new/ https://reviews.llvm.org/D155111

[PATCH] D155111: [clangd] Fix build failures observed on build bots for missing libs

2023-07-12 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. saghir requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This was broken by 56ac9d46a7c1468d587ccec02a

[PATCH] D155102: [Clang][RISCV] Align RVV intrinsic builtin names with the C intrinsics

2023-07-12 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/D155102/new/ https://reviews.llvm.org/D155102 ___

[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-07-12 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added inline comments. Comment at: libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.verify.cpp:27 static_assert(!std::is_constant_evaluated(), ""); - // expected-warning@-1 0-1 {{'std::is_constant_evaluated' will always evaluate to 'true' in a ma

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

2023-07-12 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian updated this revision to Diff 539683. MrTrillian added a comment. - Renamed `safe_abs_path` to `abs_path_preserve_drive` @tahonermann - Renamed `%>t` and `%>/t` to `%{t:real}` and `%{/t:real}` @tahonermann - Renamed `PREFIX_EXPANDED` to `SUBMODULE_PREFIX` @aaron.ballman - Documented `%{

[PATCH] D155078: [ci] Make libc++ and Clang CI scripts independent

2023-07-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D155078#4494167 , @ldionne wrote: > In D155078#4493995 , @aaron.ballman > wrote: > >> In D155078#4493468 , @ldionne >> wrote: >> >>> Ok

[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-07-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I only looked at the libc++ part. Comment at: libcxx/test/std/utilities/meta/meta.const.eval/is_constant_evaluated.verify.cpp:27 static_assert(!std::is_constant_evaluated(), ""); - // expected-warning@-1 0-1 {{'std::is_constant_evaluated' will alw

[PATCH] D155078: [ci] Make libc++ and Clang CI scripts independent

2023-07-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Thanks for working on this! I really like the direction. I mainly skimmed the code since the patch as already landed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155078/new/ https://reviews.llvm.org/D155078 ___

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 539670. v.g.vassilev added a comment. Fix the odr_hash.cpp failure. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41416/new/ https://reviews.llvm.org/D41416 Files: clang/include/clang/AST/DeclTemplate.h clang/lib/AST/DeclTemplate.cpp cla

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/switch-missing-default-case.cpp:27 + } +} Add also tests with int/enum behind typedef and no default case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D4784: [clang-tidy] Add check for possibly incomplete switch statements

2023-07-12 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SwitchMissingDefaultCaseCheck.cpp:16-29 +void SwitchMissingDefaultCaseCheck::registerMatchers( +ast_matchers::MatchFinder *Finder) { + Finder->addMatcher( + switchStmt(has(implicitCastExp

[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 539664. v.g.vassilev added a comment. Fix a compilation error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41416/new/ https://reviews.llvm.org/D41416 Files: clang/include/clang/AST/DeclTemplate.h clang/lib/AST/DeclTemplate.cpp clang/li

[PATCH] D155075: [clang][dataflow] Add `DataflowEnvironment::createObject()`.

2023-07-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. Looks great! Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:609 + StorageLocation &createObjectInternal(const VarDecl *D, QualType Ty, +

[PATCH] D155081: Specify the developer policy around links to external resources

2023-07-12 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini accepted this revision. mehdi_amini added a comment. This revision is now accepted and ready to land. Approving in support, but don't consider this enough as-is. I suspect you should get @lattner approval here :) Comment at: llvm/docs/DeveloperPolicy.rst:357 -* I

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

2023-07-12 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian added reviewers: jansvoboda11, benlangmuir. MrTrillian added a comment. Add reviewers from https://reviews.llvm.org/D134923 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154130/new/ https://reviews.llvm.org/D154130 _

[PATCH] D151730: [RISCV] Support target attribute for function

2023-07-12 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. In D151730#4491786 , @craig.topper wrote: > In D151730#4491773 , @jrtc27 wrote: > >> Isn't multiversioning a separate thing that builds on top of per-function >> target attributes? > > Th

[PATCH] D153892: [NFC] Initialize class member pointers to nullptr.

2023-07-12 Thread Sindhu Chittireddy 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 rGe9877eca408e: [NFC] Initialize class member pointers to nullptr. (authored by schittir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[clang] e9877ec - [NFC] Initialize class member pointers to nullptr.

2023-07-12 Thread Sindhu Chittireddy via cfe-commits
Author: Sindhu Chittireddy Date: 2023-07-12T11:04:38-07:00 New Revision: e9877eca408e3c266ca7ba8f05f6a907087e9e82 URL: https://github.com/llvm/llvm-project/commit/e9877eca408e3c266ca7ba8f05f6a907087e9e82 DIFF: https://github.com/llvm/llvm-project/commit/e9877eca408e3c266ca7ba8f05f6a907087e9e82.

[PATCH] D155078: [ci] Make libc++ and Clang CI scripts independent

2023-07-12 Thread Louis Dionne 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 rG298f207e0649: [ci] Make libc++ and Clang CI scripts independent (authored by ldionne). Changed prior to commit: https://reviews.llvm.org/D155078?v

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

2023-07-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin reopened this revision. cor3ntin added a comment. This revision is now accepted and ready to land. @nathanchance Thanks for letting me know. I did revert the patch and plan to investigate later this week Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D155078: [ci] Make libc++ and Clang CI scripts independent

2023-07-12 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. I will land this because I can tell this is correct after following the CI pipeline's execution, and https://github.com/google/llvm-premerge-checks/pull/452 has already landed so the CI could start becoming red anytime now. If there are concerns about Clang having its

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

2023-07-12 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian added a subscriber: benlangmuir. MrTrillian added a comment. In D154130#4486898 , @tahonermann wrote: >> 95% of the %>t are around clang modulemap files, because that code resolves >> real paths in C++ by design, so I can't avoid it. > > Can

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

2023-07-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: clang/include/clang/Sema/CodeCompleteConsumer.h:342 +/// Code completion at a top level in a REPL session. +CCC_ReplTopLevel, }; Comment at: clang/lib/Interpreter/CodeCompletion.cpp:10

[PATCH] D155081: Specify the developer policy around links to external resources

2023-07-12 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: llvm/docs/DeveloperPolicy.rst:359 + If the patch fixes a bug in GitHub Issues, we encourage adding + "Fixes https://github.com/llvm/llvm-project/issues/12345"; to automate closing + the issue in GitHub. If the patch has been reviewed,

[PATCH] D153589: [NFC] Initialize pointer fields and remove a needless null check.

2023-07-12 Thread Sindhu Chittireddy via Phabricator via cfe-commits
schittir closed this revision. schittir added a comment. In D153589#4493187 , @HazardyKnusperkeks wrote: > Can you mark this change as closed? > If you'd put "Differential Revision: https://reviews.llvm.org/D153589"; in > your commit message this would

[PATCH] D154822: [clang] Support '-fgpu-default-stream=per-thread' for NVIDIA CUDA

2023-07-12 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > Can anyone push this? I can help with this. How do you want your commit to be attributed? The patch currently has `boxu.zhang `. Do you want it to be changed to something else? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D154359: [clang] Reset FP options before template instantiation

2023-07-12 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. LGTM. Thanks for the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154359/new/ https://reviews.llvm.org/D154359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D153989: [compiler-rt] Move crt into builtins

2023-07-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D153989#4494012 , @nathanchance wrote: > This change appears to break `-DCOMPILER_RT_BUILD_CRT=OFF`: > > $ cmake -B build -S llvm -DCMAKE_BUILD_TYPE=Release > -DCOMPILER_RT_BUILD_CRT=OFF -DLLVM_ENABLE_PROJECTS='clang;compile

[PATCH] D152996: [RISCV][POC] Model frm control for vfadd

2023-07-12 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:4816 + case RISCVVector::BI__builtin_rvv_vfadd_vf_rm_tu: + case RISCVVector::BI__builtin_rvv_vfadd_vv_rm_tama: + case RISCVVector::BI__builtin_rvv_vfadd_vf_rm_tama: craig.topper wrote: >

[PATCH] D155102: [Clang][RISCV] Align RVV intrinsic builtin names with the C intrinsics

2023-07-12 Thread Yueh-Ting (eop) Chen via Phabricator via cfe-commits
eopXD created this revision. eopXD added a reviewer: craig.topper. 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,

[PATCH] D154856: [MemProf] Use new option/pass for profile feedback and matching

2023-07-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D154856#4494195 , @Hahnfeld wrote: > Hi @tejohnson, I'm seeing crashes after this revision: > > Failed Tests (2): > LLVM-Unit :: Passes/./PluginsTests/0/2 > LLVM-Unit :: Passes/./PluginsTests/1/2 I haven't seen the

[PATCH] D154636: [8/8][RISCV] Add rounding mode control variant for vfredosum, vfredusum, vfwredosum, vfwredusum

2023-07-12 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 Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:6821 //===--===// -let Uses

  1   2   3   >