[clang] 5c02e74 - Fix use of CXXThisScopeRAII

2025-03-12 Thread via cfe-commits
Author: erichkeane Date: 2025-03-12T08:19:21-07:00 New Revision: 5c02e74d21fdec44fa9c3a8b45ef60e5b433bf71 URL: https://github.com/llvm/llvm-project/commit/5c02e74d21fdec44fa9c3a8b45ef60e5b433bf71 DIFF: https://github.com/llvm/llvm-project/commit/5c02e74d21fdec44fa9c3a8b45ef60e5b433bf71.diff LO

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-03-12 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja closed https://github.com/llvm/llvm-project/pull/127568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Owen Pan via cfe-commits
@@ -3185,6 +3185,53 @@ TEST_F(TokenAnnotatorTest, UnderstandsAttributes) { EXPECT_TOKEN(Tokens[5], tok::r_paren, TT_AttributeRParen); } +TEST_F(TokenAnnotatorTest, UnderstandsNullabilityAttributes) { + auto Tokens = annotate("x = (foo *_Nullable)*v;"); + ASSERT_EQ(Tokens.s

[clang] [clang] Fix a segfault when M is a nullptr (PR #130712)

2025-03-12 Thread via cfe-commits
https://github.com/matts1 updated https://github.com/llvm/llvm-project/pull/130712 >From cf5684b715efd0ac5348c1d17e86ad5afe87b193 Mon Sep 17 00:00:00 2001 From: Matt Stark Date: Mon, 10 Mar 2025 13:07:29 +1100 Subject: [PATCH] [clang] Fix a segfault when M is a nullptr --- clang/include/clang

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Owen Pan via cfe-commits
@@ -3185,6 +3185,53 @@ TEST_F(TokenAnnotatorTest, UnderstandsAttributes) { EXPECT_TOKEN(Tokens[5], tok::r_paren, TT_AttributeRParen); } +TEST_F(TokenAnnotatorTest, UnderstandsNullabilityAttributes) { + auto Tokens = annotate("x = (foo *_Nullable)*v;"); + ASSERT_EQ(Tokens.s

[clang] [clang] Fix a segfault when M is a nullptr (PR #130712)

2025-03-12 Thread via cfe-commits
matts1 wrote: I have a repro, but it may be addressing the symptoms rather than the root cause. AFAICT, a macro should *always* have an associated module (not sure how the implementation works without modules though). However, the root cause of the issue appears to be that in the example I p

[clang] [clang] Fix a segfault when M is a nullptr (PR #130712)

2025-03-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/130712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6abe19a - [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (#127568)

2025-03-12 Thread via cfe-commits
Author: A. Jiang Date: 2025-03-13T14:02:44+08:00 New Revision: 6abe19ac587d36edf202830cbbceecfd1a55f191 URL: https://github.com/llvm/llvm-project/commit/6abe19ac587d36edf202830cbbceecfd1a55f191 DIFF: https://github.com/llvm/llvm-project/commit/6abe19ac587d36edf202830cbbceecfd1a55f191.diff LOG:

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcibi (Branch Immediate) extension (PR #130779)

2025-03-12 Thread via cfe-commits
https://github.com/hchandel updated https://github.com/llvm/llvm-project/pull/130779 >From ed67e38e0e2d8dbdf67bd2e5123b49f3271e9e58 Mon Sep 17 00:00:00 2001 From: Harsh Chandel Date: Tue, 11 Mar 2025 13:01:34 +0530 Subject: [PATCH 1/3] [RISCV] Add Qualcomm uC Xqcibi (Branch Immediate) extensio

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Owen Pan via cfe-commits
@@ -3185,6 +3185,53 @@ TEST_F(TokenAnnotatorTest, UnderstandsAttributes) { EXPECT_TOKEN(Tokens[5], tok::r_paren, TT_AttributeRParen); } +TEST_F(TokenAnnotatorTest, UnderstandsNullabilityAttributes) { + auto Tokens = annotate("x = (foo *_Nullable)*v;"); + ASSERT_EQ(Tokens.s

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Owen Pan via cfe-commits
@@ -3185,6 +3185,53 @@ TEST_F(TokenAnnotatorTest, UnderstandsAttributes) { EXPECT_TOKEN(Tokens[5], tok::r_paren, TT_AttributeRParen); } +TEST_F(TokenAnnotatorTest, UnderstandsNullabilityAttributes) { + auto Tokens = annotate("x = (foo *_Nullable)*v;"); + ASSERT_EQ(Tokens.s

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/130346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. Loods good otherwise. https://github.com/llvm/llvm-project/pull/130346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (PR #130554)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for all the reviews! https://github.com/llvm/llvm-project/pull/130554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] be9ca85 - [alpha.webkit.webkit.RetainPtrCtorAdoptChecker] Add a new WebKit checker for correct use of RetainPtr, adoptNS, and adoptCF (#128679)

2025-03-12 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-12T19:09:05-07:00 New Revision: be9ca85d64eb5b2d7b13d7c6154055ae97092d1e URL: https://github.com/llvm/llvm-project/commit/be9ca85d64eb5b2d7b13d7c6154055ae97092d1e DIFF: https://github.com/llvm/llvm-project/commit/be9ca85d64eb5b2d7b13d7c6154055ae97092d1e.diff

[clang] [libc] [llvm] Reapply "[AMDGPU] Use COV6 by default (#118515)" (PR #130963)

2025-03-12 Thread Matt Arsenault via cfe-commits
arsenm wrote: > The OpenMP runtime doesn't know how to handle `generic` ISAs right? I don't understand why that is tied to the version https://github.com/llvm/llvm-project/pull/130963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-12 Thread via cfe-commits
darkbuck wrote: This patch is to fix the build failure once CIR is enabled. The error reads like ``` llvm-project/llvm/../mlir/include/mlir/IR/Location.h:145:10: fatal error: mlir/IR/BuiltinLocationAttributes.h.inc: No such file or directory ``` https://github.com/llvm/llvm-project/pull/131057

[clang] [webkit.UncountedLambdaCapturesChecker] Recognize std::move(protectedThis) (PR #130925)

2025-03-12 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/130925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Andy Kaylor via cfe-commits
@@ -33,6 +33,14 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("NYI: PPC double-double format for long double"); llvm_unreachable("Unsupported format for long double"); } + + bool isSized(mlir::Type ty) { +if (mlir::isa(ty)) + r

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat an explicit construction of Ref from a Ref return value safe. (PR #130911)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/130911 >From 6eefb934996532201cc3f137931e3cb140bf25c1 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 12 Mar 2025 00:11:14 -0700 Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Treat an explicit cons

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 2 nits, else LGTM. https://github.com/llvm/llvm-project/pull/130869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/130869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/121044 >From 77537d523bc164a86b46e83651500a4b37c0c3bf Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 24 Dec 2024 13:06:44 +0800 Subject: [PATCH 1/2] Reapply "[Clang] Improve diagnostics for expansion length mi

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes This patch reapplies 3a0309c5 "[Clang] Improve diagnostics for expansion length mismatch" and b8a1b698 "[Clang] fix missing initialization of original number of expansions". Both were reverted before the Cl

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread Shafik Yaghmour via cfe-commits
@@ -10921,8 +10921,8 @@ void Sema::CheckConstructor(CXXConstructorDecl *Constructor) { // parameters have default arguments. if (!Constructor->isInvalidDecl() && Constructor->hasOneParamOrDefaultArgs() && - Constructor->getTemplateSpecializationKind() != -

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/121044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/121044 >From 77537d523bc164a86b46e83651500a4b37c0c3bf Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 24 Dec 2024 13:06:44 +0800 Subject: [PATCH] Reapply "[Clang] Improve diagnostics for expansion length mismat

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-12 Thread Daniel Chen via cfe-commits
@@ -1345,7 +1345,16 @@ void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args, if (AsNeeded) addAsNeededOption(TC, Args, CmdArgs, /*as_needed=*/false); } -CmdArgs.push_back("-lflang_rt.runtime"); +if (TC.getTriple().isOSAIX()) { +

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 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 c2ed840ed94d3412c7c0bdd9ed84cac6fe0afb57 790d151975c9ce4f5f823484d100d9460077b971 --e

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
github-actions[bot] wrote: @Megan0704-1 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bu

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/130866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fe0d3e3 - [Sema] Diagnose by-value copy constructors in template instantiations (#130866)

2025-03-12 Thread via cfe-commits
Author: Kuo, Mei-Chun Date: 2025-03-13T05:52:42+01:00 New Revision: fe0d3e3764961b62f43f1b129f30aaec5f30bc16 URL: https://github.com/llvm/llvm-project/commit/fe0d3e3764961b62f43f1b129f30aaec5f30bc16 DIFF: https://github.com/llvm/llvm-project/commit/fe0d3e3764961b62f43f1b129f30aaec5f30bc16.diff

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-12 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/131057 >From 2a86c00614aed22f409c262dcb076f018e1fbbde Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Tue, 4 Mar 2025 12:47:24 -0500 Subject: [PATCH] [clang][CIR] Add missing dependency on MLIR headers --- clang/l

[clang] [alpha.webkit.webkit.RetainPtrCtorAdoptChecker] Add a new WebKit checker for correct use of RetainPtr, adoptNS, and adoptCF (PR #128679)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/128679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][PowerPC] cleaned dead code of PPC.cpp and PPC.h (PR #130994)

2025-03-12 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/130994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #131064)

2025-03-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/131064 None >From ce858bc0761b0cd7410ccb0858a4bc692933dbd5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 12 Mar 2025 08:52:05 -0700 Subject: [PATCH] [AST] Avoid repeated hash lookups (NFC) --- clang/l

[clang] [Clang][NFC] Add test for CWG2289 "Uniqueness of structured binding names" (PR #131054)

2025-03-12 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis created https://github.com/llvm/llvm-project/pull/131054 The resolution of [CWG2289](https://wg21.link/cwg2289) added that the name of a structured binding must be unique in its declarative region, and was implemented in https://github.com/llvm/llvm-project/commit/bdb

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-12 Thread Deric C. via cfe-commits
https://github.com/Icohedron created https://github.com/llvm/llvm-project/pull/131070 Fixes #112270 Completed ACs: - `-res-may-alias` clang-dxc command-line option added - Shader flag set appropriately: - CASE 1: command-line option -res-may-alias is NOT specified AND DXIL Version > 1.7 AND

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-12 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/131070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #131065)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131065.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaOpenACCClause.cpp (+3-3) ``diff diff --git a/clang/lib/Sema/SemaOpen

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #131064)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131064.diff 1 Files Affected: - (modified) clang/lib/AST/ASTImporter.cpp (+4-5) ``diff diff --git a/clang/lib/AST/ASTImporter.cpp

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #131065)

2025-03-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/131065 None >From fa3d28370a754d75ef18c419c2fd66185e5f1302 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 12 Mar 2025 08:55:12 -0700 Subject: [PATCH] [Sema] Avoid repeated hash lookups (NFC) --- clang/

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: None (darkbuck) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131057.diff 2 Files Affected: - (modified) clang/lib/CIR/FrontendAction/CMakeLists.txt (+3) - (modified) clang/lib/FrontendTool/CMakeLists.txt (+5)

[clang] [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (PR #130554)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/130554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4dcba5e - [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (#130554)

2025-03-12 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-12T20:21:22-07:00 New Revision: 4dcba5e08dc9cf2e5ec3f0df682f8ecc88e815be URL: https://github.com/llvm/llvm-project/commit/4dcba5e08dc9cf2e5ec3f0df682f8ecc88e815be DIFF: https://github.com/llvm/llvm-project/commit/4dcba5e08dc9cf2e5ec3f0df682f8ecc88e815be.diff

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (darkbuck) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131057.diff 2 Files Affected: - (modified) clang/lib/CIR/FrontendAction/CMakeLists.txt (+3) - (modified) clang/lib/FrontendTool/CMakeLists.txt (+5) ``

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-12 Thread via cfe-commits
https://github.com/darkbuck created https://github.com/llvm/llvm-project/pull/131057 None >From 2a86c00614aed22f409c262dcb076f018e1fbbde Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Tue, 4 Mar 2025 12:47:24 -0500 Subject: [PATCH] [clang][CIR] Add missing dependency on MLIR headers --- c

[clang] 4d8070e - [C++20] [Modules] Don't add decls from other units to undefinedButUsed set

2025-03-12 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-03-13T11:02:57+08:00 New Revision: 4d8070e9560269494654bd21a2b0c342f4bdae48 URL: https://github.com/llvm/llvm-project/commit/4d8070e9560269494654bd21a2b0c342f4bdae48 DIFF: https://github.com/llvm/llvm-project/commit/4d8070e9560269494654bd21a2b0c342f4bdae48.diff LO

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/130690 >From a945e21869e5276c66ac979acd893d9bd9afe2cc Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Mon, 10 Mar 2025 16:18:34 -0700 Subject: [PATCH 1/4] [CIR] Upstream CastOp and scalar conversions This patch upstrea

[clang] [Clang][NFC] Add test for CWG2289 "Uniqueness of structured binding names" (PR #131054)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yanzuo Liu (zwuis) Changes The resolution of [CWG2289](https://wg21.link/cwg2289) added that the name of a structured binding must be unique in its declarative region, and was implemented in https://github.com/llvm/llvm-project/commit/bd

[clang] [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #130990)

2025-03-12 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/130990 >From ea0d82d48d7a28467dc4e945314b57bc2b63085c Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Thu, 13 Mar 2025 00:39:09 +0800 Subject: [PATCH 1/3] [Clang][CodeGen][UBSan] Add pre-commit tests. NFC. --- cla

[clang] [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (PR #130554)

2025-03-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/130554 >From d2edd9b5fd188476e59790c333497516933532bb Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 9 Mar 2025 23:06:33 -0700 Subject: [PATCH 1/3] [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for

[clang] [alpha.webkit.webkit.RetainPtrCtorAdoptChecker] Add a new WebKit checker for correct use of RetainPtr, adoptNS, and adoptCF (PR #128679)

2025-03-12 Thread Rashmi Mudduluru via cfe-commits
@@ -3760,6 +3760,26 @@ Here are some examples of situations that we warn about as they *might* be poten NSObject* unretained = retained.get(); // warn } +webkit.RetainPtrCtorAdoptChecker + +The goal of this rule is to make sure the co

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-12 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > I'd still prefer to get this right for all address-spaces, so we don't need > to revisit later. Sentinel pointer value support for non-0 address spaces is still work in progress: https://github.com/llvm/llvm-project/pull/83109 I am ok to add a helper like `Address::isConstant

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-12 Thread via cfe-commits
higher-performance wrote: So, this is going to sound very silly, but it seems I may have missed the obvious, and the solution may have been extremely simple: `llvm::SmallPtrSet`, on the return value of `clang::DynTypedNode::getMemoizationData()`. The reason is that the original code only ever

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-12 Thread Alex Sepkowski via cfe-commits
https://github.com/alsepkow approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/130910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL] Fix Missing `-fdeclare-opencl-builtins` When Using `--save-temps` (PR #131017)

2025-03-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Yeah these are implemented in bitcode file, therefore it needs the front end > to be able to recognize it instead of treating it as an unknown symbol. In a normal world they would just be in a header and then the library would get linked in later. https://github.com/llvm/llvm

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -33,6 +33,14 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("NYI: PPC double-double format for long double"); llvm_unreachable("Unsupported format for long double"); } + + bool isSized(mlir::Type ty) { +if (mlir::isa(ty)) + r

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-12 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/129934 >From 6966e56ddfd9a8c8e6a96b2ec6d977a0b7372ad6 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Wed, 5 Mar 2025 15:49:06 -0500 Subject: [PATCH] Reduce memory usage in AST parent map generation

[clang] [Fuchsia] Add llc to toolchain (PR #130999)

2025-03-12 Thread Petr Hosek via cfe-commits
petrhosek wrote: Can you check the toolchain binary size increase? Is `llc` included in the `llvm` binary? https://github.com/llvm/llvm-project/pull/130999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 nit, else LGTM. https://github.com/llvm/llvm-project/pull/130502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1,7 +1,9 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir // RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR -// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +template +struct A{ +A(); +A(A&); +A(A); // expected-error{{copy constructor must pass its first argument by reference}} +}; + +void f() { +A a = A(); // expected-note{{in instantiation of template

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-12 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: This is what I would like to do more generally, not just for AIX. This PR however will break using a shared library libflang_rt.runtime.so. Ideally, we would synchronize with the compiler-rt implementation which already has many supporting functions su

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-12 Thread Michael Kruse via cfe-commits
@@ -1345,7 +1345,16 @@ void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args, if (AsNeeded) addAsNeededOption(TC, Args, CmdArgs, /*as_needed=*/false); } -CmdArgs.push_back("-lflang_rt.runtime"); +if (TC.getTriple().isOSAIX()) { +

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,20 +89,259 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -55,10 +55,154 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s, if (mlir::succeeded(emitSimpleStmt(s, useCurrentScope))) return mlir::success(); - // Only a subset of simple statements are supported at the moment. When more - // kinds of statements ar

[clang] [Clang][NFCI] Remove CallExpr::CreateTemporary() (PR #130921)

2025-03-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/130921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130989 >From cd0b9a8b878c4ecd929552c836f3d4665e926ef4 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 12 Mar 2025 09:37:27 -0700 Subject: [PATCH 1/2] [Support] Introduce new `AdvisoryLock` interface This PR

[clang] [clang][NFCI] Fix getGridValues for unsupported targets (PR #131023)

2025-03-12 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/131023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2025-03-12 Thread Ethan Luis McDonough via cfe-commits
@@ -152,7 +152,7 @@ INSTR_PROF_VALUE_NODE(PtrToNodeT, llvm::PointerType::getUnqual(Ctx), Next, \ #define INSTR_PROF_DATA_DEFINED #endif INSTR_PROF_RAW_HEADER(uint64_t, Magic, __llvm_profile_get_magic()) -INSTR_PROF_RAW_HEADER(uint64_t, Version, __llvm_profile_get_version()) +I

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,24 +89,279 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-12 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129408 >From 8995f2517be1235e01cd68d0d68199505b8ffaad Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 19:22:25 -0500 Subject: [PATCH] [clang-tidy] detect explicit casting within modernize-use-defau

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,20 +89,259 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-12 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129408 >From a06de0100d34d3f18b8eca690161b3720620f4af Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 19:22:25 -0500 Subject: [PATCH] [clang-tidy] detect explicit casting within modernize-use-defau

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-12 Thread via cfe-commits
@@ -156,7 +156,8 @@ Changes in existing checks - Improved :doc:`modernize-use-default-member-init ` check by matching - ``constexpr`` and ``static`` values on member initialization. + ``constexpr`` and ``static``` values on member initialization and by detecting explicit

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-12 Thread David Rivera via cfe-commits
@@ -158,6 +158,10 @@ Changes in existing checks ` check by matching ``constexpr`` and ``static`` values on member initialization. +- Improved :doc:`modernize-use-default-member-init + ` check by detecting + explicit casting of built-in types within member list initializa

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Morris Hafner via cfe-commits
@@ -121,29 +375,174 @@ mlir::Value CIRGenFunction::emitScalarExpr(const Expr *e) { return ScalarExprEmitter(*this, builder).Visit(const_cast(e)); } +[[maybe_unused]] static bool MustVisitNullValue(const Expr *e) { + // If a null pointer expression's type is the C++0x nullp

[clang] [llvm] [VectorCombine] Shrink loads used in shufflevector rebroadcasts (PR #128938)

2025-03-12 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/128938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-12 Thread IƱaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria closed https://github.com/llvm/llvm-project/pull/130268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Refactoring HLSLExternalSemaSource (PR #131032)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/131032 Moving builder classes into separate files `HLSLBuiltinTypeDeclBuilder.cpp`/`.h` and changing a some `HLSLExternalSemaSource` methods to private. This is a prep work before we start adding more builtin types an

[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Kaitlin Peng (kmpeng) Changes Fixes #131024. - Fixes template for scalar and vector `fmod` intrinsic overloads - Fixes `fmod` Sema test --- Full diff: https://github.com/llvm/llvm-project/pull/131035.diff 3 Files Affected: - (modified) c

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-03-12 Thread Ziqing Luo via cfe-commits
@@ -186,106 +212,193 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void setASTContext(ASTContext &Context) { ActiveASTContext = &Context; } + + void setHandler(const UnsafeBufferUsageHa

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/130909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 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 202137dbead88004c956595106ab6d80d597508c 18163c0e0de0704e95392166532011b0e63ea95f --e

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-03-12 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/130869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kaitlin Peng (kmpeng) Changes Fixes #131024. - Fixes template for scalar and vector `fmod` intrinsic overloads - Fixes `fmod` Sema test --- Full diff: https://github.com/llvm/llvm-project/pull/131035.diff 3 Files Affected: - (modified)

[clang] [clang][NFCI] Fix getGridValues for unsupported targets (PR #131023)

2025-03-12 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/131023 >From 700cedcb1e2c241452f34177d1a597c3d3386e9d Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 12 Mar 2025 13:27:56 -0700 Subject: [PATCH] [clang][NFCI] Fix getGridValues for unsupported targets Signed-

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/130502 >From 0b00b1b477f7d81220350669ecb43f87d2667a6d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 9 Mar 2025 19:14:34 +0100 Subject: [PATCH 1/6] [CIR] Upstream basic support for ArrayType --- clang/in

[clang] 64b9410 - [CIR] Upstream support for emitting ignored statements (#130869)

2025-03-12 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-03-12T14:38:19-07:00 New Revision: 64b94105d5c7a1a578dc2fb846747411686b666b URL: https://github.com/llvm/llvm-project/commit/64b94105d5c7a1a578dc2fb846747411686b666b DIFF: https://github.com/llvm/llvm-project/commit/64b94105d5c7a1a578dc2fb846747411686b666b.diff L

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/130502 >From 0b00b1b477f7d81220350669ecb43f87d2667a6d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 9 Mar 2025 19:14:34 +0100 Subject: [PATCH 1/6] [CIR] Upstream basic support for ArrayType --- clang/in

[clang] 0359677 - [Driver] Avoid repeated hash lookups (NFC) (#130888)

2025-03-12 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-03-12T08:47:11-07:00 New Revision: 0359677695a741dcf8e26adee692a0dd285fcb91 URL: https://github.com/llvm/llvm-project/commit/0359677695a741dcf8e26adee692a0dd285fcb91 DIFF: https://github.com/llvm/llvm-project/commit/0359677695a741dcf8e26adee692a0dd285fcb91.diff L

[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)

2025-03-12 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng created https://github.com/llvm/llvm-project/pull/131035 Fixes #131024. - Fixes template for scalar and vector `fmod` intrinsic overloads - Fixes `fmod` Sema test >From b33ab9d6a3c87c59ca9b2d3e8e5001f1d79bb620 Mon Sep 17 00:00:00 2001 From: kmpeng Date: Tue, 11 Mar 20

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-12 Thread Alan Zhao via cfe-commits
@@ -39,19 +39,20 @@ Timer *getPassTimer(Pass *); /// This class implements -time-passes functionality for new pass manager. /// It provides the pass-instrumentation callbacks that measure the pass /// execution time. They collect timing info into individual timers as -/// passe

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,24 +89,279 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -84,26 +96,266 @@ class ScalarExprEmitter : public StmtVisitor { } mlir::Value VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *e) { -mlir::Type type = cgf.convertType(e->getType()); +mlir::Type type = convertType(e->getType()); return builder.create(

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,24 +89,279 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,24 +89,279 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -78,6 +78,156 @@ class LLVMLoweringInfo { class CIR_Op traits = []> : Op, LLVMLoweringInfo; +//===--===// +// CastOp +//===--===// + +

  1   2   3   4   5   6   >