[clang] [llvm] [CodeGen][KCFI] Switch type hash from xxHash64 to FNV-1a (PR #167254)

2025-11-10 Thread Sami Tolvanen via cfe-commits
https://github.com/samitolvanen edited https://github.com/llvm/llvm-project/pull/167254 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeGen][KCFI] Switch type hash from xxHash64 to FNV-1a (PR #167254)

2025-11-10 Thread Sami Tolvanen via cfe-commits
@@ -3186,7 +3186,7 @@ void CodeGenModule::finalizeKCFITypes() { continue; std::string Asm = (".weak __kcfi_typeid_" + Name + "\n.set __kcfi_typeid_" + - Name + ", " + Twine(Type->getZExtValue()) + "\n") + Name + ", " + Twi

[clang] [CIR] Upstream X86 builtin _mm_prefetch and _mm_clflush (PR #167401)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -21,6 +21,48 @@ using namespace clang; using namespace clang::CIRGen; +/// Get integer from a mlir::Value that is an int constant or a constant op. +static int64_t getIntValueFromConstOp(mlir::Value val) { + return val.getDefiningOp().getIntValue().getSExtValue(); +} + +st

[clang] [CIR] Upstream X86 builtin _mm_prefetch and _mm_clflush (PR #167401)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -21,6 +21,48 @@ using namespace clang; using namespace clang::CIRGen; +/// Get integer from a mlir::Value that is an int constant or a constant op. +static int64_t getIntValueFromConstOp(mlir::Value val) { + return val.getDefiningOp().getIntValue().getSExtValue(); +} + +st

[clang] [CIR] Upstream X86 builtin _mm_prefetch and _mm_clflush (PR #167401)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -43,11 +85,28 @@ mlir::Value CIRGenFunction::emitX86BuiltinExpr(unsigned builtinID, // Find out if any arguments are required to be integer constant expressions. assert(!cir::MissingFeatures::handleBuiltinICEArguments()); + // The operands of the builtin call + llvm:

[clang] [CIR] Upstream X86 builtin _mm_prefetch and _mm_clflush (PR #167401)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -21,6 +21,48 @@ using namespace clang; using namespace clang::CIRGen; +/// Get integer from a mlir::Value that is an int constant or a constant op. +static int64_t getIntValueFromConstOp(mlir::Value val) { + return val.getDefiningOp().getIntValue().getSExtValue(); +} + +st

[clang] [CIR] Upstream X86 builtin _mm_prefetch and _mm_clflush (PR #167401)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -1430,6 +1430,28 @@ mlir::Value CIRGenFunction::emitPromotedScalarExpr(const Expr *e, return ScalarExprEmitter(*this, builder).Visit(const_cast(e)); } +mlir::Value CIRGenFunction::emitScalarOrConstFoldImmArg(unsigned ICEArguments, andykaylor wrote: This

[clang] [CIR] Upstream X86 builtin _mm_prefetch and _mm_clflush (PR #167401)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -43,11 +85,28 @@ mlir::Value CIRGenFunction::emitX86BuiltinExpr(unsigned builtinID, // Find out if any arguments are required to be integer constant expressions. assert(!cir::MissingFeatures::handleBuiltinICEArguments()); + // The operands of the builtin call + llvm:

[clang] [CIR] Upstream X86 builtin _mm_prefetch and _mm_clflush (PR #167401)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -21,6 +21,48 @@ using namespace clang; using namespace clang::CIRGen; +/// Get integer from a mlir::Value that is an int constant or a constant op. +static int64_t getIntValueFromConstOp(mlir::Value val) { + return val.getDefiningOp().getIntValue().getSExtValue(); +} + +st

[clang] [CIR] Upstream X86 builtin _mm_prefetch and _mm_clflush (PR #167401)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -2579,6 +2591,39 @@ def CIR_FuncOp : CIR_Op<"func", [ }]; } +//===--===// +// LLVMIntrinsicCallOp +//===--===// + +def CIR_LLVMIntrinsic

[clang] [CIR] Upstream X86 builtin _mm_prefetch and _mm_clflush (PR #167401)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -21,6 +21,48 @@ using namespace clang; using namespace clang::CIRGen; +/// Get integer from a mlir::Value that is an int constant or a constant op. +static int64_t getIntValueFromConstOp(mlir::Value val) { + return val.getDefiningOp().getIntValue().getSExtValue(); +} + +st

[clang] [CIR] Emit promise declaration in coroutine (PR #166683)

2025-11-10 Thread via cfe-commits
@@ -152,6 +152,9 @@ class CIRGenFunction : public CIRGenTypeCache { /// global initializers. mlir::Operation *curFn = nullptr; + /// Save Parameter Decl for coroutine. + llvm::SmallVector fnArgs; Andres-Salamanca wrote: Done. https://github.com/llvm/ll

[clang] [llvm] [MIPS][ISel] Fix musttail (PR #161860)

2025-11-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/161860 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-11-10 Thread Justin Stitt via cfe-commits
JustinStitt wrote: It is my understanding that we cannot have both 1) overloading on OBT and 2) no mangling on OBT. FWIW, our first user of this may very well be the Linux kernel and I don't think they care much about the overloading semantics of OBTs. Personally, I also don't care which way w

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/166491 >From b8f5a005ea3154de73a04798ce9aaf869cee8195 Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Wed, 22 Oct 2025 10:46:46 -0700 Subject: [PATCH 1/4] [BoundsSafety] Support late parsing for `counted_by` in type po

[clang] b4a6151 - [CIR][NFC] Re-land: Add test for Complex imag literal GNU extension (#167383)

2025-11-10 Thread via cfe-commits
Author: Amr Hesham Date: 2025-11-10T22:04:49+01:00 New Revision: b4a61517a64c6e65294e61a23276c87119f73667 URL: https://github.com/llvm/llvm-project/commit/b4a61517a64c6e65294e61a23276c87119f73667 DIFF: https://github.com/llvm/llvm-project/commit/b4a61517a64c6e65294e61a23276c87119f73667.diff LO

[clang] [CIR][NFC] Re-land: Add test for Complex imag literal GNU extension (PR #167383)

2025-11-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/167383 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CXXRewrittenBinaryOperator for Scalar expr (PR #167210)

2025-11-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/167210 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a37c4e0 - [NFC][SpecialCaseList] Hide Section internals in private section (#167276)

2025-11-10 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-11-10T21:03:20Z New Revision: a37c4e0fad5289e5fdd017ea5ac6162d71fb73ae URL: https://github.com/llvm/llvm-project/commit/a37c4e0fad5289e5fdd017ea5ac6162d71fb73ae DIFF: https://github.com/llvm/llvm-project/commit/a37c4e0fad5289e5fdd017ea5ac6162d71fb73ae.diff LOG: [

[clang] [llvm] [clang] Add regalloc PBQP for all targets in clang (PR #166645)

2025-11-10 Thread Ivan Shumakov via cfe-commits
https://github.com/Zararest updated https://github.com/llvm/llvm-project/pull/166645 >From aea70e2df65119377e9d3f732b1850c2ec554618 Mon Sep 17 00:00:00 2001 From: Ivan Shumakov Date: Thu, 6 Nov 2025 00:19:55 +0300 Subject: [PATCH] [clang] Add regalloc PBQP for all targets in clang --- clang/t

[clang] [llvm] [clang] Add regalloc PBQP for all targets in clang (PR #166645)

2025-11-10 Thread Ivan Shumakov via cfe-commits
Zararest wrote: Here are sizes of a clang binary before and after current commit: ``` clang release X86 target: 100391336 bytes -> 100474456 bytes +0.082% ``` https://github.com/llvm/llvm-project/pull/166645 ___ cfe-commits mailing list cfe-commits@l

[clang] [CIR] Upstream Load/Store Complex with volatile qualifier (PR #167216)

2025-11-10 Thread Andy Kaylor via cfe-commits
@@ -1495,3 +1495,52 @@ void calling_function_that_return_complex() { // OGCG: %[[A_IMAG_PTR:.*]] = getelementptr inbounds nuw { float, float }, ptr %[[A_ADDR]], i32 0, i32 1 // OGCG: store float %[[RESULT_REAL]], ptr %[[A_REAL_PTR]], align 4 // OGCG: store float %[[RESULT_IMAG

[clang] [CIR] Upstream Load/Store Complex with volatile qualifier (PR #167216)

2025-11-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/167216 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Load/Store Complex with volatile qualifier (PR #167216)

2025-11-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm with a request for expanding the test https://github.com/llvm/llvm-project/pull/167216 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinf

[clang-tools-extra] [clang-tidy][NFC] Enable "HeaderFilterRegex" in clang-tidy codebase (PR #167020)

2025-11-10 Thread Baranov Victor via cfe-commits
vbvictor wrote: I think we can proceed to merge "as is" given CMake changes will take time to be merged, and they won't fix the whole problem. WDYT? https://github.com/llvm/llvm-project/pull/167020 ___ cfe-commits mailing list [email protected].

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/166491 >From 1f6e6d16356fb3381c0ed39152b862fd00469064 Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Wed, 22 Oct 2025 10:46:46 -0700 Subject: [PATCH 1/4] [BoundsSafety] Support late parsing for `counted_by` in type po

[clang] [clang][SPIRV] Don't addrspacecast nullptr for function pointer types (PR #167379)

2025-11-10 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/167379 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIRV] Don't addrspacecast nullptr for function pointer types (PR #167379)

2025-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Nick Sarnie (sarnex) Changes According to the [spec](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_function_pointers.asciidoc), it is illegal to addrspacecast to the generic AS , so use the fun

[clang-tools-extra] [clang-tidy][NFC] Enable readability-any-all-of check (PR #167134)

2025-11-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/167134 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIRV] Don't addrspacecast nullptr for function pointer types (PR #167379)

2025-11-10 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/167379 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Re-land: Add test for Complex imag literal GNU extension (PR #167383)

2025-11-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/167383 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Enable readability-any-all-of check (PR #167134)

2025-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Baranov Victor (vbvictor) Changes Made entirely by [Claude Code](https://www.claude.com/product/claude-code) (AI) Closes https://github.com/llvm/llvm-project/issues/156161. --- Patch is 25.21 KiB, truncated to 20.00 KiB below,

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/166491 >From 26f87785e6f469ecfc121055b86f60d70c9100a6 Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Wed, 22 Oct 2025 10:46:46 -0700 Subject: [PATCH 1/4] [BoundsSafety] Support late parsing for `counted_by` in type po

[clang-tools-extra] [clang-tidy][NFC] Enable readability-any-all-of check (PR #167134)

2025-11-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor ready_for_review https://github.com/llvm/llvm-project/pull/167134 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Enable readability-any-all-of check (PR #167134)

2025-11-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/167134 >From bb85bacbb735e16a6a75431d7ae24c743a617612 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 8 Nov 2025 15:20:50 +0300 Subject: [PATCH 1/2] [clang-tidy][NFC] Enable readability-any-all-of check ---

[clang-tools-extra] [clang-tidy][NFC] Enable readability-any-all-of check (PR #167134)

2025-11-10 Thread Baranov Victor via cfe-commits
@@ -48,14 +48,15 @@ AST_MATCHER(CXXRecordDecl, correctHandleCaptureThisLambda) { if (C->isCopyOrMoveConstructor() && C->isDefaulted() && !C->isDeleted()) return false; } - for (const CXXMethodDecl *M : Node.methods()) { -if (M->isCopyAssignmentOperator()) -

[clang] [llvm] [OMPIRBuilder] Use AS 0 for internal variables for AMDGPU (PR #167377)

2025-11-10 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/167377 We see some libomptarget test failures if we use the default global as. See https://github.com/llvm/llvm-project/pull/166459 for more info. >From f7a33567745492b03bb1a53c2cf61c4db1364cc3 Mon Sep 17 00:00:00 2001

[clang] Revert "[CIR][NFC] Add test for Complex imag with GUN extension" (PR #167373)

2025-11-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/167373 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 70a6475 - Revert "[CIR][NFC] Add test for Complex imag with GUN extension" (#167373)

2025-11-10 Thread via cfe-commits
Author: Amr Hesham Date: 2025-11-10T19:49:02Z New Revision: 70a6475fdd6cb80e9c4f0fa3c523ab806dfeb46b URL: https://github.com/llvm/llvm-project/commit/70a6475fdd6cb80e9c4f0fa3c523ab806dfeb46b DIFF: https://github.com/llvm/llvm-project/commit/70a6475fdd6cb80e9c4f0fa3c523ab806dfeb46b.diff LOG: Re

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Refactor option-related code from clangDriver into new clangOptions library (PR #163659)

2025-11-10 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/163659 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [LFI] Introduce AArch64 LFI Target (PR #167061)

2025-11-10 Thread Zachary Yedidia via cfe-commits
https://github.com/zyedidia updated https://github.com/llvm/llvm-project/pull/167061 >From 9ca2065bc60b13f54504251dbb32e3b0784feb85 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Mon, 20 Oct 2025 13:19:32 -0700 Subject: [PATCH 1/7] [LFI] Add aarch64_lfi subtarget --- llvm/include/llvm/T

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Refactor option-related code from clangDriver into new clangOptions library (PR #163659)

2025-11-10 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/163659 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add fine-graded configuration for 'bugprone-exception-escape' (PR #164081)

2025-11-10 Thread Victor Chernyakin via cfe-commits
@@ -35,6 +35,31 @@ WARNING! This check may be expensive on large source files. Options --- +.. option:: CheckDestructors + + When `true`, destructors are analyzed to not throw exceptions. + Default value is `true`. + +.. option:: CheckMoveMemberFunctions + + When `tr

[clang] [clang] Fix possible nullptr deref in BuildCXXNestedNameSpecifier (PR #166995)

2025-11-10 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only %s -verify +namespace a { +template +void c() { + ((::c::)); // expected-error {{expected unqualified-id}} ilovepi wrote: @efriedma-quic does the new version work the way you'd expect it to? I'd like to get thi

[clang] [CIR] Handle scalar DerivedToBase cast expressions (PR #167370)

2025-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds handling in CIR's ScalarExprEmitter for CK_DerivedToBase cast expressions. --- Full diff: https://github.com/llvm/llvm-project/pull/167370.diff 6 Files Affected: - (modified) clang/include/cla

[clang] [CIR] Handle scalar DerivedToBase cast expressions (PR #167370)

2025-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This adds handling in CIR's ScalarExprEmitter for CK_DerivedToBase cast expressions. --- Full diff: https://github.com/llvm/llvm-project/pull/167370.diff 6 Files Affected: - (modified) clang/include/c

[clang] [llvm] [NFC][SpecialCaseList] Precommit Version 4 tests (PR #167282)

2025-11-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka auto_merge_enabled https://github.com/llvm/llvm-project/pull/167282 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][SpecialCaseList] Precommit Version 4 tests (PR #167282)

2025-11-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/167282 >From 493a5902c3b68a5bc895889290be87e8217b639e Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Sun, 9 Nov 2025 23:20:17 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?U

[clang] [CIR] Handle scalar DerivedToBase cast expressions (PR #167370)

2025-11-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/167370 This adds handling in CIR's ScalarExprEmitter for CK_DerivedToBase cast expressions. >From 719dfa81f765367f7de62933f4e983ba636d5328 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 7 Nov 2025 15:36:49

[clang] [X86] _mm_addsub_pd is not valid for constexpr (PR #167363)

2025-11-10 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/167363 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Issue #61157 (PR #167319)

2025-11-10 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 origin/main HEAD --extensions cpp -- clang/lib/ExtractAPI/DeclarationFragments.cpp --

[clang] e9d3340 - [X86] _mm_addsub_pd is not valid for constexpr (#167363)

2025-11-10 Thread via cfe-commits
Author: Simon Pilgrim Date: 2025-11-10T18:56:13Z New Revision: e9d3340b57494091cf77130d3f7cc03fbe9ccbd6 URL: https://github.com/llvm/llvm-project/commit/e9d3340b57494091cf77130d3f7cc03fbe9ccbd6 DIFF: https://github.com/llvm/llvm-project/commit/e9d3340b57494091cf77130d3f7cc03fbe9ccbd6.diff LOG:

[clang] [llvm] [NFC][SpecialCaseList] Precommit Version 4 tests (PR #167282)

2025-11-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/167282 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Re-land: Recognize constant aggregate initialization of auto vars (PR #167033)

2025-11-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/167033 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
@@ -107,106 +107,81 @@ struct on_pointer_anon_count { // field being unavailable. struct on_member_pointer_complete_ty_ty_pos { - // TODO: Allow this - // expected-error@+1{{use of undeclared identifier 'size'}} struct size_known *__sized_by(size) buf; int size; };

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/166491 >From f0ec14089464ef30a08f9d0646a3b0b7a4fdf5f0 Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Wed, 22 Oct 2025 10:46:46 -0700 Subject: [PATCH 1/3] [BoundsSafety] Support late parsing for `counted_by` in type po

[clang] [inline-asm] Fixed issue no. 164973 (PR #167316)

2025-11-10 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,23 @@ +/// Test that inline asm source location corresponds to the actual +/// instruction line, not the first line of the asm block. +/// +/// RUN: not %clang_cc1 -triple x86_64-pc-linux-gnu -emit-obj %s 2>&1 | FileCheck %s efriedma-quic wrote: Pleas

[clang] [inline-asm] Fixed issue no. 164973 (PR #167316)

2025-11-10 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,23 @@ +/// Test that inline asm source location corresponds to the actual +/// instruction line, not the first line of the asm block. +/// +/// RUN: not %clang_cc1 -triple x86_64-pc-linux-gnu -emit-obj %s 2>&1 | FileCheck %s + +// #include +// #include --

[clang] [inline-asm] Fixed issue no. 164973 (PR #167316)

2025-11-10 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,23 @@ +/// Test that inline asm source location corresponds to the actual +/// instruction line, not the first line of the asm block. +/// +/// RUN: not %clang_cc1 -triple x86_64-pc-linux-gnu -emit-obj %s 2>&1 | FileCheck %s + +// #include +// #include + +void *memse

[clang] [inline-asm] Fixed issue no. 164973 (PR #167316)

2025-11-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Please fix the title to explain what you're fixing. It's good to put something like "Fixes #164973" somewhere, but not the title/first line. https://github.com/llvm/llvm-project/pull/167316 ___ cfe-commit

[clang] [inline-asm] Fixed issue no. 164973 (PR #167316)

2025-11-10 Thread Eli Friedman via cfe-commits
@@ -2572,24 +2572,49 @@ CodeGenFunction::EmitAsmInput(const TargetInfo::ConstraintInfo &Info, static llvm::MDNode *getAsmSrcLocInfo(const StringLiteral *Str, CodeGenFunction &CGF) { SmallVector Locs; + + // We need these to find the cor

[clang] [inline-asm] Fixed issue no. 164973 (PR #167316)

2025-11-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/167316 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
@@ -2457,8 +2457,8 @@ class Sema final : public SemaBase { /// `counted_by_or_null` attribute. /// /// \returns false iff semantically valid. - bool CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, - bool OrNull); + bo

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
@@ -6447,21 +6472,33 @@ void Parser::ParseDeclaratorInternal(Declarator &D, ((D.getContext() != DeclaratorContext::CXXNew) ? AR_GNUAttributesParsed : AR_GNUAttributesParsedAndRejected); +LateParsedAttrLis

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
@@ -1238,6 +1238,9 @@ struct DeclaratorChunk { ParsedAttributesView AttrList; + using LateAttrListTy = SmallVector; rapidsna wrote: Sounds good. I just added comment and a type alias which was needed for `ArrayRef` anyway! https://github.com/llvm/llvm-p

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
@@ -102,111 +102,83 @@ struct on_pointer_anon_count { //== // __sized_by_or_null on struct member pointer in type attribute position //=

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 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 origin/main HEAD --extensions cpp,h,c -- clang/test/Sema/attr-bounds-safety-function-

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
@@ -107,106 +107,81 @@ struct on_pointer_anon_count { // field being unavailable. struct on_member_pointer_complete_ty_ty_pos { - // TODO: Allow this - // expected-error@+1{{use of undeclared identifier 'size'}} struct size_known *__sized_by(size) buf; int size; };

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
@@ -6447,21 +6472,33 @@ void Parser::ParseDeclaratorInternal(Declarator &D, ((D.getContext() != DeclaratorContext::CXXNew) ? AR_GNUAttributesParsed : AR_GNUAttributesParsedAndRejected); +LateParsedAttrLis

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
@@ -2325,13 +2328,16 @@ class Declarator { /// This function takes attrs by R-Value reference because it takes ownership /// of those attributes from the parameter. void AddTypeInfo(const DeclaratorChunk &TI, ParsedAttributes &&attrs, - SourceLocation En

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-10 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/166491 >From f0ec14089464ef30a08f9d0646a3b0b7a4fdf5f0 Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Wed, 22 Oct 2025 10:46:46 -0700 Subject: [PATCH 1/2] [BoundsSafety] Support late parsing for `counted_by` in type po

[clang] [OpenCL] Support for inline asm (PR #165214)

2025-11-10 Thread Hongyu Chen via cfe-commits
XChy wrote: @whisperity, do you have other review advice? https://github.com/llvm/llvm-project/pull/165214 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [inline-asm] Fixed issue no. 164973 (PR #167316)

2025-11-10 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 origin/main HEAD --extensions c,cpp -- clang/test/CodeGen/asm-srcloc-split-literal.c

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Refactor option-related code from clangDriver into new clangOptions library (PR #163659)

2025-11-10 Thread Nikolay Panchenko via cfe-commits
@@ -15,11 +15,11 @@ #include "clang/Driver/Action.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/InputInfo.h" -#include "clang/Driver/Options.h" #include "clang/Driver/Phases.h" #include "clang/Driver/ToolChain.h" #include "clang/Driver/Types.h" #inclu

[clang] [CIR] Upstream isfpclass op (PR #166037)

2025-11-10 Thread Jasmine Tang via cfe-commits
https://github.com/badumbatish updated https://github.com/llvm/llvm-project/pull/166037 >From 3ab831e2335304bf83c076d07bb233697708d4d6 Mon Sep 17 00:00:00 2001 From: Jasmine Tang Date: Sat, 1 Nov 2025 20:32:55 -0700 Subject: [PATCH] Initial implementation for isfpclass and related builtins Add

[clang] [llvm] [mlir] [Draft][LLVM] Refine MemoryEffect handling for target-specific intrinsics (PR #155590)

2025-11-10 Thread via cfe-commits
https://github.com/CarolineConcatto edited https://github.com/llvm/llvm-project/pull/155590 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Draft][LLVM] Refine MemoryEffect handling for target-specific intrinsics (PR #155590)

2025-11-10 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/155590 >From a7d85cba060d841064e9c6fd959ac1642bb1a18e Mon Sep 17 00:00:00 2001 From: CarolineConcatto Date: Tue, 1 Jul 2025 11:48:55 + Subject: [PATCH 1/2] [RFC][Draft] Extend MemoryEffects to Support Tar

[clang] [X86] _mm_addsub_pd is not valid for constexpr (PR #167363)

2025-11-10 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 origin/main HEAD --extensions h -- clang/lib/Headers/pmmintrin.h --diff_from_common_c

[clang] [X86] _mm_addsub_pd is not valid for constexpr (PR #167363)

2025-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Simon Pilgrim (RKSimon) Changes Typo in #156822 Part of #166814 --- Full diff: https://github.com/llvm/llvm-project/pull/167363.diff 1 Files Affected: - (modified) clang/lib/Headers/pmmintrin.h (+1-1) ``diff diff --git

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-10 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,10 @@ +// Reduced from https://github.com/llvm/llvm-project/issues/166512 +// RUN: %clang_cc1 %s -emit-obj -std=c23 -fsanitize=bool -o %t efriedma-quic wrote: I'd prefer to have a test that actually checks that we generate correct code, not just that

[clang] [X86] _mm_addsub_pd is not valid for constexpr (PR #167363)

2025-11-10 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/167363 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] _mm_addsub_pd is not valid for constexpr (PR #167363)

2025-11-10 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/167363 Typo in #156822 Part of #166814 >From 8b638c64e6fdb84147f35614e55b9588bafa80b8 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 10 Nov 2025 18:28:58 + Subject: [PATCH] [X86] _mm_addsub_pd is not val

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Refactor option-related code from clangDriver into new clangOptions library (PR #163659)

2025-11-10 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth edited https://github.com/llvm/llvm-project/pull/163659 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add internal linkage attribute to resources (PR #166844)

2025-11-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/166844 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6d18313 - [HLSL] Add internal linkage attribute to resources (#166844)

2025-11-10 Thread via cfe-commits
Author: Helena Kotas Date: 2025-11-10T10:25:59-08:00 New Revision: 6d1831361fad0df0b1a36e4ff028de54cb05a6bb URL: https://github.com/llvm/llvm-project/commit/6d1831361fad0df0b1a36e4ff028de54cb05a6bb DIFF: https://github.com/llvm/llvm-project/commit/6d1831361fad0df0b1a36e4ff028de54cb05a6bb.diff

[clang] [CodeGen] Remove the check that allowed non-POD compound literals to be directly evaluated into the destination even when it might alias the source (PR #167344)

2025-11-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/167344 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Refactor option-related code from clangDriver into new clangOptions library (PR #163659)

2025-11-10 Thread Naveen Seth Hanig via cfe-commits
@@ -15,11 +15,11 @@ #include "clang/Driver/Action.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/InputInfo.h" -#include "clang/Driver/Options.h" #include "clang/Driver/Phases.h" #include "clang/Driver/ToolChain.h" #include "clang/Driver/Types.h" #inclu

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Refactor option-related code from clangDriver into new clangOptions library (PR #163659)

2025-11-10 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth deleted https://github.com/llvm/llvm-project/pull/163659 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add functionality for inline functions (PR #167135)

2025-11-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: This PR appears to be entirely redundant, duplicating the existing inline handling with a different attribute name. https://github.com/llvm/llvm-project/pull/167135 ___ cfe-commits mailing list cfe-commits@list

[clang] [llvm] [X86][AVX512] rematerialize smaller predicate masks (PR #166178)

2025-11-10 Thread Ahmed Nour via cfe-commits
https://github.com/ahmednoursphinx updated https://github.com/llvm/llvm-project/pull/166178 >From 3cdf74e3eee0e206a3588acb1b4e53fd66eb9517 Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 3 Nov 2025 17:16:29 +0200 Subject: [PATCH 01/11] fix: rematerialize smaller predicate masks --- llvm/lib/T

[clang] [llvm] [HLSL][SPIR-V] Implement vk::push_constant (PR #166793)

2025-11-10 Thread Steven Perron via cfe-commits
@@ -6042,7 +6042,9 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, getCUDARuntime().handleVarRegistration(D, *GV); } - if (LangOpts.HLSL && GetGlobalVarAddressSpace(D) == LangAS::hlsl_input) { + if (LangOpts.HLSL && + (GetGlobalVarAddressSpace(D)

[clang] [llvm] [HLSL][SPIR-V] Implement vk::push_constant (PR #166793)

2025-11-10 Thread Steven Perron via cfe-commits
@@ -3846,6 +3851,7 @@ static bool IsDefaultBufferConstantDecl(VarDecl *VD) { QT.getAddressSpace() == LangAS::Default && VD->getStorageClass() != SC_Static && !VD->hasAttr() && + !VD->hasAttr() && s-perron wrote: I think this

[clang] [llvm] [HLSL][SPIR-V] Implement vk::push_constant (PR #166793)

2025-11-10 Thread Steven Perron via cfe-commits
@@ -6098,7 +6100,9 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, // HLSL variables in the input address space maps like memory-mapped // variables. Even if they are 'static', they are externally initialized and // read/write by the hardware/driver/pipe

[clang] [llvm] [HLSL][SPIR-V] Implement vk::push_constant (PR #166793)

2025-11-10 Thread Steven Perron via cfe-commits
@@ -14552,6 +14552,9 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl) { if (getLangOpts().HLSL && Var->getType().getAddressSpace() == LangAS::hlsl_input) return; +if (getLangOpts().HLSL && +Var->getType().getAddressSpace() == LangAS::hlsl_push_

[clang] [llvm] [X86][AVX512] rematerialize smaller predicate masks (PR #166178)

2025-11-10 Thread Ahmed Nour via cfe-commits
@@ -0,0 +1,159 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx51

[clang] [llvm] [X86][AVX512] rematerialize smaller predicate masks (PR #166178)

2025-11-10 Thread Ahmed Nour via cfe-commits
https://github.com/ahmednoursphinx updated https://github.com/llvm/llvm-project/pull/166178 >From 3cdf74e3eee0e206a3588acb1b4e53fd66eb9517 Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 3 Nov 2025 17:16:29 +0200 Subject: [PATCH 01/11] fix: rematerialize smaller predicate masks --- llvm/lib/T

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-11-10 Thread Eric Xu via cfe-commits
ericxu233 wrote: @RKSimon Ping for status. I've fixed this last review comment. Would this be ready to merge :)? https://github.com/llvm/llvm-project/pull/162295 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/ma

[clang] [Sema] Suggest missing format attributes (PR #166738)

2025-11-10 Thread via cfe-commits
apple-fcloutier wrote: As far as I'm concerned, `-Wmissing-format-attribute` is the subset of `-Wformat-nonliteral` that we can fix it by adding a format attribute. This change is valuable and I want it to land, but I think that we need to close the gaps with -Wformat-nonliteral to make sure w

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Refactor option-related code from clangDriver into new clangOptions library (PR #163659)

2025-11-10 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: > @naveen-seth there's still a reference to `Options.h` in > https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Driver.h#L22 > that makes clang unbuildable. Hmm this is odd. Looking at the git diff here, it should hav

[clang] [CIR] X86 vector fcmp-sse vector builtins (PR #167125)

2025-11-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/167125 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >