[llvm] [clang] [RISCV] Add Zicfiss support to the shadow call stack implementation. (PR #68075)

2024-01-07 Thread Yeting Kuo via cfe-commits
@@ -151,9 +155,10 @@ Usage To enable ShadowCallStack, just pass the ``-fsanitize=shadow-call-stack`` flag to both compile and link command lines. On aarch64, you also need to pass -``-ffixed-x18`` unless your target already reserves ``x18``. On RISC-V, ``x3`` -(``gp``) is

[llvm] [clang] [RISCV] Add Zicfiss support to the shadow call stack implementation. (PR #68075)

2024-01-07 Thread Yeting Kuo via cfe-commits
@@ -57,11 +57,14 @@ compiled application or the operating system. Integrating the runtime into the operating system should be preferred since otherwise all thread creation and destruction would need to be intercepted by the application. -The instrumentation makes use of the

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: I had this

[clang] [clang][Interp] Implement integral->complex casts (PR #75590)

2024-01-07 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/75590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-07 Thread Jonas Hahnfeld via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } hahnjo wrote: That test does not exercise an alias argument

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Well, this patch is up since almost three months now (!). Sure, we can keep > carrying a similar fix downstream, but ideally I would really like to get rid > of as many local changes as possible. That's not possible without proper > review, but the current situation is

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2024-01-07 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/69900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c15e583 - [clang][Interp] Fix nullptr array dereferencing (#75798)

2024-01-07 Thread via cfe-commits
Author: Timm Baeder Date: 2024-01-08T08:33:15+01:00 New Revision: c15e5836d49763e43736d13eb4b873e01dcc9ef0 URL: https://github.com/llvm/llvm-project/commit/c15e5836d49763e43736d13eb4b873e01dcc9ef0 DIFF: https://github.com/llvm/llvm-project/commit/c15e5836d49763e43736d13eb4b873e01dcc9ef0.diff

[clang] [clang][Interp] Fix nullptr array dereferencing (PR #75798)

2024-01-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/75798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-07 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Well, this patch is up since almost three months now (!). Sure, we can keep carrying a similar fix downstream, but ideally I would really like to get rid of as many local changes as possible. That's not possible without proper review, but the current situation is quite

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-07 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Ping, is this ok to be accepted and landed? If it is not hurry, I prefer to wait @cor3ntin to have a look. But given the scale of the patch, it should be good too to land it in 2 weeks if there is no other comments. https://github.com/llvm/llvm-project/pull/69076

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -15754,10 +15754,18 @@ bool Expr::EvaluateAsInitializer(APValue , const ASTContext , LValue LVal; LVal.set(VD); -if (!EvaluateInPlace(Value, Info, LVal, this, - /*AllowNonLiteralTypes=*/true) || -EStatus.HasSideEffects) -

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2024-01-07 Thread Fangrui Song via cfe-commits
@@ -10410,40 +10410,53 @@ static void DiagnoseNarrowingInInitList(Sema , // No narrowing occurred. return; - case NK_Type_Narrowing: + case NK_Type_Narrowing: { // This was a floating-to-integer conversion, which is always considered a // narrowing

[clang] [Sema] Add -Wc++11-narrowing-const-reference (PR #76094)

2024-01-07 Thread Fangrui Song via cfe-commits
@@ -6158,12 +6158,24 @@ def err_illegal_initializer_type : Error<"illegal initializer type %0">; def ext_init_list_type_narrowing : ExtWarn< "type %0 cannot be narrowed to %1 in initializer list">, InGroup, DefaultError, SFINAEFailure; +// *_narrowing_const_reference

[clang] [Sema] Clean up -Wc++11-narrowing-const-reference code after #76094. NFC (PR #77278)

2024-01-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/77278.diff 2 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+3-7) - (modified) clang/lib/Sema/SemaInit.cpp

[clang] [Sema] Clean up -Wc++11-narrowing-const-reference code after #76094. NFC (PR #77278)

2024-01-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/77278 None >From 70441f463f7dbb73b1185db46ef20a86289eb246 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 7 Jan 2024 23:24:02 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-07 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Ping, is this ok to be accepted and landed? > So personally I am fine with the current workaround with a `FIXME`. You mean next to the comment I already added referring to the C++ standard? Can you formulate what I should put there?

[libunwind] [flang] [lldb] [libcxx] [clang] [libc] [compiler-rt] [llvm] [clang-tools-extra] [lld] [libc++][test] try to directly create socket file in /tmp when filepath is too long (PR #77058)

2024-01-07 Thread Wu Yingcong via cfe-commits
https://github.com/yingcong-wu updated https://github.com/llvm/llvm-project/pull/77058 >From 202fb858344d102bd5199cd749bb15195dbce558 Mon Sep 17 00:00:00 2001 From: "Wu, Yingcong" Date: Fri, 5 Jan 2024 00:48:34 -0800 Subject: [PATCH 1/7] try to directly create file in /tmp when filepath is too

[llvm] [clang-tools-extra] [clang] [X86] Emit Warnings for frontend options to enable knl/knm specific ISAs. (PR #75580)

2024-01-07 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: ping for review. https://github.com/llvm/llvm-project/pull/75580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [flang] [llvm] [AMDGPU] Introduce Code Object V6 (PR #76954)

2024-01-07 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh updated https://github.com/llvm/llvm-project/pull/76954 >From dc666323870118020c0fd386d19d8306d4c853e1 Mon Sep 17 00:00:00 2001 From: pvanhout Date: Thu, 4 Jan 2024 14:12:00 +0100 Subject: [PATCH 1/2] [AMDGPU] Introduce Code Object V6 Introduce Code Object V6 in

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: The secret why ODRHash can handle this may

[clang] [Serialization] Load Specializations Lazily (1/2) (PR #76774)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) { void ODRHash::AddBoolean(bool Value) { Bools.push_back(Value); } + +void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); } ChuanqiXu9 wrote: I tried to add a test case to show the

[clang] 9b808a4 - [NFC] [Modules] Add a test case for selecting specializations with aliased template args

2024-01-07 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-08T14:46:11+08:00 New Revision: 9b808a4beb8e6c8255b412fdd6f5a3e20cbcf270 URL: https://github.com/llvm/llvm-project/commit/9b808a4beb8e6c8255b412fdd6f5a3e20cbcf270 DIFF: https://github.com/llvm/llvm-project/commit/9b808a4beb8e6c8255b412fdd6f5a3e20cbcf270.diff

[clang] [llvm] [RISCV] Deduplicate RISCVISAInfo::toFeatures/toFeatureVector. NFC (PR #76942)

2024-01-07 Thread Luke Lau via cfe-commits
@@ -466,35 +466,35 @@ bool RISCVISAInfo::compareExtension(const std::string , return LHS < RHS; } -void RISCVISAInfo::toFeatures( -std::vector , -llvm::function_ref StrAlloc, -bool AddAllExtensions) const { - for (auto const : Exts) { -StringRef ExtName =

[clang] [llvm] [RISCV] Add Zicfiss support to the shadow call stack implementation. (PR #68075)

2024-01-07 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/68075 >From faed2ea0b0cd7dc207e0886be8cb1647343793d4 Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 3 Oct 2023 16:08:06 +0800 Subject: [PATCH 1/6] [RISCV] Implement shadow stack on shadow stack mode with

[clang] [llvm] [RISCV] Add Zicfiss support to the shadow call stack implementation. (PR #68075)

2024-01-07 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/68075 >From be70878169742f7e9cbb276a05254019c586897b Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 3 Oct 2023 16:08:06 +0800 Subject: [PATCH 1/6] [RISCV] Implement shadow stack on shadow stack mode with

[clang] [llvm] [RISCV] Add Zicfiss support to the shadow call stack implementation. (PR #68075)

2024-01-07 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/68075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jimmy Z (jimmy-zx) Changes Exposes `CXRewriter` API to the python binding as in https://github.com/llvm/llvm-project/commit/69e5abb57b70570cf04671a93246e5e624023650. --- Full diff: https://github.com/llvm/llvm-project/pull/77269.diff 2

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-07 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-07 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx created https://github.com/llvm/llvm-project/pull/77269 Exposes `CXRewriter` API to the python binding as in https://github.com/llvm/llvm-project/commit/69e5abb57b70570cf04671a93246e5e624023650. >From a5379ca876d9531d48b37b9ad9c864db98c7dcd6 Mon Sep 17 00:00:00

[clang] [libclang/python] Add cursorkinds 272-306 to the python binding (PR #77268)

2024-01-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jimmy Z (jimmy-zx) Changes Added cursorkinds 272-306 to the python binding as in `index.h`. Note: seems like `CursorKind.OMP_SCOPE_DIRECTIVE` is not in any of the group. I have changed the test cases to reflect that but I am not sure if

[clang] [libclang/python] Add cursorkinds 272-306 to the python binding (PR #77268)

2024-01-07 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [libclang/python] Add cursorkinds 272-306 to the python binding (PR #77268)

2024-01-07 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx created https://github.com/llvm/llvm-project/pull/77268 Added cursorkinds 272-306 to the python binding as in `index.h`. Note: seems like `CursorKind.OMP_SCOPE_DIRECTIVE` is not in any of the group. I have changed the test cases to reflect that but I am not sure if

[clang-tools-extra] [clangd] Fix is spelled in source bug (PR #76668)

2024-01-07 Thread Nathan Ridge via cfe-commits
@@ -813,6 +813,18 @@ TEST(SourceCodeTests, isKeywords) { EXPECT_FALSE(isKeyword("override", LangOpts)); } +TEST(SourceCodeTests, isSpelledInSource) { + Annotations Test(""); + ParsedAST AST = TestTU::withCode(Test.code()).build(); + const SourceManager =

[clang-tools-extra] [clangd] Fix is spelled in source bug (PR #76668)

2024-01-07 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/76668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix is spelled in source bug (PR #76668)

2024-01-07 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks, looks good with the added comments. https://github.com/llvm/llvm-project/pull/76668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clangd] Fix sysroot flag handling in CommandMangler to prevent duplicates (PR #75694)

2024-01-07 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks, LGTM! https://github.com/llvm/llvm-project/pull/75694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Expose Rewriter to the libclang python binding. (PR #71341)

2024-01-07 Thread Jimmy Z via cfe-commits
https://github.com/jimmy-zx closed https://github.com/llvm/llvm-project/pull/71341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PGO]Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2024-01-07 Thread Elvis Wang via cfe-commits
@@ -2091,6 +2091,12 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions , ArgList , bool UsingProfile = UsingSampleProfile || !Opts.ProfileInstrumentUsePath.empty(); + if (Args.hasArg(options::OPT_fdiagnostics_show_profile_count) &&

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,50 @@ +// REQUIRES: !system-windows + +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t +// +// RUN: %clang_cc1 -std=c++20 %t/layer1.cppm -triple %itanium_abi_triple \ +// RUN: -emit-module-interface -o %t/foo-layer1.pcm +// RUN: %clang_cc1 -std=c++20

[clang] [llvm] [PGO]Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2024-01-07 Thread Elvis Wang via cfe-commits
https://github.com/ElvisWang123 deleted https://github.com/llvm/llvm-project/pull/75021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Handle lambda scopes inside Node::getDeclContext() (PR #76329)

2024-01-07 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Happy New Year 2024! You too! https://github.com/llvm/llvm-project/pull/76329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Handle lambda scopes inside Node::getDeclContext() (PR #76329)

2024-01-07 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks, the change looks good to me! I went through the existing callers of `Node::getDeclContext()`, and I was able to construct a test case where the patch actually changes behaviour (in a good way): ```c++ namespace NS { void

[clang] a90ed3e - Revert "[CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (#76849)"

2024-01-07 Thread Petr Hosek via cfe-commits
Author: Petr Hosek Date: 2024-01-08T03:29:30Z New Revision: a90ed3e8a4ea8c5238fd660bbac0371366afe3b5 URL: https://github.com/llvm/llvm-project/commit/a90ed3e8a4ea8c5238fd660bbac0371366afe3b5 DIFF: https://github.com/llvm/llvm-project/commit/a90ed3e8a4ea8c5238fd660bbac0371366afe3b5.diff LOG:

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/77066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/77066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath , Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-07 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath , Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[clang] [coroutines] Detect lifetime issues with coroutine lambda captures (PR #77066)

2024-01-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Maybe it'll be better to say this is related to `[[coro_lifetimebound]]`. My instinct reaction to this is that "no, this is not strictly correct". But I feel good after I know it is an extension of `[[coro_lifetimebound]]` only.

[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #76849)

2024-01-07 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek closed https://github.com/llvm/llvm-project/pull/76849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 78550be - [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (#76849)

2024-01-07 Thread via cfe-commits
Author: Petr Hosek Date: 2024-01-07T18:13:39-08:00 New Revision: 78550bef98347bccbf0e8e5fb66dc59718fc35ec URL: https://github.com/llvm/llvm-project/commit/78550bef98347bccbf0e8e5fb66dc59718fc35ec DIFF: https://github.com/llvm/llvm-project/commit/78550bef98347bccbf0e8e5fb66dc59718fc35ec.diff

[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #76849)

2024-01-07 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/76849 >From 0cb22bea1e724ca62306081da2ae97bbcc395a86 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 9 Jun 2023 07:17:13 + Subject: [PATCH] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain

[llvm] [clang] [PGO]Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2024-01-07 Thread Elvis Wang via cfe-commits
https://github.com/ElvisWang123 updated https://github.com/llvm/llvm-project/pull/75021 >From 22ff830f3bd113eebd6b8369c61700879ae02b4a Mon Sep 17 00:00:00 2001 From: Elvis Wang Date: Sun, 10 Dec 2023 18:34:37 -0800 Subject: [PATCH 1/2] [PGO] Add `-fdiagnostics-show-profile-count` option to

[clang] [Sema] Warning for _Float16 passed to format specifier '%f' (PR #74439)

2024-01-07 Thread Haocong Lu via cfe-commits
https://github.com/Luhaocong closed https://github.com/llvm/llvm-project/pull/74439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5034994 - [Sema] Warning for _Float16 passed to format specifier '%f' (#74439)

2024-01-07 Thread via cfe-commits
Author: Haocong Lu Date: 2024-01-08T09:50:36+08:00 New Revision: 5034994134bbec92c1f1116c56008ac504f7d763 URL: https://github.com/llvm/llvm-project/commit/5034994134bbec92c1f1116c56008ac504f7d763 DIFF: https://github.com/llvm/llvm-project/commit/5034994134bbec92c1f1116c56008ac504f7d763.diff

[llvm] [clang] [clang-tools-extra] [X86] Emit Warnings for frontend options to enable knl/knm specific ISAs. (PR #75580)

2024-01-07 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/75580 >From e16afbdc9f0c04bad0e8f80f90c0eb26c13d3326 Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Fri, 15 Dec 2023 16:50:23 +0800 Subject: [PATCH 1/7] [X86] Emit Warnings for frontend options to enable knl/knm.

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik updated https://github.com/llvm/llvm-project/pull/77255 >From d5dec27c1b0eb1999a86035ac458da377132ec7d Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Thu, 4 Jan 2024 11:10:05 -0800 Subject: [PATCH] Objective C: use C++ exceptions on MinGW+GNUstep The

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik updated https://github.com/llvm/llvm-project/pull/77255 >From 4212c79b5bb9168ae741b05b2c3388aa23e38693 Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Thu, 4 Jan 2024 11:10:05 -0800 Subject: [PATCH] Objective C: use C++ exceptions on MinGW+GNUstep The

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik updated https://github.com/llvm/llvm-project/pull/77255 >From d3e6d552b2502765eff8faccd20b7566a9362491 Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Thu, 4 Jan 2024 11:10:05 -0800 Subject: [PATCH] Objective C: use C++ exceptions on MinGW+GNUstep The

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
@@ -156,7 +154,11 @@ static const EHPersonality (const TargetInfo , case ObjCRuntime::WatchOS: return EHPersonality::NeXT_ObjC; case ObjCRuntime::GNUstep: -if (L.ObjCRuntime.getVersion() >= VersionTuple(1, 7)) +if (T.isOSCygMing()) qmfrederik

[clang] [clang] [MinGW] Don't look for a GCC in path if the install base has a proper mingw sysroot (PR #76949)

2024-01-07 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/76949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4ca1b5e - [clang] [MinGW] Don't look for a GCC in path if the install base has a proper mingw sysroot (#76949)

2024-01-07 Thread via cfe-commits
Author: Martin Storsjö Date: 2024-01-07T23:24:06+02:00 New Revision: 4ca1b5e094280ef1af40412e3cfcb62dc3cf15bc URL: https://github.com/llvm/llvm-project/commit/4ca1b5e094280ef1af40412e3cfcb62dc3cf15bc DIFF:

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
qmfrederik wrote: /cc @davidchisnall https://github.com/llvm/llvm-project/pull/77255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik edited https://github.com/llvm/llvm-project/pull/77255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik edited https://github.com/llvm/llvm-project/pull/77255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
@@ -156,7 +154,11 @@ static const EHPersonality (const TargetInfo , case ObjCRuntime::WatchOS: return EHPersonality::NeXT_ObjC; case ObjCRuntime::GNUstep: -if (L.ObjCRuntime.getVersion() >= VersionTuple(1, 7)) +if (T.isOSCygMing()) qmfrederik

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik updated https://github.com/llvm/llvm-project/pull/77255 >From d04a41177e9c39799b73168d397dd87fb948caa1 Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Thu, 4 Jan 2024 11:10:05 -0800 Subject: [PATCH] Objective C: use C++ exceptions on MinGW+GNUstep The

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik updated https://github.com/llvm/llvm-project/pull/77255 >From 62d7da8476b786f7950ea6bb8d6ac223fc6d0468 Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Thu, 4 Jan 2024 11:10:05 -0800 Subject: [PATCH] Objective C: use C++ exceptions on MinGW+GNUstep The

[clang] [llvm] [lld] [clang-tools-extra] [lldb] [mlir] [libc] [compiler-rt] [libcxx] Fix Multiple Build Errors on different platforms (PR #77216)

2024-01-07 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/77216 >From a1156a564c798192cb7608e28ce9b9ed846a8b1c Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sat, 6 Jan 2024 20:21:06 -0500 Subject: [PATCH 1/2] Fix Multiple Build Errors on different platforms Particularly

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 6e1ecd100d7663a91135b1cf6c4a603681b7385b 4cbc22e9b7c53547b97c666b24f191b25ae8866f --

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Frederik Carlier (qmfrederik) Changes The GNUstep Objective C runtime (libobjc2) is adding support for MinGW. This runtime uses C++ exceptions in that configuration. --- Full diff:

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

2024-01-07 Thread Frederik Carlier via cfe-commits
https://github.com/qmfrederik created https://github.com/llvm/llvm-project/pull/77255 The GNUstep Objective C runtime (libobjc2) is adding support for MinGW. This runtime uses C++ exceptions in that configuration. >From 4cbc22e9b7c53547b97c666b24f191b25ae8866f Mon Sep 17 00:00:00 2001 From:

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-07 Thread Micah Weston via cfe-commits
@@ -719,60 +730,83 @@ decodeBBAddrMapImpl(const ELFFile , Feature = Data.getU8(Cur); // Feature byte if (!Cur) break; - auto FeatEnableOrErr = PGOAnalysisMap::Features::decode(Feature); + auto FeatEnableOrErr =

[llvm] [clang] [lld] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-07 Thread Micah Weston via cfe-commits
@@ -0,0 +1,89 @@ +; COM: Emitting basic-block-address-map when machine function splitting is enabled. +; RUN: llc < %s -mtriple=x86_64 -function-sections -split-machine-functions -basic-block-address-map | FileCheck %s --check-prefixes=CHECK,BASIC + +; COM: Emitting

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-07 Thread Micah Weston via cfe-commits
https://github.com/red1bluelost commented: Overall looks good to me so far, just two minor things and the merge conflict. https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-07 Thread Micah Weston via cfe-commits
https://github.com/red1bluelost edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [lld] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-07 Thread Micah Weston via cfe-commits
@@ -719,60 +730,83 @@ decodeBBAddrMapImpl(const ELFFile , Feature = Data.getU8(Cur); // Feature byte if (!Cur) break; - auto FeatEnableOrErr = PGOAnalysisMap::Features::decode(Feature); + auto FeatEnableOrErr =

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-07 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-07 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify Endilll wrote: Yes, more `RUN` lines with different `-std=` options, and potentially more `expected` directives tailored for particular language mode. We have an example of this in C++

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-07 Thread Abhin P Jose via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-01-07 Thread Abhin P Jose via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify Abhinkop wrote: add runs for -std=cNN for all remaining 5 of them? and also add extra test cases where conflicts arise? https://github.com/llvm/llvm-project/pull/77178

[clang-tools-extra] [clang-tidy] Add support for lambdas in cppcoreguidelines-owning-memory (PR #77246)

2024-01-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Implement proper support for lambdas and sub-functions/classes. Moved from https://reviews.llvm.org/D157285 Fixes: #59389 --- Full diff: https://github.com/llvm/llvm-project/pull/77246.diff 3 Files

[clang-tools-extra] [clang-tidy] Add support for lambdas in cppcoreguidelines-owning-memory (PR #77246)

2024-01-07 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/77246 Implement proper support for lambdas and sub-functions/classes. Moved from https://reviews.llvm.org/D157285 Fixes: #59389 >From b2e230f90f97c0fb3385ab05d0217371b72b9a88 Mon Sep 17 00:00:00 2001 From: Piotr

[libunwind] [libunwind] Add length info for dynamic .eh_frame registration (PR #77185)

2024-01-07 Thread via cfe-commits
https://github.com/lhames requested changes to this pull request. As @arichardson noted this would break the ABI. The best solution is to fix the implementation of `__unw_add_dynamic_eh_frame_section` (and `__unw_remove_dynamic_eh_frame_section`) as described in

[clang] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

2024-01-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/77244 -fandroid-pad-segment is an Android-specific opt-in option that links in crt_pad_segment.o. crt_pad_segment.o contains a note section, which will be included in the linker-created PT_NOTE segment. This PT_NOTE

[clang] [llvm] [compiler-rt] [libcxx] [mlir] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/77210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [compiler-rt] [libcxx] [clang] [mlir] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77210 >From af33fcdf5a46c5bd34db89615a037e5eca421ef9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 5 Jan 2024 23:50:40 -0800 Subject: [PATCH] [asan] Enable StackSafetyAnalysis by default StackSafetyAnalysis

[libunwind] [libunwind] Add length info for dynamic .eh_frame registration (PR #77185)

2024-01-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: While I think this is a reasonable change, I don't think we can change this function signature without breaking the ABI. So it probably needs to be a new function instead. https://github.com/llvm/llvm-project/pull/77185

[compiler-rt] [libcxx] [llvm] [clang] [flang] [libc] [clang-tools-extra] [libc++] Implement LWG3940: std::expected::value() also needs E to be copy constructible (PR #71819)

2024-01-07 Thread Mark de Wever via cfe-commits
https://github.com/mordante edited https://github.com/llvm/llvm-project/pull/71819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [flang] [clang-tools-extra] [compiler-rt] [llvm] [libc] [clang] [libc++] Implement LWG3940: std::expected::value() also needs E to be copy constructible (PR #71819)

2024-01-07 Thread Mark de Wever via cfe-commits
https://github.com/mordante commented: > The CI finally passed now : ) Great. A few minor comment and then it LGTM. I'll leave the final approval to @huixie90 https://github.com/llvm/llvm-project/pull/71819 ___ cfe-commits mailing list

[compiler-rt] [flang] [llvm] [libcxx] [clang-tools-extra] [libc] [clang] [libc++] Implement LWG3940: std::expected::value() also needs E to be copy constructible (PR #71819)

2024-01-07 Thread Mark de Wever via cfe-commits
@@ -1150,12 +1150,15 @@ class expected<_Tp, _Err> { } _LIBCPP_HIDE_FROM_ABI constexpr void value() const& { +static_assert(is_copy_constructible_v<_Err>); if (!__has_val_) { std::__throw_bad_expected_access<_Err>(__union_.__unex_); } }

[flang] [llvm] [clang-tools-extra] [libc] [libcxx] [clang] [compiler-rt] [libc++] Implement LWG3940: std::expected::value() also needs E to be copy constructible (PR #71819)

2024-01-07 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,51 @@ +//===--===// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [lldb] [clang] [libcxx] [compiler-rt] [llvm] [mlir] Fix Multiple Build Errors on different platforms (PR #77216)

2024-01-07 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/77216 >From a1156a564c798192cb7608e28ce9b9ed846a8b1c Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sat, 6 Jan 2024 20:21:06 -0500 Subject: [PATCH 1/2] Fix Multiple Build Errors on different platforms Particularly

[clang] [libcxx] [llvm] Reapply "[libc++][streams] P1759R6: Native handles and file streams" (PR #77190)

2024-01-07 Thread Hristo Hristov via cfe-commits
https://github.com/Zingam closed https://github.com/llvm/llvm-project/pull/77190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [llvm] Reapply "[libc++][streams] P1759R6: Native handles and file streams" (PR #77190)

2024-01-07 Thread Hristo Hristov via cfe-commits
Zingam wrote: I'm relanding this and I'll keep eyes on it here: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-windows-x64 https://github.com/llvm/llvm-project/pull/77190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[lldb] [clang] [libcxx] [llvm] [clang-tools-extra] [compiler-rt] [mlir] Fix Multiple Build Errors on different platforms (PR #77216)

2024-01-07 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/77216 >From a1156a564c798192cb7608e28ce9b9ed846a8b1c Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sat, 6 Jan 2024 20:21:06 -0500 Subject: [PATCH 1/2] Fix Multiple Build Errors on different platforms Particularly

[clang] [flang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-07 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Thanks for the discussion! > It defaults to on if it finds the `libc` wrapper headers in the `clang` > resource directory, > `lib/clang/18/include/llvm_libc_wrappers/llvm-libc-decls`. I'm assuming that > Fortran doesn't have this? It shouldn't, which means that the

[clang-tools-extra] [clangd] don't lower severity of clang-tidy modernize-* checks to remarks (PR #75706)

2024-01-07 Thread Marzo Sette Torres Junior via cfe-commits
marzojr wrote: Coming from the issue I posted on `vscode-clangd`, I think it was a bad decision to make `modernize-*` checks basically disappear from the GUI. I feel less strongly with regards to `misc-unused-*` checks, but it is probably also true for those. While trying to remove clutter

[clang] 8f76f18 - [OpenMP][Obvious] Fix test failing on BE architectures

2024-01-07 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-01-07T08:38:50-06:00 New Revision: 8f76f1816ea63b7cc28e150ba319ffbfe6351f9e URL: https://github.com/llvm/llvm-project/commit/8f76f1816ea63b7cc28e150ba319ffbfe6351f9e DIFF: https://github.com/llvm/llvm-project/commit/8f76f1816ea63b7cc28e150ba319ffbfe6351f9e.diff

  1   2   >