[clang] [Clang] Only compare template params of potential overload after checking their decl context (PR #78139)

2024-01-16 Thread via cfe-commits
@@ -0,0 +1,28 @@ +// From https://github.com/llvm/llvm-project/issues/77953 +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm +// RUN: %clang_cc1 -std=c++20 -fmodule-file=a=%t/a.pcm %t/b.

[clang] [llvm] AMDGPU/GFX12: Add new dot4 fp8/bf8 instructions (PR #77892)

2024-01-16 Thread Mariusz Sikora via cfe-commits
https://github.com/mariusz-sikora-at-amd updated https://github.com/llvm/llvm-project/pull/77892 >From 628a3d2b42cdcbd903e0830ab7d631ea7dc422b9 Mon Sep 17 00:00:00 2001 From: Petar Avramovic Date: Wed, 10 Jan 2024 12:17:58 +0100 Subject: [PATCH 1/2] AMDGPU/GFX12: Add new dot4 fp8/bf8 instructio

[clang] [llvm] AMDGPU/GFX12: Add new dot4 fp8/bf8 instructions (PR #77892)

2024-01-16 Thread Mariusz Sikora via cfe-commits
@@ -2696,6 +2696,25 @@ def int_amdgcn_udot8 : ImmArg>, ImmArg>, ImmArg>] >; +// f32 %r = llvm.amdgcn.dot4.f32.type_a.type_b (v4type_a (as i32) %a, v4type_b (as i32) %b, f32 %c) +// %r = %a[0] * %b[0] + %a[1] * %b[1] + %a[2] * %b[2] + %a[3] * %b[3] + %c +class AMDGPU

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

2024-01-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/72892 >From 7551ede34ec97db3a3ef2284ca93c8279ae66524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Da

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-01-16 Thread via cfe-commits
mydeveloperday wrote: > > I think this is kind of too specific. > > +1. > > > Also I agree with [#78166 > > (comment)](https://github.com/llvm/llvm-project/issues/78166#issuecomment-1892311219) > > that `WhitespaceSensitiveMacros` should be used. > > I don't think we should require that the

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-01-16 Thread Owen Pan via cfe-commits
owenca wrote: This should work: ``` --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -4402,9 +4402,17 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, if (Left.Finalized) return Right.hasWhitespaceBefore(); - // Never ever me

[clang] [clang][analyzer] Improve modeling of 'fseeko' and 'ftello' in StdLibraryFunctionsChecker (PR #77902)

2024-01-16 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. https://github.com/llvm/llvm-project/pull/77902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [AMDGPU][GFX12] Add Atomic cond_sub_u32 (PR #76224)

2024-01-16 Thread Matt Arsenault via cfe-commits
@@ -2502,10 +2500,9 @@ def int_amdgcn_flat_atomic_fmax_num : AMDGPUAtomicRtn; def int_amdgcn_global_atomic_fmin_num : AMDGPUAtomicRtn; def int_amdgcn_global_atomic_fmax_num : AMDGPUAtomicRtn; -def int_amdgcn_flat_atomic_cond_sub_u32 : AMDGPUAtomicRtn; -def int_amdgcn_global

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

2024-01-16 Thread Pierre van Houtryve via cfe-commits
Pierre-vh wrote: ping https://github.com/llvm/llvm-project/pull/76954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

2024-01-16 Thread Timm Baeder via cfe-commits
@@ -183,11 +178,7 @@ int32_t ByteCodeEmitter::getOffset(LabelTy Label) { return 0ull; } -bool ByteCodeEmitter::bail(const SourceLocation &Loc) { - if (!BailLocation) -BailLocation = Loc; - return false; -} +bool ByteCodeEmitter::bail(const SourceLocation &Loc) { return

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-01-16 Thread via cfe-commits
https://github.com/mydeveloperday updated https://github.com/llvm/llvm-project/pull/78176 >From 9d29ad06ff71b855a43f57b339990e41f206ac8d Mon Sep 17 00:00:00 2001 From: mydeveloperday Date: Mon, 15 Jan 2024 15:42:59 + Subject: [PATCH 1/2] [clang-format] adds a space after not inside macros

[clang] Improve modeling of two functions in StdLibraryFunctionsChecker (PR #78079)

2024-01-16 Thread Balázs Kéri via cfe-commits
@@ -248,3 +248,25 @@ void check_fflush_all(void) { if (errno) {}// no-warning } } + +void check_opendir(const char *Path) { + DIR *Dir = opendir(Path); + if (Dir == NULL) { +clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}} +if (er

[clang-tools-extra] [NFC][clang-tidy]improve performance for misc-unused-using-decls check (PR #78231)

2024-01-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. Thanks, the code looks good. Do you have any performance data after this change? https://github.com/llvm/llvm-project/pull/78231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang] Fix CTAD not work for function-type and array-type arguments. (PR #78159)

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

[clang] [clang] Fix CTAD not work for function-type and array-type arguments. (PR #78159)

2024-01-16 Thread Haojian Wu via cfe-commits
hokein wrote: > Can you please provide a more detailed summary, since these are usually what > goes in the git log. It should describe the cause and the approach of the > fix. It is also helpful for reviewers as well. Done, added details in the description. https://github.com/llvm/llvm-projec

[clang] f725bb9 - [clang] Fix CTAD not work for function-type and array-type arguments. (#78159)

2024-01-16 Thread via cfe-commits
Author: Haojian Wu Date: 2024-01-16T09:54:36+01:00 New Revision: f725bb960d45ada3cc4667dd7aa22792d389c7e7 URL: https://github.com/llvm/llvm-project/commit/f725bb960d45ada3cc4667dd7aa22792d389c7e7 DIFF: https://github.com/llvm/llvm-project/commit/f725bb960d45ada3cc4667dd7aa22792d389c7e7.diff LO

[clang] [clang] Fix CTAD not work for function-type and array-type arguments. (PR #78159)

2024-01-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/78159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 27d963a - [clang][analyzer] Improve modeling of 'fseeko' and 'ftello' in StdLibraryFunctionsChecker (#77902)

2024-01-16 Thread via cfe-commits
Author: Ben Shi Date: 2024-01-16T16:58:07+08:00 New Revision: 27d963a7089b050d402dbc1ae210d505f7a6 URL: https://github.com/llvm/llvm-project/commit/27d963a7089b050d402dbc1ae210d505f7a6 DIFF: https://github.com/llvm/llvm-project/commit/27d963a7089b050d402dbc1ae210d505f7a6.diff LOG:

[clang] [clang][analyzer] Improve modeling of 'fseeko' and 'ftello' in StdLibraryFunctionsChecker (PR #77902)

2024-01-16 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/77902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve modeling of two functions in StdLibraryFunctionsChecker (PR #78079)

2024-01-16 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/78079 >From fd350eea466db33324f07e59469775e81479b33d Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Sun, 14 Jan 2024 12:44:45 +0800 Subject: [PATCH 1/2] [clang][analyzer] Improve modeling of two functions in StdLibrar

[clang-tools-extra] [clang] [clang-tidy] Handle C++ structured bindings in `performance-for-range-copy` (PR #77105)

2024-01-16 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle closed https://github.com/llvm/llvm-project/pull/77105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 8fd32b9 - [clang-tidy] Handle C++ structured bindings in `performance-for-range-copy` (#77105)

2024-01-16 Thread via cfe-commits
Author: Clement Courbet Date: 2024-01-16T10:03:19+01:00 New Revision: 8fd32b96caf37113dd425cd9d0ff8c839c6a048a URL: https://github.com/llvm/llvm-project/commit/8fd32b96caf37113dd425cd9d0ff8c839c6a048a DIFF: https://github.com/llvm/llvm-project/commit/8fd32b96caf37113dd425cd9d0ff8c839c6a048a.dif

[clang] Improve modeling of two functions in StdLibraryFunctionsChecker (PR #78079)

2024-01-16 Thread Ben Shi via cfe-commits
@@ -248,3 +248,25 @@ void check_fflush_all(void) { if (errno) {}// no-warning } } + +void check_opendir(const char *Path) { + DIR *Dir = opendir(Path); + if (Dir == NULL) { +clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}} +if (er

[clang] Improve modeling of two functions in StdLibraryFunctionsChecker (PR #78079)

2024-01-16 Thread Ben Shi via cfe-commits
https://github.com/benshi001 edited https://github.com/llvm/llvm-project/pull/78079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve modeling of two functions in StdLibraryFunctionsChecker (PR #78079)

2024-01-16 Thread Ben Shi via cfe-commits
https://github.com/benshi001 edited https://github.com/llvm/llvm-project/pull/78079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-16 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > @Fznamznon So should I update the test files manually? Yes, AFAIK there is no script to update the tests. Make sure the new errors seen in the tests are expected outcome of the patch though. https://github.com/llvm/llvm-project/pull/78064

[llvm] [clang] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-16 Thread Matt Arsenault via cfe-commits
@@ -18178,6 +18178,51 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {ArgTy}); return Builder.CreateCall(F, {Addr, Val, ZeroI32, ZeroI32, ZeroI1}); } + case AMDGPU::BI__builtin_amdgcn_global_load_tr_b64

[clang] [clang] Fix direct-initialization with new expressions for arrays (PR #78201)

2024-01-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok converted_to_draft https://github.com/llvm/llvm-project/pull/78201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-16 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t + +constexpr int myConstexprMin(int a, int b) { + return a < b ? a : b; +} + +constexpr int myConstexprMax(int a, int b) { + return a > b ? a : b; +} + +int bar(int x, int y) { + return x < y ? x : y

[clang] [clang] Fix direct-initialization with new expressions for arrays (PR #78201)

2024-01-16 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Yeah #76976 supersedes this. I would still recommend removing `diag::err_new_array_init_args` if only so: ```c++ int x[2](1, 2); int* y = new int[2](1, 2); ``` have similar error messages. https://github.com/llvm/llvm-project/pull/78201 __

[clang] [clang] Fix direct-initialization with new expressions for arrays (PR #78201)

2024-01-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok closed https://github.com/llvm/llvm-project/pull/78201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2024-01-16 Thread Kazushi Marukawa via cfe-commits
@@ -26,7 +26,7 @@ #include #endif -#if !defined(__USING_SJLJ_EXCEPTIONS__) +#if !defined(__USING_SJLJ_EXCEPTIONS__) || !defined(__USING_WASM_EXCEPTIONS__) kaz7 wrote: Thanks a lot!! https://github.com/llvm/llvm-project/pull/73196 ___

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-16 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy edited https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [AMDGPU][GFX12] Add 16 bit atomic fadd instructions (PR #75917)

2024-01-16 Thread Mariusz Sikora via cfe-commits
@@ -27,34 +27,23 @@ main_body: ret float %out0 } -define amdgpu_ps float @atomic_pk_add_bf16_1d_v2(<8 x i32> inreg %rsrc, <2 x i16> %data, i32 %s) { +define amdgpu_ps float @atomic_pk_add_bf16_1d_v2(<8 x i32> inreg %rsrc, <2 x bfloat> %data, i32 %s) { ; GFX12-LABEL: atomi

[compiler-rt] [lld] [mlir] [libcxx] [libcxxabi] [openmp] [llvm] [clang] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

2024-01-16 Thread Petr Hosek via cfe-commits
petrhosek wrote: > @petrhosek @ldionne would it be better detect libunwind in > LLVM_ENABLE_RUNTIMES? > > Asking because we have similar thing in compiler-rt, e.g. for lld, and I am > not sure which approach is better: There are trade offs: > > 1. checking LLVM_ENABLE_RUNTIMES simplify end us

[clang-tools-extra] [llvm] [clang] [AMDGPU][GFX12] Add 16 bit atomic fadd instructions (PR #75917)

2024-01-16 Thread Mariusz Sikora via cfe-commits
@@ -1368,6 +1391,28 @@ def int_amdgcn_struct_ptr_buffer_atomic_cmpswap : Intrinsic< // gfx908 intrinsic def int_amdgcn_struct_buffer_atomic_fadd : AMDGPUStructBufferAtomic; def int_amdgcn_struct_ptr_buffer_atomic_fadd : AMDGPUStructPtrBufferAtomic; +// gfx12 intrinsic +def i

[llvm] [clang] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2024-01-16 Thread Jeremy Morse via cfe-commits
jmorse wrote: Hi, We're seeing a crash with this reproducer https://gist.github.com/jmorse/b0248c3c9f9195487ffd7c7431a8d15e llc: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2338: virtual void llvm::DwarfDebug::endFunctionImpl(const llvm::MachineFunction *): Assertion `LScopes.getAbstractScope

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/78243 According to [[temp.pre] p5](http://eel.is/c++draft/temp.pre#5): > In a > [template-declaration](http://eel.is/c++draft/temp.pre#nt:template-declaration), > explicit specialization, or explicit instantiation

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @erichkeane https://github.com/llvm/llvm-project/pull/78243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes According to [[temp.pre] p5](http://eel.is/c++draft/temp.pre#5): > In a [template-declaration](http://eel.is/c++draft/temp.pre#nt:template-declaration), explicit specialization, or explicit instant

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-16 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t + +constexpr int myConstexprMin(int a, int b) { + return a < b ? a : b; +} + +constexpr int myConstexprMax(int a, int b) { + return a > b ? a : b; +} + +int bar(int x, int y) { + return x < y ? x : y

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 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 f725bb960d45ada3cc4667dd7aa22792d389c7e7 44c582f0e23725b28b46c07bdb0d2991ebb7d204 --

[clang] [Clang][Parse] Diagnose member template declarations with multiple declarators (PR #78243)

2024-01-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/78243 >From b5d814abf6241d3e9cdfcc64109c33c56a896172 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 12 Jan 2024 13:45:15 -0500 Subject: [PATCH] [Clang][Parse] Diagnose member template declarations wit

[clang] [llvm] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-16 Thread Piotr Sobczak via cfe-commits
@@ -18178,6 +18178,51 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {ArgTy}); return Builder.CreateCall(F, {Addr, Val, ZeroI32, ZeroI32, ZeroI1}); } + case AMDGPU::BI__builtin_amdgcn_global_load_tr_b64

[clang] [clang][dataflow] Use `ignoreCFGOmittedNodes()` in `setValue()`. (PR #78245)

2024-01-16 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/78245 This is to be consistent with `getValue()`, which also uses `ignoreCFGOmittedNodes()`. Before this fix, it was not possible to retrieve a `Value` from a "CFG omitted" node that had previously been set using

[clang] [clang][dataflow] Use `ignoreCFGOmittedNodes()` in `setValue()`. (PR #78245)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes This is to be consistent with `getValue()`, which also uses `ignoreCFGOmittedNodes()`. Before this fix, it was not possible to retrieve a `Value` from a "CFG omitted" node tha

[clang-tools-extra] [clang] [llvm] [mlir] [ASan][AMDGPU] Fix Assertion Failure. (PR #78242)

2024-01-16 Thread via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/78242 >From fe6d4abebb12e063e10b2266f76ff1a604783c0c Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Mon, 11 Dec 2023 14:23:44 +0530 Subject: [PATCH] [ASan][AMDGPU] Fix Assertion Failure. Assertion failure `(i

[clang-tools-extra] [NFC][clang-tidy]improve performance for misc-unused-using-decls check (PR #78231)

2024-01-16 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Thanks, the code looks good. Do you have any performance data after this > change? I don't run clang-tidy bench for some large project. But I do some test for some auto-generated cpp file which has lots of using, and the execution time reduce from 0.2s to 0.18s in my MAC

[clang-tools-extra] dca6f60 - [NFC][clang-tidy]improve performance for misc-unused-using-decls check (#78231)

2024-01-16 Thread via cfe-commits
Author: Congcong Cai Date: 2024-01-16T17:45:03+08:00 New Revision: dca6f60bcdd4a8e6c5defad454d9c470a27701fe URL: https://github.com/llvm/llvm-project/commit/dca6f60bcdd4a8e6c5defad454d9c470a27701fe DIFF: https://github.com/llvm/llvm-project/commit/dca6f60bcdd4a8e6c5defad454d9c470a27701fe.diff

[clang-tools-extra] [NFC][clang-tidy]improve performance for misc-unused-using-decls check (PR #78231)

2024-01-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/78231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs (PR #76777)

2024-01-16 Thread Alex Bradbury via cfe-commits
https://github.com/asb approved this pull request. LGTM. Thanks for your persistence on this! https://github.com/llvm/llvm-project/pull/76777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[mlir] [clang-tools-extra] [llvm] [clang] [ASan][AMDGPU] Fix Assertion Failure. (PR #78242)

2024-01-16 Thread via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/78242 >From fe6d4abebb12e063e10b2266f76ff1a604783c0c Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Mon, 11 Dec 2023 14:23:44 +0530 Subject: [PATCH] [ASan][AMDGPU] Fix Assertion Failure. Assertion failure `(i

[clang] [llvm] [CMake][PGO] Build Sema.cpp to generate profdata for PGO builds (PR #77347)

2024-01-16 Thread Petr Hosek via cfe-commits
@@ -26,9 +30,23 @@ if(LLVM_BUILD_INSTRUMENTED) message(STATUS "To enable merging PGO data LLVM_PROFDATA has to point to llvm-profdata") else() add_custom_target(generate-profdata - COMMAND "${Python3_EXECUTABLE}" ${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py merge

[clang] [clang][dataflow] Process terminator condition within `transferCFGBlock()`. (PR #78127)

2024-01-16 Thread via cfe-commits
martinboehme wrote: Heads up: I'm holding off on merging this PR for the time being because I've discovered that it breaks some of our internal integration tests. The reason is a pre-existing bug, for which I have a fix in review at #78245. The effect of the bug is that the following code in t

[clang-tools-extra] [NFC][clang-tidy]improve performance for misc-unused-using-decls check (PR #78231)

2024-01-16 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > LGTM. There is open issue for performance of this check. Consider mentioning > this in release notes as some generic performance improvement. I have also seen this issue. But after optimization, this check is still slow. I guess registering too many pattern causes performa

[clang-tools-extra] fd0e06d - [clang-tidy] Fix missing parentheses in readability-implicit-bool-conversion fixes (#74891)

2024-01-16 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-01-16T10:51:18+01:00 New Revision: fd0e06d1118f14e5a90d5f30b1c9d4b69b0a72eb URL: https://github.com/llvm/llvm-project/commit/fd0e06d1118f14e5a90d5f30b1c9d4b69b0a72eb DIFF: https://github.com/llvm/llvm-project/commit/fd0e06d1118f14e5a90d5f30b1c9d4b69b0a72eb.diff L

[llvm] [clang-tools-extra] [clang-tidy] Fix missing parentheses in readability-implicit-bool-conversion fixes (PR #74891)

2024-01-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/74891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-16 Thread Matt Arsenault via cfe-commits
@@ -18178,6 +18178,51 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {ArgTy}); return Builder.CreateCall(F, {Addr, Val, ZeroI32, ZeroI32, ZeroI1}); } + case AMDGPU::BI__builtin_amdgcn_global_load_tr_b64

[clang] [libcxx] [lld] [libc] [compiler-rt] [clang-tools-extra] [llvm] [flang] [lldb] [libcxxabi] [llvm-exegesis] Add support for validation counters (PR #76653)

2024-01-16 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 edited https://github.com/llvm/llvm-project/pull/76653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-16 Thread Piotr Sobczak via cfe-commits
@@ -18178,6 +18178,51 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {ArgTy}); return Builder.CreateCall(F, {Addr, Val, ZeroI32, ZeroI32, ZeroI1}); } + case AMDGPU::BI__builtin_amdgcn_global_load_tr_b64

[clang] [llvm] [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs (PR #76777)

2024-01-16 Thread Wang Pengcheng via cfe-commits
wangpc-pp wrote: It's not easy to push this forward and thanks a lot! I'll merge this soon. If there are some issues (hope not 😄), follow-up patches will fix them. https://github.com/llvm/llvm-project/pull/76777 ___ cfe-commits mailing list cfe-commit

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-16 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t + +constexpr int myConstexprMin(int a, int b) { + return a < b ? a : b; +} + +constexpr int myConstexprMax(int a, int b) { + return a > b ? a : b; +} + +int bar(int x, int y) { + return x < y ? x : y

[clang] Improve modeling of two functions in StdLibraryFunctionsChecker (PR #78079)

2024-01-16 Thread Balázs Kéri via cfe-commits
@@ -248,3 +248,25 @@ void check_fflush_all(void) { if (errno) {}// no-warning } } + +void check_opendir(const char *Path) { + DIR *Dir = opendir(Path); + if (Dir == NULL) { +clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}} +if (er

[llvm] [clang] [clang-tools-extra] [PowerPC] Peephole address calculation in TOC memops (PR #76488)

2024-01-16 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/76488 >From 7eb909423d49ea19d9978b097ceb8c4a95fc7bac Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Thu, 28 Dec 2023 11:09:07 +0800 Subject: [PATCH 1/3] [PowerPC] Peephole address calculation in TOC memops --- ll

[clang] Improve modeling of two functions in StdLibraryFunctionsChecker (PR #78079)

2024-01-16 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. https://github.com/llvm/llvm-project/pull/78079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [PowerPC] Peephole address calculation in TOC memops (PR #76488)

2024-01-16 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/76488 >From 7eb909423d49ea19d9978b097ceb8c4a95fc7bac Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Thu, 28 Dec 2023 11:09:07 +0800 Subject: [PATCH 1/4] [PowerPC] Peephole address calculation in TOC memops --- ll

[llvm] [clang] [mlir] [clang-tools-extra] [ASan][AMDGPU] Fix Assertion Failure. (PR #78242)

2024-01-16 Thread Matt Arsenault via cfe-commits
@@ -1254,9 +1254,11 @@ Value *AddressSanitizer::memToShadow(Value *Shadow, IRBuilder<> &IRB) { void AddressSanitizer::instrumentMemIntrinsic(MemIntrinsic *MI) { InstrumentationIRBuilder IRB(MI); if (isa(MI)) { -IRB.CreateCall(isa(MI) ? AsanMemmove : AsanMemcpy, -

[clang] [clang][analyzer] Add function 'fscanf' to StreamChecker. (PR #78180)

2024-01-16 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/78180 From aacfc3f06ee51ede08464cb23ec32b210e703b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Mon, 15 Jan 2024 16:41:34 +0100 Subject: [PATCH 1/2] [clang][analyzer] Add function 'fscanf'

[clang] 289999b - [Clang] Make sdot builtins available to SME (#77792)

2024-01-16 Thread via cfe-commits
Author: Sander de Smalen Date: 2024-01-16T10:32:30Z New Revision: 28bad76e34441a3a43f4bf32e028b43fad93 URL: https://github.com/llvm/llvm-project/commit/28bad76e34441a3a43f4bf32e028b43fad93 DIFF: https://github.com/llvm/llvm-project/commit/28bad76e34441a3a43f4bf32e028b43fad93.diff L

[clang] [llvm] [Clang] Make sdot builtins available to SME (PR #77792)

2024-01-16 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/77792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cfi][CodeGen] Call SetLLVMFunctionAttributes{, ForDefinition} on __cf… (PR #78253)

2024-01-16 Thread Pavel Kosov via cfe-commits
https://github.com/kpdev created https://github.com/llvm/llvm-project/pull/78253 …i_check This causes __cfi_check, just as __cfi_check_fail, to get the proper target-specific attributes, in particular uwtable for unwind table generation. Previously, nounwind attribute could be inferred for __c

[clang] [cfi][CodeGen] Call SetLLVMFunctionAttributes{, ForDefinition} on __cf… (PR #78253)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Pavel Kosov (kpdev) Changes …i_check This causes __cfi_check, just as __cfi_check_fail, to get the proper target-specific attributes, in particular uwtable for unwind table generation. Previously, nounwind attribute could be infe

[clang] [cfi][CodeGen] Call SetLLVMFunctionAttributes{, ForDefinition} on __cf… (PR #78253)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Pavel Kosov (kpdev) Changes …i_check This causes __cfi_check, just as __cfi_check_fail, to get the proper target-specific attributes, in particular uwtable for unwind table generation. Previously, nounwind attribute could be inferred for

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-16 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/5] add warning and test --- clang/include/clang/Basic/DiagnosticGr

[clang] [clang-format] Add parse tests for SeparateDefinitionBlocks option (PR #78256)

2024-01-16 Thread via cfe-commits
https://github.com/seranu created https://github.com/llvm/llvm-project/pull/78256 Add config parse tests for SeparateDefinitionBlocks option. >From 5399fad41b3898abe0833e283101aa34e76389b9 Mon Sep 17 00:00:00 2001 From: Serban Ungureanu Date: Tue, 16 Jan 2024 12:56:10 +0200 Subject: [PATCH] [c

[clang] [clang-format] Add parse tests for SeparateDefinitionBlocks option (PR #78256)

2024-01-16 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 i

[llvm] [clang] [RISCV] Bump Zfbfmin, Zvfbfmin, and Zvfbfwma to 1.0. (PR #78021)

2024-01-16 Thread Alex Bradbury via cfe-commits
https://github.com/asb approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/78021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add parse tests for SeparateDefinitionBlocks option (PR #78256)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: serbanu (seranu) Changes Add config parse tests for SeparateDefinitionBlocks option. --- Full diff: https://github.com/llvm/llvm-project/pull/78256.diff 1 Files Affected: - (modified) clang/unittests/Format/ConfigParseTest.cpp (+

[clang] [clang-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-16 Thread via cfe-commits
seranu wrote: Closing this PR as rework has been requested on https://github.com/llvm/llvm-project/pull/77918 https://github.com/llvm/llvm-project/pull/78108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-16 Thread via cfe-commits
https://github.com/seranu closed https://github.com/llvm/llvm-project/pull/78108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add parse tests for SeparateDefinitionBlocks option (PR #78256)

2024-01-16 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 1074b94f5df6e164997cdb494f47657fd49d7cb5 5399fad41b3898abe0833e283101aa34e76389b9 --

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-16 Thread via cfe-commits
seranu wrote: I am going to rework the change as per the review comments. I created another PR to add the missing SeparateDefinitionBlocks config parse tests at https://github.com/llvm/llvm-project/pull/78256. For the rework, shall I create a new PR or can I still use this one? https://github

[clang-tools-extra] clang-tidy: Add bugprone-eval-order (PR #78028)

2024-01-16 Thread via cfe-commits
maflcko wrote: Closing for now, but happy to reopen. I don't see a way to implement this without a user-provided list of class names to match, in which case the check will likely not be used/discovered. https://github.com/llvm/llvm-project/pull/78028 ___

[clang-tools-extra] clang-tidy: Add bugprone-eval-order (PR #78028)

2024-01-16 Thread via cfe-commits
https://github.com/maflcko closed https://github.com/llvm/llvm-project/pull/78028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Relax march string order constraint (PR #78120)

2024-01-16 Thread Alex Bradbury via cfe-commits
asb wrote: Just to check, can someone confirm if gcc is now handling ISA strings in this way too? I do think this is the right direction to go but haven't done a detailed code review of this approach yet. https://github.com/llvm/llvm-project/pull/78120 _

[clang] [llvm] [PowerPC] Make "ca" aliased to "xer" (PR #77557)

2024-01-16 Thread Kai Luo via cfe-commits
@@ -288,9 +288,9 @@ def SPEFSCR: SPR<512, "spefscr">, DwarfRegNum<[612, 112]>; def XER: SPR<1, "xer">, DwarfRegNum<[76]>; -// Carry bit. In the architecture this is really bit 0 of the XER register -// (which really is SPR register 1); this is the only bit interesting to a

[llvm] [clang] [PowerPC] Make "ca" aliased to "xer" (PR #77557)

2024-01-16 Thread Kai Luo via cfe-commits
@@ -782,6 +782,8 @@ ArrayRef PPCTargetInfo::getGCCRegNames() const { const TargetInfo::GCCRegAlias PPCTargetInfo::GCCRegAliases[] = { // While some of these aliases do map to different registers // they still share the same register name. +// Strictly speaking, "ca

[llvm] [clang] [PowerPC] Make "ca" aliased to "xer" (PR #77557)

2024-01-16 Thread Kai Luo via cfe-commits
@@ -288,9 +288,9 @@ def SPEFSCR: SPR<512, "spefscr">, DwarfRegNum<[612, 112]>; def XER: SPR<1, "xer">, DwarfRegNum<[76]>; -// Carry bit. In the architecture this is really bit 0 of the XER register -// (which really is SPR register 1); this is the only bit interesting to a

[clang] [cfi][CodeGen] Call SetLLVMFunctionAttributes{, ForDefinition} on __cf… (PR #78253)

2024-01-16 Thread Pavel Kosov via cfe-commits
kpdev wrote: The same thing was done for `__cfi_check_fail` in the following patch: https://reviews.llvm.org/D70692 https://github.com/llvm/llvm-project/pull/78253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] 032c832 - [Clang][AArch64] Remove unnecessary and incorrect attributes from arm_sme.h.

2024-01-16 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2024-01-16T11:20:59Z New Revision: 032c832719b5b2c44b78359ed54b91964ef15b79 URL: https://github.com/llvm/llvm-project/commit/032c832719b5b2c44b78359ed54b91964ef15b79 DIFF: https://github.com/llvm/llvm-project/commit/032c832719b5b2c44b78359ed54b91964ef15b79.diff L

[clang] [flang] [flang][driver] Allow explicit specification of -lFortran_main (PR #78152)

2024-01-16 Thread Tom Eccles via cfe-commits
tblah wrote: > I'd agree to that! The way gfortran does it, seems the best approach. When > there's a program unit in the code, gfortran also add a `main` definition to > that translation unit. +2 > I could opt-in to make this a learning project for me, but I'd need some hand > holding to g

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-16 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/78258 The arm_sme.td file was still using `IsSharedZA` and `IsPreservesZA`, which should be changed to match the new state attributes added in #76971. This patch adds `IsInZA`, `IsOutZA` and `IsInOutZA` as the s

[clang] [Clang] Refactor diagnostics for SME builtins. (PR #78258)

2024-01-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sander de Smalen (sdesmalen-arm) Changes The arm_sme.td file was still using `IsSharedZA` and `IsPreservesZA`, which should be changed to match the new state attributes added in #76971. This patch adds `IsInZA`, `IsOutZA` and `IsInOutZA`

[llvm] [clang] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-16 Thread Piotr Sobczak via cfe-commits
https://github.com/piotrAMD updated https://github.com/llvm/llvm-project/pull/2 >From 1b2085465dd0988459a4c71dab6cd65b1de065be Mon Sep 17 00:00:00 2001 From: Piotr Sobczak Date: Thu, 11 Jan 2024 14:52:59 +0100 Subject: [PATCH 1/5] [AMDGPU] Add global_load_tr for GFX12 Support new amdgcn_gl

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

2024-01-16 Thread Utkarsh Saxena via cfe-commits
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) { RecordDecl *RD = FD->getReturnType()->getAsRecordDecl(); if (!RD || !RD->getUnderlyingDecl()->hasAttr()) return; - // Allow `get_return_object()`. - if (FD->getDeclName().isIdentifier() && +

[clang] [clang-format] Add parse tests for SeparateDefinitionBlocks option (PR #78256)

2024-01-16 Thread via cfe-commits
https://github.com/seranu updated https://github.com/llvm/llvm-project/pull/78256 >From 05de7ff4ba8e90cab10ff42abad5c68e84780e70 Mon Sep 17 00:00:00 2001 From: Serban Ungureanu Date: Tue, 16 Jan 2024 12:56:10 +0200 Subject: [PATCH] [clang-format] Add parse tests for SeparateDefinitionBlocks op

[clang] c19cacf - [clang][dataflow] Tighten checking for existence of a function body. (#78163)

2024-01-16 Thread via cfe-commits
Author: martinboehme Date: 2024-01-16T12:52:55+01:00 New Revision: c19cacfa34f52b65addeb7239d564b20e3cf2c61 URL: https://github.com/llvm/llvm-project/commit/c19cacfa34f52b65addeb7239d564b20e3cf2c61 DIFF: https://github.com/llvm/llvm-project/commit/c19cacfa34f52b65addeb7239d564b20e3cf2c61.diff

[clang] [clang][dataflow] Tighten checking for existence of a function body. (PR #78163)

2024-01-16 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/78163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-16 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 updated https://github.com/llvm/llvm-project/pull/78032 >From d0767350f26215e86dee039427183630b3f02668 Mon Sep 17 00:00:00 2001 From: hnakamura5 Date: Sat, 13 Jan 2024 21:44:34 +0900 Subject: [PATCH 1/4] [clang-format] TableGen multi line string support. --- clan

[llvm] [clang-tools-extra] [flang] [clang] [flang] add SYSTEM runtime and lowering intrinsics support (PR #74309)

2024-01-16 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/74309 >From 14f8c3e38791cc6b06455b8beffe37a6f7105e03 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 4 Dec 2023 10:32:03 + Subject: [PATCH 01/11] Add SYSTEM runtime and lowering intrinsic support Calls std::syst

  1   2   3   4   5   6   >