[clang] 12c0823 - [clang-format] Handle spaces in file paths in git-clang-format.bat (#107041)

2024-09-03 Thread via cfe-commits
Author: Owen Pan Date: 2024-09-03T19:06:40-07:00 New Revision: 12c0823d67a8d5a61d6430aac609ef5e468267a6 URL: https://github.com/llvm/llvm-project/commit/12c0823d67a8d5a61d6430aac609ef5e468267a6 DIFF: https://github.com/llvm/llvm-project/commit/12c0823d67a8d5a61d6430aac609ef5e468267a6.diff LOG:

[clang] [clang-format] Handle spaces in file paths in git-clang-format.bat (PR #107041)

2024-09-03 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/107041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a27ff17 - [clang-format] Fix a regression in annotating ObjCBlockLParen (#107021)

2024-09-03 Thread via cfe-commits
Author: Owen Pan Date: 2024-09-03T19:07:14-07:00 New Revision: a27ff17034d66d852ba83be7d237d6a623cb4ff4 URL: https://github.com/llvm/llvm-project/commit/a27ff17034d66d852ba83be7d237d6a623cb4ff4 DIFF: https://github.com/llvm/llvm-project/commit/a27ff17034d66d852ba83be7d237d6a623cb4ff4.diff LOG:

[clang] [clang-format] Fix a regression in annotating ObjCBlockLParen (PR #107021)

2024-09-03 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/107021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-03 Thread Chris B via cfe-commits
@@ -0,0 +1,76 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \ +// RUN: -o - | FileCheck %s --check-prefixes=CHECK + +// CHECK: %hlsl.select = select i1 +// CHECK: ret i32 %hlsl.selec

[clang] b55186e - [clang][Driver] Define soft float macros for PPC. (#106012)

2024-09-03 Thread via cfe-commits
Author: Alex Rønne Petersen Date: 2024-09-04T10:07:35+08:00 New Revision: b55186eefd73b3848e01c8471c47a9354969d652 URL: https://github.com/llvm/llvm-project/commit/b55186eefd73b3848e01c8471c47a9354969d652 DIFF: https://github.com/llvm/llvm-project/commit/b55186eefd73b3848e01c8471c47a9354969d652

[clang] [clang][Driver] Define soft float macros for PPC. (PR #106012)

2024-09-03 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 closed https://github.com/llvm/llvm-project/pull/106012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 812c96e - [clang-format] Handle pointer/reference in macro definitions (#107074)

2024-09-03 Thread via cfe-commits
Author: Owen Pan Date: 2024-09-03T19:11:12-07:00 New Revision: 812c96e8b9354e5e84d513f5b03172db5ad3b491 URL: https://github.com/llvm/llvm-project/commit/812c96e8b9354e5e84d513f5b03172db5ad3b491 DIFF: https://github.com/llvm/llvm-project/commit/812c96e8b9354e5e84d513f5b03172db5ad3b491.diff LOG:

[clang] [clang-format] Handle pointer/reference in macro definitions (PR #107074)

2024-09-03 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/107074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f15e3e5 - [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (#107158)

2024-09-03 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-03T20:02:29-07:00 New Revision: f15e3e58c59b4d31eee24fa9debc5dfad0c20028 URL: https://github.com/llvm/llvm-project/commit/f15e3e58c59b4d31eee24fa9debc5dfad0c20028 DIFF: https://github.com/llvm/llvm-project/commit/f15e3e58c59b4d31eee24fa9debc5dfad0c20028.diff L

[clang] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (PR #107158)

2024-09-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/107158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] generate hlsl.wavesize attribute (PR #107176)

2024-09-03 Thread Xiang Li via cfe-commits
https://github.com/python3kgae created https://github.com/llvm/llvm-project/pull/107176 Generate function attribute hlsl.wavesize from [WaveSize]. For #70118 >From 3b4ba1436220d6eef11bce713618aefb272ea74f Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 3 Sep 2024 22:56:21 -0400 Subject: [P

[clang] [HLSL] generate hlsl.wavesize attribute (PR #107176)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Xiang Li (python3kgae) Changes Generate function attribute hlsl.wavesize from [WaveSize]. For #70118 --- Full diff: https://github.com/llvm/llvm-project/pull/107176.diff 2 Files Affected: - (modified) clang/lib/CodeGen/CGHLSLRuntime.cpp

[clang] [Clang] [Driver] Support `-jmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/107177 Allow `-jmc` to be used if the target triple is targeting msvc, `*-windows-msvc`, irrelevant of the driver mode used. In general the driver mode shouldn't control the target triple. Also in our custom build s

[clang] [Clang] [Driver] Support `-jmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Max Winkler (MaxEW707) Changes Allow `-jmc` to be used if the target triple is targeting msvc, `*-windows-msvc`, irrelevant of the driver mode used. In general the driver mode shouldn't control the target triple. Also in our custo

[clang] [Clang] [Driver] Support `-fjmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/107177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Driver] Support `-fjmc` for `*-windows-msvc` target in non cl driver modes (PR #107177)

2024-09-03 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/107177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Workaround dependent source location issues (PR #106925)

2024-09-03 Thread Shafik Yaghmour via cfe-commits
@@ -5443,11 +5443,24 @@ struct EnsureImmediateInvocationInDefaultArgs // Rewrite to source location to refer to the context in which they are used. ExprResult TransformSourceLocExpr(SourceLocExpr *E) { -if (E->getParentContext() == SemaRef.CurContext) +DeclContext

[clang] [llvm] [AMDGPU] Add target intrinsic for s_prefetch_data (PR #107133)

2024-09-03 Thread Matt Arsenault via cfe-commits
@@ -2689,6 +2689,12 @@ def int_amdgcn_global_load_tr_b128 : AMDGPULoadIntrinsic; def int_amdgcn_wave_id : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [NoUndef, IntrNoMem, IntrSpeculatable]>; +def int_amdgcn_s_prefetch_data : + Intrinsic<[], [llvm_anyptr_ty, llvm_i32_ty], ---

[clang] [flang] Allow disabling of types from the command line (PR #107126)

2024-09-03 Thread Slava Zakharin via cfe-commits
https://github.com/vzakhari approved this pull request. Looks good to me, but maybe we can have just a single option that accepts predefined words like `real2`, `integer4`, etc. I wonder if we can process multiple instances of an option like https://github.com/llvm/llvm-project/blob/0ad6cee92

[clang] [Clang][CodeGen] Fix type for atomic float incdec operators (PR #107075)

2024-09-03 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/107075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9fef09f - [Clang][CodeGen] Fix type for atomic float incdec operators (#107075)

2024-09-03 Thread via cfe-commits
Author: Yingwei Zheng Date: 2024-09-04T12:19:46+08:00 New Revision: 9fef09fd2918e7d8c357b98a9a798fe207941f73 URL: https://github.com/llvm/llvm-project/commit/9fef09fd2918e7d8c357b98a9a798fe207941f73 DIFF: https://github.com/llvm/llvm-project/commit/9fef09fd2918e7d8c357b98a9a798fe207941f73.diff

[clang] [Clang][CodeGen] Fix type for atomic float incdec operators (PR #107075)

2024-09-03 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw closed https://github.com/llvm/llvm-project/pull/107075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Fix type for atomic float incdec operators (PR #107075)

2024-09-03 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw milestoned https://github.com/llvm/llvm-project/pull/107075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Fix type for atomic float incdec operators (PR #107075)

2024-09-03 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: /cherry-pick 9fef09fd2918e7d8c357b98a9a798fe207941f73 https://github.com/llvm/llvm-project/pull/107075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Fix type for atomic float incdec operators (PR #107075)

2024-09-03 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 9fef09fd2918e7d8c357b98a9a798fe207941f73 https://github.com/llvm/llvm-project/actions/runs/10695038055 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] [MS] Put dllexported inline global initializers in a comdat (PR #107154)

2024-09-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/107154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Preserve the fully-substituted flag in PackIndexingType (PR #107181)

2024-09-03 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/107181 We should avoid another round of transformation of the pattern if the pattern has already turned out to be an empty pack. As an outcome, the empty SubstTemplateTypeParmPackType won't occur, and we don't need to

[clang] [Clang] Preserve the fully-substituted flag in PackIndexingType (PR #107181)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes We should avoid another round of transformation of the pattern if the pattern has already turned out to be an empty pack. As an outcome, the empty SubstTemplateTypeParmPackType won't occur, and we don't need

[clang] [Clang][CodeGen] Don't emit assumptions if current block is unreachable. (PR #106936)

2024-09-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c94bd96 - [Clang][CodeGen] Don't emit assumptions if current block is unreachable. (#106936)

2024-09-03 Thread via cfe-commits
Author: Yingwei Zheng Date: 2024-09-04T13:36:32+08:00 New Revision: c94bd96c277e0b48e198fdc831bb576d9a04aced URL: https://github.com/llvm/llvm-project/commit/c94bd96c277e0b48e198fdc831bb576d9a04aced DIFF: https://github.com/llvm/llvm-project/commit/c94bd96c277e0b48e198fdc831bb576d9a04aced.diff

[clang] [Clang][CodeGen] Don't emit assumptions if current block is unreachable. (PR #106936)

2024-09-03 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw closed https://github.com/llvm/llvm-project/pull/106936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Don't emit assumptions if current block is unreachable. (PR #106936)

2024-09-03 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw milestoned https://github.com/llvm/llvm-project/pull/106936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Don't emit assumptions if current block is unreachable. (PR #106936)

2024-09-03 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: /cherry-pick c94bd96c277e0b48e198fdc831bb576d9a04aced https://github.com/llvm/llvm-project/pull/106936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-03 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > @JinjinLi868 are you still working on this? I can ask him. Is this PR blocking some of your works on float16/bf16? https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Clang][CodeGen] Don't emit assumptions if current block is unreachable. (PR #106936)

2024-09-03 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#107183 https://github.com/llvm/llvm-project/pull/106936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-03 Thread via cfe-commits
JinjinLi868 wrote: > @JinjinLi868 are you still working on this? yes, i am. could you give me some advice and can i help you ? https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-03 Thread Craig Topper via cfe-commits
topperc wrote: > > @JinjinLi868 are you still working on this? > > I can ask him. Is this PR blocking some of your recent works on float16/bf16? I stumbled onto the verifier error earlier while writing a test. It's not blocking me. https://github.com/llvm/llvm-project/pull/89051 _

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-03 Thread Craig Topper via cfe-commits
@@ -1431,9 +1431,13 @@ Value *ScalarExprEmitter::EmitScalarCast(Value *Src, QualType SrcType, return Builder.CreateFPToUI(Src, DstTy, "conv"); } - if (DstElementTy->getTypeID() < SrcElementTy->getTypeID()) + if ((DstElementTy->is16bitFPTy() && SrcElementTy->is16bitFPT

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-03 Thread Craig Topper via cfe-commits
topperc wrote: > > @JinjinLi868 are you still working on this? > > yes, i am. could you give me some advice and can i help you ? Can we have a scalar only patch as @arsenm requested? https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mai

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2024-09-03 Thread Matt Arsenault via cfe-commits
@@ -45,7 +45,7 @@ void test3(packedfloat3 *p) { *p = (packedfloat3) { 3.2f, 2.3f, 0.1f }; } // CHECK: @test3( -// CHECK: store <4 x float> {{.*}}, align 4 +// CHECK: store <3 x float> {{.*}}, align 4 arsenm wrote: The ideal control would be more specific tha

[clang] 3449ed8 - Revert "[clang-format] Correctly annotate braces in macro definition (#106662)"

2024-09-03 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-09-03T22:54:50-07:00 New Revision: 3449ed8dece600f387357b71ff74ae4bc46828b6 URL: https://github.com/llvm/llvm-project/commit/3449ed8dece600f387357b71ff74ae4bc46828b6 DIFF: https://github.com/llvm/llvm-project/commit/3449ed8dece600f387357b71ff74ae4bc46828b6.diff LOG:

[clang] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (PR #107185)

2024-09-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/107185 I'm planning to deprecate DenseMap::FindAndConstruct in favor of DenseMap::operator[]. >From 24088d0b17e610039191537abfb196732a5e3218 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 3 Sep 2024 21:

[clang] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (PR #107185)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes I'm planning to deprecate DenseMap::FindAndConstruct in favor of DenseMap::operator[]. --- Full diff: https://github.com/llvm/llvm-project/pull/107185.diff 1 Files

[clang] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (PR #107185)

2024-09-03 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 3449ed8dece600f387357b71ff74ae4bc46828b6 24088d0b17e610039191537abfb196732a5e3218 --e

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/13] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-03 Thread via cfe-commits
JinjinLi868 wrote: > > > @JinjinLi868 are you still working on this? > > > > > > yes, i am. could you give me some advice and can i help you ? > > Can we have a scalar only patch as @arsenm requested? ok, you mean, i remove the vector testcase for this patch. and just save the scalar testcas

[clang] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) (PR #107185)

2024-09-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/107185 >From 24088d0b17e610039191537abfb196732a5e3218 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 3 Sep 2024 21:42:55 -0700 Subject: [PATCH 1/2] [CGOpenMPRuntime] Use DenseMap::operator[] (NFC) I'm pl

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/14] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [llvm] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104544 >From 6d5f8991a4ef9e79bc1bed30addf7b29b7ed0d2e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 15 Aug 2024 19:03:29 -0700 Subject: [PATCH 01/15] Implement `__builtin_is_intangible` --- clang/include/clan

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-03 Thread Luke Lau via cfe-commits
lukel97 wrote: Hi, I'm no longer able to compile SPEC CPU 2017 after this due to an error in 510.parest_r: ``` /cpu2017/benchspec/CPU/510.parest_r/src/source/fe/fe_tools.cc:2020:15: error: partial ordering for explicit instantiation of 'back_interpolate' is ambiguous 2020 | void FETools::back

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-09-03 Thread Matt Arsenault via cfe-commits
arsenm wrote: > ok, you mean, i remove the vector testcase for this patch. and just save the > scalar testcase? No, keep the tests. Only keep the scalar behavior change. The previous revision was essentially correct and minimal https://github.com/llvm/llvm-project/pull/89051

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-09-03 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: Ping. https://github.com/llvm/llvm-project/pull/103031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-03 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From 6300500cf475062c77dfd633dcd1ab2856e28136 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [clang] [docs] Clarify the issue with compiler-rt on Windows/MSVC (PR #106875)

2024-09-03 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/106875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Don't add DWARF debug info when assembling .s with clang-cl /Z7 (PR #106686)

2024-09-03 Thread via cfe-commits
https://github.com/zmodem approved this pull request. Looks reasonable to me. https://github.com/llvm/llvm-project/pull/106686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] tune the default stack protector level as SSPOn on Windows platform (PR #107043)

2024-09-03 Thread via cfe-commits
https://github.com/wenqinI updated https://github.com/llvm/llvm-project/pull/107043 >From dd5a44532e2d50348bfdcaef1ae297fd4688ce8c Mon Sep 17 00:00:00 2001 From: "wenqin.yang" Date: Tue, 3 Sep 2024 10:42:12 +0800 Subject: [PATCH 1/2] tune the default stack protector level as SSPOn on Windows p

[clang] [Clang] Fix handling of placeholder variables name in init captures (PR #107055)

2024-09-03 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/107055 We were incorrectly not deduplicating results when looking up `_` which, for a lambda init capture, would result in an ambiguous lookup. The same bug caused some diagnostic notes to be emitted twice. Fixes #1

[clang] [Clang] Fix handling of placeholder variables name in init captures (PR #107055)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We were incorrectly not deduplicating results when looking up `_` which, for a lambda init capture, would result in an ambiguous lookup. The same bug caused some diagnostic notes to be emitted twice. Fixes #10

[clang] [clang] Add tests for CWG issues about language linkage (PR #107019)

2024-09-03 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/107019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Print Pointers via APValue (PR #107056)

2024-09-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/107056 Instead of doing this ourselves, just rely on printing the APValue. >From 05f15c5c7c867cdb37f45c51e7d33fdcc527463e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Sep 2024 09:58:06 +0

[clang] [clang][bytecode] Print Pointers via APValue (PR #107056)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Instead of doing this ourselves, just rely on printing the APValue. --- Full diff: https://github.com/llvm/llvm-project/pull/107056.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpFrame.cp

[clang] [llvm] Support for assume directive : Parse & AST modules (PR #97535)

2024-09-03 Thread via cfe-commits
https://github.com/SunilKuravinakop closed https://github.com/llvm/llvm-project/pull/97535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Support for assume directive : Parse & AST modules (PR #97535)

2024-09-03 Thread via cfe-commits
SunilKuravinakop wrote: Changes to `omp assume` was done by Julian Brown from AMD on August 5th, https://github.com/llvm/llvm-project/pull/92731 git log: ``` commit a42e515e3a9f3bb4e44389c097b89104d95b9b29 Author: Julian Brown Date: Mon Aug 5 12:37:07 2024 +0100 ``` Hence closing this pull r

[clang] 525ffd6 - [clang][analyzer] Bring alpha.security.MmapWriteExec checker out of alpha package (#102636)

2024-09-03 Thread via cfe-commits
Author: Balázs Kéri Date: 2024-09-03T10:31:36+02:00 New Revision: 525ffd626231a8c6fecb0b886c272ff4568f09f5 URL: https://github.com/llvm/llvm-project/commit/525ffd626231a8c6fecb0b886c272ff4568f09f5 DIFF: https://github.com/llvm/llvm-project/commit/525ffd626231a8c6fecb0b886c272ff4568f09f5.diff L

[clang] [clang][analyzer] Bring alpha.security.MmapWriteExec checker out of alpha package (PR #102636)

2024-09-03 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/102636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix handling of placeholder variables name in init captures (PR #107055)

2024-09-03 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. One thing I'm not entirely clear about is why we would end up with two same placeholder `Decl`s in `LookupResult`. It seems that `IdResolver` results in two same duplicate Decls for such case, but I don't know why. (However I'd still appr

[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

2024-09-03 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 0fa78b6c7bd43c2498700a98c47a02cf4fd06388 https://github.com/llvm/llvm-project/pull/106662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

2024-09-03 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#107058 https://github.com/llvm/llvm-project/pull/106662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-03 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From 5604c2f5d11a340413f638f275e5c91da76fe6d9 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-03 Thread Budimir Aranđelović via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-03 Thread Budimir Aranđelović via cfe-commits
@@ -5335,6 +5335,217 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// This function is called only if function call is not inside template body. +// TODO: Add call

[clang] [clang][ExtractAPI] Remove erroneous module name check in MacroCallbacks (PR #107059)

2024-09-03 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg created https://github.com/llvm/llvm-project/pull/107059 rdar://135044923 >From caf560529093f80b5b6e6220ec19e244f57779d3 Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Mon, 2 Sep 2024 18:47:40 +0100 Subject: [PATCH] [clang][ExtractAPI] Remove erroneous

[clang] [clang][ExtractAPI] Remove erroneous module name check in MacroCallbacks (PR #107059)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Grumberg (daniel-grumberg) Changes rdar://135044923 --- Full diff: https://github.com/llvm/llvm-project/pull/107059.diff 1 Files Affected: - (modified) clang/lib/ExtractAPI/ExtractAPIConsumer.cpp (+1-1) ``diff diff --g

[clang-tools-extra] [clang-tidy] Suggest using reinterpret_cast in bugprone-casting-thro… (PR #106784)

2024-09-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/106784 >From d88a21655116da6ce8fed558ed9d7ea1ceb5e862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Fri, 30 Aug 2024 19:17:16 + Subject: [PATCH] [clang-tidy] Suggest using reinterpret_

[clang] [clang][bytecode] Pass FPOptions to floating point ops (PR #107063)

2024-09-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/107063 So we don't have to retrieve them from the InterpFrame, which is slow. >From 32b28da07f4115b46fe4fd51e05e60264d194558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Sep 2024 10:59:22

[clang] 733a92d - [clang][bytecode] Print Pointers via APValue (#107056)

2024-09-03 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-03T11:07:19+02:00 New Revision: 733a92d7bced7119986a93a1b4e1c760f92b9583 URL: https://github.com/llvm/llvm-project/commit/733a92d7bced7119986a93a1b4e1c760f92b9583 DIFF: https://github.com/llvm/llvm-project/commit/733a92d7bced7119986a93a1b4e1c760f92b9583.diff L

[clang] [clang][bytecode] Print Pointers via APValue (PR #107056)

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

[clang] [clang][bytecode] Pass FPOptions to floating point ops (PR #107063)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes So we don't have to retrieve them from the InterpFrame, which is slow. --- Patch is 22.64 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/107063.diff 5 Files Aff

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-03 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From 97c86bd38b3dbebfc4790ae3b0d64d6aa00acdbb Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [Clang] Fix handling of placeholder variables name in init captures (PR #107055)

2024-09-03 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I took a cursory look, and it seems that we pushed the same init capture to the scope chain three times: 1. `Sema::ActOnLambdaExpressionAfterIntroducer` https://github.com/llvm/llvm-project/blob/6c59dfb0184aa11ec202f1cd8aee9e971a1565a4/clang/lib/Sema/SemaLambda.cpp#L1212-L1214 2

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-03 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/106997 >From 88600fb5e7395d4eefb6be24689248b7be2d4115 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 28 Aug 2024 12:11:28 +0200 Subject: [PATCH 1/2] [clang] Respect the lifetimebound in user-defined operator. --

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-03 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/106997 >From 88600fb5e7395d4eefb6be24689248b7be2d4115 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 28 Aug 2024 12:11:28 +0200 Subject: [PATCH 1/3] [clang] Respect the lifetimebound in user-defined operator. --

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-03 Thread Donát Nagy via cfe-commits
@@ -50,6 +118,75 @@ class BuiltinFunctionChecker : public Checker { } // namespace +std::pair +BuiltinFunctionChecker::checkOverflow(CheckerContext &C, SVal RetVal, + QualType Res) const { + ProgramStateRef State = C.getState(); + SValBu

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

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

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

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

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-03 Thread Haojian Wu via cfe-commits
@@ -968,6 +972,23 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath &Path) { return false; } +static bool isAssginmentOperatorLifetimeBound(CXXMethodDecl *CMD) { + if (!CMD) +return false; + assert(CMD->getOverloadedOperator() == OverloadedOperatorKind::OO_Eq

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-03 Thread Budimir Aranđelović via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

[clang] [clang] Respect the lifetimebound in assignment operator. (PR #106997)

2024-09-03 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/106997 >From 040c7646a037652f0c00a97de767a3f96ebbd1d3 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 28 Aug 2024 12:11:28 +0200 Subject: [PATCH 1/3] [clang] Respect the lifetimebound in user-defined operator. --

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-03 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/102602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (PR #104599)

2024-09-03 Thread Donát Nagy via cfe-commits
@@ -3648,35 +3652,53 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, return nullptr; } - // See if we're releasing memory while inlining a destructor - // (or one of its callees). This turns on various common - //

[clang] [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (PR #104599)

2024-09-03 Thread Donát Nagy via cfe-commits
@@ -3648,35 +3655,54 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N, return nullptr; } - // See if we're releasing memory while inlining a destructor - // (or one of its callees). This turns on various common - //

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-03 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovichtec updated https://github.com/llvm/llvm-project/pull/105479 From a5703a8ade8b9bd00d474bdc12cd88b479fef67f Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribute

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-03 Thread Budimir Aranđelović via cfe-commits
@@ -0,0 +1,176 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,beforeCxx2b -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2b -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++23 -Wmissing-format-attribute %s +

[clang] [Clang] Treat default template argument as constant expressions (PR #107073)

2024-09-03 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/107073 We only check that a default argument is a converted constant expression when using the default argument. However, when parsing a default argument, we need to make sure to parse it as a constant expression su

[clang] [Clang] Treat default template argument as constant expressions (PR #107073)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We only check that a default argument is a converted constant expression when using the default argument. However, when parsing a default argument, we need to make sure to parse it as a constant expression suc

[clang] [clang-format] Handle pointer/reference in macro definitions (PR #107074)

2024-09-03 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/107074 A macro definition needs its own scope stack in the annotator, so we add the MacroBodyScopes stack and use ScopeStack to refer to it when in the macro definition body. Also, we need to have a scope type for a c

[clang] [clang-format] Handle pointer/reference in macro definitions (PR #107074)

2024-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes A macro definition needs its own scope stack in the annotator, so we add the MacroBodyScopes stack and use ScopeStack to refer to it when in the macro definition body. Also, we need to have a scope type f

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-03 Thread Pavel Skripkin via cfe-commits
@@ -50,6 +118,75 @@ class BuiltinFunctionChecker : public Checker { } // namespace +std::pair +BuiltinFunctionChecker::checkOverflow(CheckerContext &C, SVal RetVal, + QualType Res) const { + ProgramStateRef State = C.getState(); + SValBu

[clang] [Clang] Fix handling of placeholder variables name in init captures (PR #107055)

2024-09-03 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/107055 >From 18c11cbf5a3768f03234df2ec2bdd79d5e971f55 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 3 Sep 2024 09:52:55 +0200 Subject: [PATCH 1/2] [Clang] Fix handling of placeholder variables name in init

<    1   2   3   4   5   >