[clang] Add flag to opt out of wasm-opt (PR #95208)

2024-07-11 Thread Quentin Michaud via cfe-commits
mh4ck-Thales wrote: @sbc100 I tried to limit the scope of this new option to Wasm using the corresponding group in `Options.td` (https://github.com/ThalesGroup/llvm-project/blob/8c7052d5da074eb1d754aeddc4257d33e4e299aa/clang/include/clang/Driver/Options.td#L222), but for some reason I was unab

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-11 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: in some build config `TargetInfo.cpp` is built without dependency to `LLVM-Core`. https://github.com/llvm/llvm-project/pull/98329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Quentin Michaud via cfe-commits
mh4ck-Thales wrote: The tests for the use of `wasm-opt` are hard to integrate into the LLVM project as `wasm-opt` is not part of the LLVM toolchain itself (which is the initial use case for the new `--no-wasm-opt` flag: as LLVM is not distributed with `wasm-opt` by default a same compilation c

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-11 Thread Nikita Popov via cfe-commits
nikic wrote: > in some build config `TargetInfo.cpp` is built without dependency to > `LLVM-Core`. Okay, that means that putting this code inside Basic/ is a layering violation. You need to move it into CodeGen/. Probably best to revert the whole change in the meantime. https://github.com/ll

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-11 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: > > in some build config `TargetInfo.cpp` is built without dependency to > > `LLVM-Core`. > > Okay, that means that putting this code inside Basic/ is a layering > violation. You need to move it into CodeGen/. Probably best to revert the > whole change in the meantime

[clang] [Clang] Don't crash if input file is not a module. (PR #98439)

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

[clang] [Clang] Don't crash if input file is not a module. (PR #98439)

2024-07-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/98439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't crash if input file is not a module. (PR #98439)

2024-07-11 Thread Chuanqi Xu via cfe-commits
@@ -226,6 +226,7 @@ def err_module_map_not_found : Error<"module map file '%0' not found">, def err_missing_module_name : Error< "no module name provided; specify one with -fmodule-name=">, DefaultFatal; +def err_file_is_not_module : Error<"file '%0' is not a module">, Def

[clang] [Clang] Don't crash if input file is not a module. (PR #98439)

2024-07-11 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/98439 >From 716e8b7b71422b5850d2f9c3710a28bcf18ffccb Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Thu, 11 Jul 2024 09:55:55 +0300 Subject: [PATCH 1/3] [Clang] Don't crash if input file is not a module. Curr

[clang] [Clang] Don't crash if input file is not a module. (PR #98439)

2024-07-11 Thread Dmitriy Chestnykh via cfe-commits
@@ -226,6 +226,7 @@ def err_module_map_not_found : Error<"module map file '%0' not found">, def err_missing_module_name : Error< "no module name provided; specify one with -fmodule-name=">, DefaultFatal; +def err_file_is_not_module : Error<"file '%0' is not a module">, Def

[clang] 00fd188 - [C++20][Modules] static data members of template classes should be allowed in header units (#98309)

2024-07-11 Thread via cfe-commits
Author: Dmitry Polukhin Date: 2024-07-11T08:29:09+01:00 New Revision: 00fd188f3744ce7511ebc41260f3fcf34a80ae6b URL: https://github.com/llvm/llvm-project/commit/00fd188f3744ce7511ebc41260f3fcf34a80ae6b DIFF: https://github.com/llvm/llvm-project/commit/00fd188f3744ce7511ebc41260f3fcf34a80ae6b.dif

[clang] [C++20][Modules] static data members of template classes should be allowed in header units (PR #98309)

2024-07-11 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin closed https://github.com/llvm/llvm-project/pull/98309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't crash if input file is not a module. (PR #98439)

2024-07-11 Thread Dmitriy Chestnykh via cfe-commits
@@ -226,6 +226,7 @@ def err_module_map_not_found : Error<"module map file '%0' not found">, def err_missing_module_name : Error< "no module name provided; specify one with -fmodule-name=">, DefaultFatal; +def err_file_is_not_module : Error<"file '%0' is not a module">, Def

[clang] [Clang] Don't crash if input file is not a module. (PR #98439)

2024-07-11 Thread Chuanqi Xu via cfe-commits
@@ -226,6 +226,7 @@ def err_module_map_not_found : Error<"module map file '%0' not found">, def err_missing_module_name : Error< "no module name provided; specify one with -fmodule-name=">, DefaultFatal; +def err_file_is_not_module : Error<"file '%0' is not a module">, Def

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-07-11 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Ping: would be glad to see feedback on the changes from those who are interested. https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-07-11 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Ping: would be glad to see feedback on the changes from those who are interested. https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Constantin Kronbichler via cfe-commits
ccrownhill wrote: Ah I see. Thank you for the suggestions! I also tried the same for `_Alignof` but was put off by the errors generated by the `-pedantic-errors` flag. But I guess I can just check that I don't get the `undefined-internal` error. For the other two I had something similar but tha

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-11 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70307 From 0dd1a3e2b45a8c918217e62fe844b91dbb51df8e Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Thu, 26 Oct 2023 10:39:52 +0200 Subject: [PATCH] [clang] Emit bad shift warnings ---

[clang] [LoongArch][clang] Modify `loongarch-msimd.c` to avoid `grep -o`. NFC (PR #98442)

2024-07-11 Thread Zhaoxin Yang via cfe-commits
https://github.com/ylzsx created https://github.com/llvm/llvm-project/pull/98442 https://lab.llvm.org/buildbot/#/builders/64/builds/250/steps/6/logs/FAIL__Clang__loongarch-msimd_c >From 238cbc3a0e5f7a407e4512fb5ac0d33fb7d65150 Mon Sep 17 00:00:00 2001 From: yangzhaoxin Date: Thu, 11 Jul 20

[clang] [LoongArch][clang] Modify `loongarch-msimd.c` to avoid `grep -o`. NFC (PR #98442)

2024-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Zhaoxin Yang (ylzsx) Changes https://lab.llvm.org/buildbot/#/builders/64/builds/250/steps/6/logs/FAIL__Clang__loongarch-msimd_c --- Full diff: https://github.com/llvm/llvm-project/pull/98442.diff 1

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Pavel Savara via cfe-commits
pavelsavara wrote: could shell script named `wasm-opt` on PATH and doing nothing do the trick ? Or even better it could write it's arguments into some file, so that they could be asserted in the test. 2c https://github.com/llvm/llvm-project/pull/98373 __

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Constantin Kronbichler via cfe-commits
https://github.com/ccrownhill updated https://github.com/llvm/llvm-project/pull/98016 >From 5dd2bb12dee26ba93d927ad1cd99fa610f9ace97 Mon Sep 17 00:00:00 2001 From: ccrownhill Date: Mon, 8 Jul 2024 11:42:37 +0100 Subject: [PATCH 1/4] fix bug that undefined internal is a warning only for -pedant

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Constantin Kronbichler via cfe-commits
ccrownhill wrote: Since one error message will occlude others I had to split the files as I did in the latest commit. I have added one for the `_Alignof` case checking for the errors I was getting in godbolt while also checking that no `undefined-internal` error occurred. Lastly, I added the on

[clang] [Clang] [WIP] Added builtin_alloca right Address Space for OpenCL (PR #95750)

2024-07-11 Thread Vikash Gupta via cfe-commits
https://github.com/vg0204 updated https://github.com/llvm/llvm-project/pull/95750 >From cbe656fa6db50319e74c0fab166538518506974e Mon Sep 17 00:00:00 2001 From: vg0204 Date: Mon, 17 Jun 2024 11:20:02 +0530 Subject: [PATCH 1/6] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below

[clang] [Clang] [WIP] Added builtin_alloca right Address Space for OpenCL (PR #95750)

2024-07-11 Thread Vikash Gupta via cfe-commits
@@ -1981,6 +1981,26 @@ static bool OpenCLBuiltinToAddr(Sema &S, unsigned BuiltinID, CallExpr *Call) { return false; } +// In OpenCL, __builtin_alloca_* should return a pointer to address space +// that corresponds to the stack address space i.e private address space. +stati

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-11 Thread Tomas Matheson via cfe-commits
@@ -161,14 +161,10 @@ struct CpuInfo { StringRef Name; // Name, as written for -mcpu. const ArchInfo &Arch; AArch64::ExtensionBitset - DefaultExtensions; // Default extensions for this CPU. These will be - // ORd with the architecture defaults

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-11 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/98267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-11 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. LGTM. I haven't checked all the CPU feature changes, but the tests give a lot of confidence. I also haven't checked all the TRMs but the changes there make sense given the MEC/RME architecture changes. https://github.com/llvm/llvm-pr

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-11 Thread Tomas Matheson via cfe-commits
@@ -1626,7 +1628,7 @@ INSTANTIATE_TEST_SUITE_P( AArch64::AEK_FP16FML, AArch64::AEK_SHA3,AArch64::AEK_BF16, AArch64::AEK_I8MM,AArch64::AEK_JSCVT, AArch64::AEK_FCMA, AArch64::AEK_PAUTH, AArch64::AEK_PERFMON, AArch64::AEK_HCX}), -

[clang] [lldb] [llvm] [llvm][TargetParser] Return StringMap from getHostCPUFeatures (PR #97824)

2024-07-11 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bf4167f - [Clang] Don't crash if input file is not a module. (#98439)

2024-07-11 Thread via cfe-commits
Author: Dmitriy Chestnykh Date: 2024-07-11T16:48:58+08:00 New Revision: bf4167fd1d06ff68da2cbea210a4ccfa045694d3 URL: https://github.com/llvm/llvm-project/commit/bf4167fd1d06ff68da2cbea210a4ccfa045694d3 DIFF: https://github.com/llvm/llvm-project/commit/bf4167fd1d06ff68da2cbea210a4ccfa045694d3.d

[clang] [Clang] Don't crash if input file is not a module. (PR #98439)

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

[clang] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (PR #94885)

2024-07-11 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall updated https://github.com/llvm/llvm-project/pull/94885 >From e818620af0a9732d7c0e96b85d7ec1f5a8afc297 Mon Sep 17 00:00:00 2001 From: Rose Date: Sat, 8 Jun 2024 22:30:53 -0400 Subject: [PATCH] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflo

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Quentin Michaud via cfe-commits
mh4ck-Thales wrote: A shell script would work. I don't know how easy it is to create a shell script inside the test suite and use it though, and it would be nice if this fake wasm-opt script could be unique across several tests, to ensure the consistency of those. https://github.com/llvm/llvm

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-11 Thread Gábor Horváth via cfe-commits
@@ -356,6 +363,12 @@ class LLVM_LIBRARY_VISIBILITY Darwin : public MachO { void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; + // Return the full path of the compiler-rt library on a Darwin MachO

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-11 Thread Gábor Horváth via cfe-commits
@@ -1303,18 +1288,55 @@ void MachO::AddLinkRuntimeLib(const ArgList &Args, ArgStringList &CmdArgs, // rpaths. This is currently true from this place, but we need to be // careful if this function is ever called before user's rpaths are emitted. if (Opts & RLO_AddRPath) {

[clang] [Clang] Don't crash if input file is not a module. (PR #98439)

2024-07-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/1610 Here is the relevant piece of the build log for

[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

2024-07-11 Thread via cfe-commits
@@ -3644,9 +3644,11 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc, bool AllowZero) { ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) { // Fast path for a single digit (which is quite common). A single digit // cannot have a trigraph,

[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

2024-07-11 Thread via cfe-commits
@@ -1018,6 +1018,7 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind, // primary-expression case tok::numeric_constant: cor3ntin wrote: These cases ```cpp [[clang::availability( #embed "smth.txt" )]] void f(); struct S { virtual

[clang] [compiler-rt] [safestack] Various Solaris fixes (PR #98001)

2024-07-11 Thread Rainer Orth via cfe-commits
rorth wrote: > > The problem is that -u __safestack_init was passed to the linker after the > > corresponding version of libclang_rt.safestack-*.a. Since the Solaris > > linker (like Unix linkers for decades) respect > > I agree this part should be extracted since it affects other systems. Oth

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: *Ping\* @Endilll how should we proceed with this? https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/98013 >From c9297f8abe8d480fdcd3ba6d6598268fef74ddb4 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 8 Jul 2024 13:19:13 +0200 Subject: [PATCH 1/2] [clang] CTAD: use index and depth to retrieve template parameters

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/98013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Haojian Wu via cfe-commits
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform { // Find all template parameters that appear in the given DeducedArgs. // Return the indices of the template parameters in the TemplateParams. SmallVector TemplateParamsReferencedInTemplateArgumentList(

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Thanks for the review. https://github.com/llvm/llvm-project/pull/98013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Haojian Wu via cfe-commits
@@ -99,3 +99,28 @@ BFoo b2(1.0, 2.0); // CHECK-NEXT: | | |-ParmVarDecl {{.*}} 'type-parameter-0-0' // CHECK-NEXT: | | `-ParmVarDecl {{.*}} 'type-parameter-0-0' // CHECK-NEXT: | `-CXXDeductionGuideDecl {{.*}} implicit used 'auto (double, double) -> Foo' implicit_instantiation +

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Haojian Wu via cfe-commits
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform { // Find all template parameters that appear in the given DeducedArgs. // Return the indices of the template parameters in the TemplateParams. SmallVector TemplateParamsReferencedInTemplateArgumentList(

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Haojian Wu via cfe-commits
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform { // Find all template parameters that appear in the given DeducedArgs. // Return the indices of the template parameters in the TemplateParams. SmallVector TemplateParamsReferencedInTemplateArgumentList(

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/98451 To reduce build times move them to TargetCodeGenInfo. Refactor of #98329 >From 2ffaf35f09be03e7374bde3d97ee798b01e7e3d1 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Thu, 11 Jul 2024 10:29:24 +0200

[clang] [NFC][Clang] Move set functions out BranchProtectionInfo. (PR #98451)

2024-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Daniel Kiss (DanielKristofKiss) Changes To reduce build times move them to TargetCodeGenInfo. Refactor of #98329 --- Full diff: https://github.com/llvm/llvm-project/pull/98451.diff 5 Files Affected: - (modified) clang/include/

[clang] eb61956 - [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (#94885)

2024-07-11 Thread via cfe-commits
Author: AtariDreams Date: 2024-07-11T10:21:14+01:00 New Revision: eb61956d1a039d9cb03e0d041f33ab2ecc80519e URL: https://github.com/llvm/llvm-project/commit/eb61956d1a039d9cb03e0d041f33ab2ecc80519e DIFF: https://github.com/llvm/llvm-project/commit/eb61956d1a039d9cb03e0d041f33ab2ecc80519e.diff L

[clang] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (PR #94885)

2024-07-11 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall closed https://github.com/llvm/llvm-project/pull/94885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 55c0048 - [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (#97827)

2024-07-11 Thread via cfe-commits
Author: Simon Tatham Date: 2024-07-11T10:28:05+01:00 New Revision: 55c00485eb05dfa75d4a20efff2131edd111066d URL: https://github.com/llvm/llvm-project/commit/55c00485eb05dfa75d4a20efff2131edd111066d DIFF: https://github.com/llvm/llvm-project/commit/55c00485eb05dfa75d4a20efff2131edd111066d.diff

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-11 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm closed https://github.com/llvm/llvm-project/pull/97827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (PR #94885)

2024-07-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/1385 Here is the relevant piece of the bu

[clang] [lldb] [llvm] [llvm][TargetParser] Return StringMap from getHostCPUFeatures (PR #97824)

2024-07-11 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/97824 >From 7ebe4e487b763ff26fbab6d75aa7c8694d63e8b1 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 5 Jul 2024 08:42:22 + Subject: [PATCH 1/9] [llvm][TargetParser] Return optional from getHostCPUFe

[clang] [lldb] [llvm] [llvm][TargetParser] Return StringMap from getHostCPUFeatures (PR #97824)

2024-07-11 Thread David Spickett via cfe-commits
@@ -20,16 +20,15 @@ using namespace llvm; int main(int argc, char **argv) { #if defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64__) || defined(_M_X64) - StringMap features; - - if (!sys::getHostCPUFeatures(features)) + const StringMap features = sys::getHostCP

[clang] 18e70a4 - [llvm][TargetParser] Return StringMap from getHostCPUFeatures (#97824)

2024-07-11 Thread via cfe-commits
Author: David Spickett Date: 2024-07-11T10:32:43+01:00 New Revision: 18e70a4d5042299054dae7d3995f6ccd8f4112b3 URL: https://github.com/llvm/llvm-project/commit/18e70a4d5042299054dae7d3995f6ccd8f4112b3 DIFF: https://github.com/llvm/llvm-project/commit/18e70a4d5042299054dae7d3995f6ccd8f4112b3.diff

[clang] [lldb] [llvm] [llvm][TargetParser] Return StringMap from getHostCPUFeatures (PR #97824)

2024-07-11 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (PR #94885)

2024-07-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-dylib` running on `linaro-flang-aarch64-dylib` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/971 Here is the relevant p

[clang] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (PR #94885)

2024-07-11 Thread David Chisnall via cfe-commits
davidchisnall wrote: Those CI failures look unrelated. https://github.com/llvm/llvm-project/pull/94885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/98013 >From c9297f8abe8d480fdcd3ba6d6598268fef74ddb4 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 8 Jul 2024 13:19:13 +0200 Subject: [PATCH 1/3] [clang] CTAD: use index and depth to retrieve template parameters

[clang] [LoongArch][clang] Modify `loongarch-msimd.c` to avoid `grep -o`. NFC (PR #98442)

2024-07-11 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. https://github.com/llvm/llvm-project/pull/98442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 74b933c - [LoongArch][clang] Modify `loongarch-msimd.c` to avoid `grep -o`. NFC (#98442)

2024-07-11 Thread via cfe-commits
Author: Zhaoxin Yang Date: 2024-07-11T17:43:38+08:00 New Revision: 74b933c28e777fdc04e50f5f96e4f7a4ad1e79a6 URL: https://github.com/llvm/llvm-project/commit/74b933c28e777fdc04e50f5f96e4f7a4ad1e79a6 DIFF: https://github.com/llvm/llvm-project/commit/74b933c28e777fdc04e50f5f96e4f7a4ad1e79a6.diff

[clang] [LoongArch][clang] Modify `loongarch-msimd.c` to avoid `grep -o`. NFC (PR #98442)

2024-07-11 Thread Lu Weining via cfe-commits
https://github.com/SixWeining closed https://github.com/llvm/llvm-project/pull/98442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Matheus Izvekov via cfe-commits
@@ -99,3 +99,28 @@ BFoo b2(1.0, 2.0); // CHECK-NEXT: | | |-ParmVarDecl {{.*}} 'type-parameter-0-0' // CHECK-NEXT: | | `-ParmVarDecl {{.*}} 'type-parameter-0-0' // CHECK-NEXT: | `-CXXDeductionGuideDecl {{.*}} implicit used 'auto (double, double) -> Foo' implicit_instantiation +

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Matheus Izvekov via cfe-commits
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform { // Find all template parameters that appear in the given DeducedArgs. // Return the indices of the template parameters in the TemplateParams. SmallVector TemplateParamsReferencedInTemplateArgumentList(

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-07-11 Thread Michael Buch via cfe-commits
Michael137 wrote: Some of the libc++ tests seem to be crashing on the x86_64 bot (can repro this on my x86_64 at home, not aarch64 though). Looks like they're segfaulting trying to access the member of an empty class. E.g., in ``` Process 1370440 stopped * thread #1, name = 't.tmp.exe', stop re

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-11 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, sans: * missing newline at end of test file * A similar test for template template parameter. https://github.com/llvm/llvm-project/pull/98013 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Sorry for not getting back to you earlier. https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
@@ -611,51 +612,25 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration: +class BaseEnumeration(Enum): """ Common base class for named enumerations held in sync with Index.h values. - -Subclasses must define their own _kinds and _name_map me

[clang] [LoongArch][clang] Add support for option `-msimd=` and macro `__loongarch_simd_width`. (PR #97984)

2024-07-11 Thread Zhaoxin Yang via cfe-commits
ylzsx wrote: > Hi, this test is failing on the AIX bot > https://lab.llvm.org/buildbot/#/builders/64/builds/250/steps/6/logs/FAIL__Clang__loongarch-msimd_c > > The reason is that -o is not a supported option with grep on AIX. Would you > be able to adapt the test to avoid piping and use input

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/95608 >From 35bfcfbc69ee812c59350440b7b15c5e23ad1307 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Fri, 14 Jun 2024 22:12:09 +0100 Subject: [PATCH 1/4] [libclang/python] Refactor enum usage Use Python's bui

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-07-11 Thread Jannick Kremer via cfe-commits
@@ -611,51 +612,25 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration: +class BaseEnumeration(Enum): """ Common base class for named enumerations held in sync with Index.h values. - -Subclasses must define their own _kinds and _name_map me

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-11 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @ahatanak It would be nice if you explicitly mention the flag name `-fptrauth-function-pointer-type-discrimination` in commit message - I think it might be useful when grepping output of git log. https://github.com/llvm/llvm-project/pull/96992 __

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-11 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun updated https://github.com/llvm/llvm-project/pull/98325 From 9f3c99e278193af99d6a8928612f517be95aa6a6 Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Mon, 8 Jul 2024 11:18:02 +0100 Subject: [PATCH] Fix --print-libgcc-file-name on Darwin platforms On Darwin, --pr

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-11 Thread Gábor Horváth via cfe-commits
@@ -2230,6 +2239,7 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { } if (C.getArgs().hasArg(options::OPT_print_runtime_dir)) { +initDarwinTarget(); Xazax-hun wrote: I removed this change for now because I think we should probably fix this

[clang] [llvm] [AArch64] Implement GCS ACLE intrinsics (PR #96903)

2024-07-11 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm updated https://github.com/llvm/llvm-project/pull/96903 >From 123ebe17131fcfc7662be6759327b311e90fb16d Mon Sep 17 00:00:00 2001 From: John Brawn Date: Tue, 25 Jun 2024 15:35:18 +0100 Subject: [PATCH 1/3] [AArch64] Implement GCS ACLE intrinsics This adds intrin

[clang] [llvm] [AArch64] Implement GCS ACLE intrinsics (PR #96903)

2024-07-11 Thread John Brawn via cfe-commits
john-brawn-arm wrote: I've added a new change to work around a problem in intrinsic handling that's detailed in https://discourse.llvm.org/t/intrinsic-with-sideeffect-is-optimized-out/66053 (I previously had this workaround in, but removed it because it looked like it was no longer needed, bu

[clang-tools-extra] [clang-tidy] Ignore requires expr in bugprone-assignment-in-if-condition (PR #98079)

2024-07-11 Thread Nathan James via cfe-commits
https://github.com/njames93 approved this pull request. https://github.com/llvm/llvm-project/pull/98079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement GCS ACLE intrinsics (PR #96903)

2024-07-11 Thread John Brawn via cfe-commits
john-brawn-arm wrote: > Thanks, LGTM. > > As a follow-up, can you check that the instructions generated from this > builtin do inhibit the machine outliner? Maybe all GCS-modifying functions > have to inhibit the machine outliner, I'm not 100% sure. The GCS instructions don't inhibit the mach

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-07-11 Thread via cfe-commits
PeterChou1 wrote: Ok nevermind, disregard the above comment I was wrong about the mechanism of the bug. the source of this bug comes from the way clang-doc handles C code, particularly anonymous typedef in C. When clang-doc encounters an anonymous typedef in C it incorrectly serializes its a n

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-07-11 Thread via cfe-commits
zmodem wrote: We're seeing some -Wdangling-assignment warnings after this change, and they all seem to be false positives so far: https://crbug.com/350808950 It's not a huge deal if there are just a few, but figured it's worth mentioning. https://github.com/llvm/llvm-project/pull/96475 ___

[clang] [llvm] [AARCH64][SVE] Add intrinsics for SVE LUTI instructions (PR #97058)

2024-07-11 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/97058 >From 4a6c4033f7deddcd4094ebde81402960de85bd80 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Fri, 28 Jun 2024 10:13:16 + Subject: [PATCH 1/3] [AARCH64][SVE] Add intrinsics for SVE LUTI instructions ---

[clang] [llvm] [AARCH64][SVE] Add intrinsics for SVE LUTI instructions (PR #97058)

2024-07-11 Thread via cfe-commits
@@ -10349,6 +10349,16 @@ multiclass sve2_luti2_vector_index { let Inst{23-22} = idx{2-1}; let Inst{12}= idx{0}; } + Lukacma wrote: Done https://github.com/llvm/llvm-project/pull/97058 ___ cfe-commits m

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: @budimirarandjelovicsyrmia -- do you need someone to land these changes on your behalf? https://github.com/llvm/llvm-project/pull/70307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-07-11 Thread Haojian Wu via cfe-commits
hokein wrote: > We're seeing some -Wdangling-assignment warnings after this change, and they > all seem to be false positives so far: https://crbug.com/350808950 It's not a > huge deal if there are just a few, but figured it's worth mentioning. Thanks for the report. That's interesting. Techni

[clang] [llvm] [AArch64] Implement GCS ACLE intrinsics (PR #96903)

2024-07-11 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/96903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > For the other two I had something similar but that still misses this point: > — part of the expression in a generic association that is not the result > expression of its generic > selection > But that might also be because I don't understand this point well enough. I > do

[clang] [clang][Driver] Fix safestack -u ordering (PR #98468)

2024-07-11 Thread Rainer Orth via cfe-commits
https://github.com/rorth created https://github.com/llvm/llvm-project/pull/98468 When re-enabling safestack testing on Solaris after the unexplained b0260c5b1052f8e3ff1ec77dc42a11f42da762cc, all tests `FAIL`ed to link: ``` Undefined first referenced symbol

[clang] [clang][Driver] Fix safestack -u ordering (PR #98468)

2024-07-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rainer Orth (rorth) Changes When re-enabling safestack testing on Solaris after the unexplained b0260c5b1052f8e3ff1ec77dc42a11f42da762cc, all tests `FAIL`ed to link: ``` Undefined first referenced symbol

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Constantin Kronbichler via cfe-commits
ccrownhill wrote: Oh that makes sense so ``` static void f(); void *k = _Generic(&f, void (*)(void) : 0, default : f); ``` should be ok since it is not in the result expression? https://github.com/llvm/llvm-project/pull/98016 ___ cfe-commits mailing

[clang] [clang][Driver] Fix safestack -u ordering (PR #98468)

2024-07-11 Thread Rainer Orth via cfe-commits
rorth wrote: This patch was already approved in [ [safestack] Various Solaris fixes #98001 ](https://github.com/llvm/llvm-project/pull/98001), therefore I'll commit it shortly. https://github.com/llvm/llvm-project/pull/98468 ___ cfe-commits mailing l

[clang] [clang][X86] Add __cpuidex function to cpuid.h (PR #97785)

2024-07-11 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. LGTM, let’s reland this https://github.com/llvm/llvm-project/pull/97785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0248b59 - [clang][Driver] Fix safestack -u ordering (#98468)

2024-07-11 Thread via cfe-commits
Author: Rainer Orth Date: 2024-07-11T14:04:45+02:00 New Revision: 0248b597b1442ba803b61ba1d099ec8ef3872b2d URL: https://github.com/llvm/llvm-project/commit/0248b597b1442ba803b61ba1d099ec8ef3872b2d DIFF: https://github.com/llvm/llvm-project/commit/0248b597b1442ba803b61ba1d099ec8ef3872b2d.diff L

[clang] [clang][Driver] Fix safestack -u ordering (PR #98468)

2024-07-11 Thread Rainer Orth via cfe-commits
https://github.com/rorth closed https://github.com/llvm/llvm-project/pull/98468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-07-11 Thread Budimir Aranđelović via cfe-commits
budimirarandjelovicsyrmia wrote: > @budimirarandjelovicsyrmia -- do you need someone to land these changes on > your behalf? I don't understand question. I think that I answered correctly to previous comments. https://github.com/llvm/llvm-project/pull/70307 ___

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Constantin Kronbichler via cfe-commits
ccrownhill wrote: Sorry, my mistake. This doesn't work for `default` but the problem is that in this example ``` static void *f(void); void *k = _Generic(&f, void *(*)(void) : 0, int (*)(void) : f()); ``` the `undefined-internal` error is still raised even though it is not in the result expre

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think the test cases should all be combined into a single file -- we don't stop issuing diagnostics after the first one, so it should be fine to put them all together into one file. https://github.com/llvm/llvm-project/pull/98016 ___

  1   2   3   4   >