[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-09-08 Thread Roger Ferrer Ibáñez via cfe-commits
https://github.com/rofirrim updated https://github.com/llvm/llvm-project/pull/155849 From 365c3c5d18b0c466fee85075d6f6bc3c63267fef Mon Sep 17 00:00:00 2001 From: Roger Ferrer Ibanez Date: Wed, 27 Aug 2025 08:18:02 + Subject: [PATCH] [Clang][OpenMP] Add an additional class to hold data that

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-08 Thread Bhasawut Singhaphan via cfe-commits
@@ -496,9 +496,8 @@ _mm256_andnot_si256(__m256i __a, __m256i __b) /// \param __b ///A 256-bit integer vector. /// \returns A 256-bit integer vector containing the result. -static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_avg_epu8(__m256i __a, __m256i __b) -{ +static

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-08 Thread Victor Chernyakin via cfe-commits
@@ -1,4 +1,7 @@ -// RUN: %check_clang_tidy -std=c++11-or-later %s readability-container-contains %t +// RUN: %check_clang_tidy -std=c++11-or-later %s readability-container-contains %t -- \ localspook wrote: ```suggestion // RUN: %check_clang_tidy %s readability

[clang] [llvm] [mlir] [AArch64][SME] Improve codegen for aarch64.sme.cnts* when not in streaming mode (PR #154761)

2025-09-08 Thread Paul Walker via cfe-commits
@@ -6266,26 +6266,6 @@ SDValue AArch64TargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, case Intrinsic::aarch64_sve_clz: return DAG.getNode(AArch64ISD::CTLZ_MERGE_PASSTHRU, DL, Op.getValueType(), Op.getOperand(2), Op.getOperand(3), Op.getOperand(

[clang] [analyzer] Revert #115918, so empty base class optimization works again (PR #157480)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Tldr; We can't unconditionally trivially copy empty classes because that would clobber the stored entries in the object that the optimized empty class overlaps with. This regression was

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-08 Thread Balázs Kéri via cfe-commits
@@ -379,6 +386,111 @@ void DereferenceChecker::checkBind(SVal L, SVal V, const Stmt *S, C.addTransition(State, this); } +void DereferenceChecker::checkPreStmt(const BinaryOperator *Op, + CheckerContext &C) const { + if (!Op->isAdditiveO

[clang] [analyzer] Revert #115918, so empty base class optimization works again (PR #157480)

2025-09-08 Thread Balazs Benics via cfe-commits
steakhal wrote: > Sounds reasonable. > > I feel a bit guilty that I wasn't able to predict this regression when I > reviewed the reverted commit as "LGTM, clean little patch", but I don't think > that I could've done better without investing drastically more effort into > the review. You act

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -130,13 +143,17 @@ struct BuiltinTypeMethodBuilder { BuiltinTypeMethodBuilder(BuiltinTypeDeclBuilder &DB, DeclarationName &Name, QualType ReturnTy, bool IsConst = false, - bool IsCtor = false) +

[clang] [clang] Restrict -Wnrvo to C++ code only. (PR #157059)

2025-09-08 Thread via cfe-commits
@@ -223,6 +223,7 @@ Deprecated Compiler Flags Modified Compiler Flags --- - The `-gkey-instructions` compiler flag is now enabled by default when DWARF is emitted for plain C/C++ and optimizations are enabled. (#GH149509) +- The `-Wnrvo` compiler flag will

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/155866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Enable `modernize-use-auto` in clang-tidy config and fix warnings (PR #157468)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (flovent) Changes Closes [#156154](https://github.com/llvm/llvm-project/issues/156154) --- Full diff: https://github.com/llvm/llvm-project/pull/157468.diff 4 Files Affected: - (modified) clang-tools-extra/clang-tidy/.clang-tid

[clang] [clang-tools-extra] [compiler-rt] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

2025-09-08 Thread via cfe-commits
Sirraide wrote: > IIRC the Clang behaviour for `-Wincompatible-pointer-types` differs from GCC > as it includes qualifiers while GCC doesn't, so it may show up with some new > failures. That's not a comment for or against changing it. Sort of: while `-Werror=incompatible-pointer-types` *would*

[clang] [clang] Fix side effects resolving overloads of builtin functions (#138651) (PR #154034)

2025-09-08 Thread Corentin Jabot via cfe-commits
@@ -6313,30 +6313,38 @@ static FunctionDecl *rewriteBuiltinFunctionDecl(Sema *Sema, ASTContext &Context, unsigned i = 0; SmallVector OverloadParams; - for (QualType ParamType : FT->param_types()) { + { +// The lvalue conversions in this loop are only for type resolu

[clang] [clang][bytecode] Check builtin carryops for dummy pointers (PR #157490)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Fixes #157422 --- Full diff: https://github.com/llvm/llvm-project/pull/157490.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+3) - (modified) clang/test/AST/ByteCode/builtin

[clang] [CIR] Fix LLVM lowering crashes after #155244 (PR #157471)

2025-09-08 Thread Morris Hafner via cfe-commits
https://github.com/mmha created https://github.com/llvm/llvm-project/pull/157471 This patch replaces all uses of `replaceAllUseWith` with `replaceOp`. This fixes a number of regressions post #155244. >From 9cc2c129d4f1cc805901897c6a11be50fe971675 Mon Sep 17 00:00:00 2001 From: Morris Hafner Da

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-09-08 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > FYI, this change caused some kinda noisy warnings from GCC, and the warnings > don't sound entirely bogus: > > ``` > In file included from > ../../clang/include/clang/Serialization/ASTRecordReader.h:20, > from ../../clang/lib/Serialization/ASTReaderDecl.cp

[clang] [clang][CodeGen][MSVC] Return vector types from methods indirectly (PR #157365)

2025-09-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -1168,15 +1168,20 @@ static bool isTrivialForMSVC(const CXXRecordDecl *RD, QualType Ty, } bool MicrosoftCXXABI::classifyReturnType(CGFunctionInfo &FI) const { - const CXXRecordDecl *RD = FI.getReturnType()->getAsCXXRecordDecl(); - if (!RD) -return false; - - bool is

[clang] [alpha.webkit.UncheckedCallArgsChecker] Don't emit a warning for passing a temporary object as an argument. (PR #155033)

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

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -118,6 +118,47 @@ static void fixSeparateAttrArgAndNumber(StringRef ArgStr, SourceLocation ArgLoc, Slot = new (Ctx) IdentifierLoc(ArgLoc, PP.getIdentifierInfo(FixedArg

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/152537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: https://github.com/llvm-beanz commented: My only big concern is around the forced capitalization of semantics in the diagnostics. I also left some notes about follow-up changes we should c

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -431,15 +464,31 @@ Expr *BuiltinTypeMethodBuilder::getResourceHandleExpr() { OK_Ordinary); } +BuiltinTypeMethodBuilder & +BuiltinTypeMethodBuilder::createLocalVar(StringRef Name, QualType Ty) { + ensureCompleteDecl(); + + ASTContext &AS

[clang] 68b98bb - [docs][OpenMP] Remove "unclaimed" from language-specific items (#157481)

2025-09-08 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2025-09-08T09:55:37-05:00 New Revision: 68b98bb9b97b60c02d26611535b3876572c81fe7 URL: https://github.com/llvm/llvm-project/commit/68b98bb9b97b60c02d26611535b3876572c81fe7 DIFF: https://github.com/llvm/llvm-project/commit/68b98bb9b97b60c02d26611535b3876572c81fe7

[clang] [NFC][analyzer] Fix copypaste error in security.VAList docs (PR #157440)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes My recent commit a80c393a9c498279a1ec9fd630535b9ff139b49f accidentally added a paragraph which does not belong to the new documentation of the checker `security.VAList`; this commit corrects this mistake. -

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -1,7 +1,41 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s -verify +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x h

[clang-tools-extra] [clang-tools-extra] Remove 'REQUIRES: shell' from lit tests. (PR #156950)

2025-09-08 Thread via cfe-commits
@@ -1,6 +1,8 @@ // shell is required for the "dirname" command cmtice wrote: Done. https://github.com/llvm/llvm-project/pull/156950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang-tools-extra] [clang-tools-extra] Remove 'REQUIRES: shell' from lit tests. (PR #156950)

2025-09-08 Thread via cfe-commits
@@ -1,4 +1,4 @@ -// REQUIRES: shell +// UNSUPPORTED: system-windows cmtice wrote: My understanding is that the "REQUIRES: shell" meant that it never ran on Windows. https://github.com/llvm/llvm-project/pull/156950 ___

[clang] [clang-tools-extra] [compiler-rt] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

2025-09-08 Thread Sam James via cfe-commits
thesamesam wrote: IIRC the Clang behaviour for `-Wincompatible-pointer-types` differs from GCC as it includes qualifiers while GCC doesn't, so it may show up with some new failures. That's not a comment for or against changing it. https://github.com/llvm/llvm-project/pull/157364 __

[clang] [clang-tools-extra] [compiler-rt] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

2025-09-08 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 cl,c -- clang-tools-extra/test/clang-tidy/checkers/bugp

[clang] [clang-repl] Teach clang-repl how to load PCHs (reprise) (PR #157359)

2025-09-08 Thread Jeaye Wilkerson via cfe-commits
jeaye wrote: I've scoured the latest Linux/Windows build+test logs and the failures in there have seemingly nothing to do with this PR. Based on comparing these results with other recently opened PRs, it's unclear to me if these are consistent. @vgvassilev do you know? https://github.com/llvm

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -676,6 +774,58 @@ BuiltinTypeDeclBuilder::addHandleConstructorFromImplicitBinding() { .finalize(); } +BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addCreateFromBinding() { hekota wrote: We do want these methods to be separate with different names

[clang] [CIR] Fix LLVM lowering crashes after #155244 (PR #157471)

2025-09-08 Thread Morris Hafner via cfe-commits
mmha wrote: My understanding is that we are not supposed to erase an op that was replaced anymore. `eraseOp` calls `replaceOp` internally which lead to the double replacement assertion failure. I also think in our case it doesn't really matter whether we use `replaceOp` and `replaceAllUseWith

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -483,6 +532,55 @@ BuiltinTypeMethodBuilder &BuiltinTypeMethodBuilder::dereference(T Ptr) { return *this; } +template +BuiltinTypeMethodBuilder & +BuiltinTypeMethodBuilder::getResourceHandle(T ResourceRecord) { hekota wrote: I'll change the name to `acc

[clang-tools-extra] [clang-tools-extra] Remove 'REQUIRES: shell' from lit tests. (PR #156950)

2025-09-08 Thread via cfe-commits
https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/156950 >From 05fa2572ad23795ef821b81ecd5dd4ff4d0aea7a Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Thu, 4 Sep 2025 12:00:44 -0700 Subject: [PATCH 1/2] [clang-tools-extra] Remove 'REQUIRES: shell' from lit tests.

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-08 Thread Bhasawut Singhaphan via cfe-commits
https://github.com/markbhasawut updated https://github.com/llvm/llvm-project/pull/157464 >From 70b779e23b1b0866e9bdd5ff2b2f6cc86feebd31 Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Mon, 8 Sep 2025 15:51:33 +0700 Subject: [PATCH 1/5] [Headers][X86] Enable constexpr handling for MMX/

[clang] [clang] Fix OOB read in SemaSwift::validateSwiftFunctionName (PR #157139)

2025-09-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Release note + bug number is a good idea, else LGTM. https://github.com/llvm/llvm-project/pull/157139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -431,15 +464,31 @@ Expr *BuiltinTypeMethodBuilder::getResourceHandleExpr() { OK_Ordinary); } +BuiltinTypeMethodBuilder & +BuiltinTypeMethodBuilder::createLocalVar(StringRef Name, QualType Ty) { + ensureCompleteDecl(); + + ASTContext &AS

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -431,15 +464,31 @@ Expr *BuiltinTypeMethodBuilder::getResourceHandleExpr() { OK_Ordinary); } +BuiltinTypeMethodBuilder & +BuiltinTypeMethodBuilder::createLocalVar(StringRef Name, QualType Ty) { + ensureCompleteDecl(); + + ASTContext &AS

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/155866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix OOB read in SemaSwift::validateSwiftFunctionName (PR #157139)

2025-09-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM but we need a release note. https://github.com/llvm/llvm-project/pull/157139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -282,14 +327,17 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs, return; } } break; - case ParsedAttr::UnknownAttribute: -Diag(Loc, diag::

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -3054,6 +3057,9 @@ static void emitAttributes(const RecordKeeper &Records, raw_ostream &OS, << (R.getValueAsBit("InheritEvenIfAlreadyPresent") ? "true"

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -4943,13 +4932,35 @@ def HLSLResourceBinding: InheritableAttr { }]; } -def HLSLSV_Position : HLSLAnnotationAttr { - let Spellings = [HLSLAnnotation<"sv_position">];

[clang] [CIR] Fix LLVM lowering crashes after #155244 (PR #157471)

2025-09-08 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good, but it isn't clear to me why the crashes were occurring. I see from the description of #155244 that replaceAllUsesWith now has a delayed effect in some circumstances. Was the fact that we were erasing the replaced op ca

[clang] [llvm] [SYCL] Add offload wrapping for SYCL kind. (PR #147508)

2025-09-08 Thread Yury Plyakhin via cfe-commits
@@ -620,6 +635,422 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc, // Add this function to constructors. appendToGlobalCtors(M, CtorFunc, /*Priority=*/101); } + +/// SYCLWrapper helper class that creates all LLVM IRs wrapping given images. +stru

[clang] [CIR] Fix assertion order in 'Address' (PR #157477)

2025-09-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/157477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-08 Thread Balazs Benics via cfe-commits
@@ -379,6 +386,111 @@ void DereferenceChecker::checkBind(SVal L, SVal V, const Stmt *S, C.addTransition(State, this); } +void DereferenceChecker::checkPreStmt(const BinaryOperator *Op, + CheckerContext &C) const { + if (!Op->isAdditiveO

[clang-tools-extra] [clang-tidy] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-08 Thread via cfe-commits
@@ -0,0 +1,127 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [Frontend] Define __SANITIZE__ macros for kernel address variants (PR #156543)

2025-09-08 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/156543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream VisitOpaqueValueExpr support for Complex & Scalar (PR #157331)

2025-09-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/157331 >From 8941ba8930c4487c958c8f4746570575bb976931 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 6 Sep 2025 18:38:46 +0200 Subject: [PATCH] [CIR] Upstream VisitOpaqueValueExpr support for Complex & Sc

[clang] [llvm] Explicit types in cbuffer layouts (PR #156919)

2025-09-08 Thread Justin Bogner via cfe-commits
@@ -111,53 +118,52 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType( if (!PackOffsets || PO != -1) { if (!layoutField(FD, EndOffset, FieldOffset, FieldType, PO)) return nullptr; -Layout.push_back(FieldOffset); -LayoutEle

[clang] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

2025-09-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/157364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-09-08 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,cpp -- clang/lib/Basic/Diagnostic.cpp clang/lib/Basic

[clang] [analyzer] Revert #115918, so empty base class optimization works again (PR #157480)

2025-09-08 Thread Donát Nagy via cfe-commits
NagyDonat wrote: Sounds reasonable. I feel a bit guilty that I wasn't able to predict this regression when I reviewed the reverted commit as "LGTM, clean little patch", but I don't think that I could've done better without investing drastically more effort into the review. By the way does th

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-08 Thread Balázs Kéri via cfe-commits
@@ -173,9 +178,11 @@ static bool isDeclRefExprToReference(const Expr *E) { return false; } -void DereferenceChecker::reportBug(const DerefBugType &BT, - ProgramStateRef State, const Stmt *S, - CheckerContext

[libclc] [NFC][libclc] Replace _CLC_V_V_VP_VECTORIZE macro with use of unary_def_with_ptr_scalarize.inc (PR #157002)

2025-09-08 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. https://github.com/llvm/llvm-project/pull/157002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Rename overloaded virtual member function to prevent shadowing, NFCI (PR #157501)

2025-09-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/157501 Resolves warnings triggered by `Woverloaded-virtual` >From 54fee3ec74c6f7b75f2aba5fc796d034311df830 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 8 Sep 2025 09:00:27 -0700 Subject: [PATCH] [clang]

[clang] [docs][OpenMP] Update the status of GROUPPRIVATE in flang (PR #157470)

2025-09-08 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/157470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Rename overloaded virtual member function to prevent shadowing, NFCI (PR #157501)

2025-09-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/157501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-09-08 Thread Devon Loehr via cfe-commits
@@ -57,9 +59,12 @@ Error SpecialCaseList::Matcher::insert(StringRef Pattern, unsigned LineNumber, auto Glob = std::make_unique(); Glob->Name = Pattern.str(); Glob->LineNo = LineNumber; + // Backslashes are valid in posix-style filenames. + bool IsSlashAgnostic = Triple

[clang] [clang] Rename overloaded virtual member function to prevent shadowing, NFCI (PR #157501)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Cyndy Ishida (cyndyishida) Changes Resolves warnings triggered by `Woverloaded-virtual` --- Full diff: https://github.com/llvm/llvm-project/pull/157501.diff 4 Files Affected: - (modified) clang/include/clang/Serialization/ASTRea

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-09-08 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/149886 >From 028be83a047f7dc3e5ff7d89f62ce4bd7452ff1b Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Mon, 21 Jul 2025 19:07:23 + Subject: [PATCH 1/4] Make special case matcher slash-agnostic --- clang/docs/Sani

[clang] Using type deduction to define __SIZE_TYPE__ and __PTRDIFF_TYPE__ (PR #155979)

2025-09-08 Thread via cfe-commits
@@ -1175,13 +1175,15 @@ static void InitializePredefinedMacros(const TargetInfo &TI, Builder.defineMacro("__UINTMAX_C_SUFFIX__", ConstSuffix); Builder.defineMacro("__UINTMAX_C(c)", ConstSuffix.size() ? Twine("c##") + ConstSuffix : "c"); - DefineType(

[clang] [OpenMP] Conditional modifier on lastprivate clause is producing incorrect result in C mode (PR #156004)

2025-09-08 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/156004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 5.2] New syntax for 'uses_allocators' clause (PR #157025)

2025-09-08 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/157025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 5.2] New syntax for 'uses_allocators' clause (PR #157025)

2025-09-08 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: Update OpenMP.rst and whatsnew docs for clang https://github.com/llvm/llvm-project/pull/157025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [OpenMP 5.2] New syntax for 'uses_allocators' clause (PR #157025)

2025-09-08 Thread Alexey Bataev via cfe-commits
@@ -1497,6 +1497,11 @@ def err_omp_multiple_step_or_linear_modifier : Error< "multiple %select{'step size'|'linear modifier'}0 found in linear clause">; def err_omp_deprecate_old_syntax: Error< "old syntax '%0' on '%1' clause was deprecated, use new syntax '%2'">; +def warn

[clang] [llvm] [HLSL][DirectX] Add support for `rootsig` as a target environment (PR #156373)

2025-09-08 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/156373 >From 1ff0888cb712c69f5fe6f587b60649d03b0472cd Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 29 Aug 2025 09:42:59 -0700 Subject: [PATCH 01/17] add support for rootsig as an hlsl environment --- clang/

[clang] [clang][Modules] Permit Link Declarations in Submodule Declarations in Module Maps (PR #156377)

2025-09-08 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/156377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Permit Link Declarations in Submodule Declarations in Module Maps (PR #156377)

2025-09-08 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Since the original check is reverted (https://github.com/llvm/llvm-project/pull/157154), I am closing this PR. https://github.com/llvm/llvm-project/pull/156377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [llvm] [HLSL][DirectX] Add support for `rootsig` as a target environment (PR #156373)

2025-09-08 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/156373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream FPToFPBuiltin ATanOp (PR #157496)

2025-09-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/157496 Upstream support for FPToFPBuiltin ATanOp >From baccdc42c8c4046788fa364dcc71780bfd6c9ab0 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 7 Sep 2025 22:30:39 +0200 Subject: [PATCH] [CIR] Upstream FPT

[clang] [CIR] Add support for atomic compare-and-swap (PR #156253)

2025-09-08 Thread Sirui Mu via cfe-commits
https://github.com/Lancern closed https://github.com/llvm/llvm-project/pull/156253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR][clang][CodeGen] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-09-08 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: > It would probably be best to split up the LLVM and the Clang changes. Thank you, moved AA changes separately, addressed reviews. Updated this PR as well, pending an update on tests due to https://github.com/llvm/llvm-project/pull/147670. > (I do wonder whether we sho

[clang] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

2025-09-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I think this makes sense, and if GCC hasn't gotten a huge amount of pushback, then there is no reason for us not to do this. https://github.com/llvm/llvm-project/pull/157364 ___ cfe-commits m

[clang] [llvm] [IR][clang][CodeGen] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-09-08 Thread Antonio Frighetto via cfe-commits
@@ -0,0 +1,90 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -passes=instcombine < %s | FileCheck %s + +; sinf clobbering errno, but %p cannot alias errno per C/C++ strict aliasing rules via TBAA. +; Hence, can

[clang] [llvm] [IR][clang][CodeGen] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-09-08 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/125258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream FPToFPBuiltin ASinOp (PR #157350)

2025-09-08 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/157350 >From 764cd36f0b1ff4405616c126ac799e602a182f89 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 7 Sep 2025 18:58:07 +0200 Subject: [PATCH] [CIR] Upstream FPToFPBuiltin ASinOp --- clang/include/clang

[clang] [clang][bytecode] Check strlen impl for primitive arrays (PR #157494)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Fixes #157428 --- Full diff: https://github.com/llvm/llvm-project/pull/157494.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+3) - (added) clang/test/AST/ByteCode/builtins.c

[clang] [clang][bytecode] Check strlen impl for primitive arrays (PR #157494)

2025-09-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/157494 Fixes #157428 >From 720cbfe0b715c6a2f1c02631b96dc560fedab88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 8 Sep 2025 17:36:52 +0200 Subject: [PATCH] [clang][bytecode] Check strlen im

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-08 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/157116 >From 4121aecbda6be80161eb8fe22c351fadd5bbe62a Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Fri, 5 Sep 2025 16:27:28 +0200 Subject: [PATCH 1/2] [CIR] Add support for __builtin_alloca This patch adds support f

[clang] [clang] Fix side effects resolving overloads of builtin functions (#138651) (PR #154034)

2025-09-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/154034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix side effects resolving overloads of builtin functions (#138651) (PR #154034)

2025-09-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/154034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-08 Thread Morris Hafner via cfe-commits
@@ -258,3 +258,13 @@ void trap2() { // LLVM: {{.+}}: // LLVM-NEXT:call void @_Z2f1v() // LLVM: } + +void *test_alloca(unsigned long n) { + return __builtin_alloca(n); +} + +// CIR-LABEL: @_Z11test_allocam( +// CIR: %{{.+}} = cir.alloca !u8i, !cir.ptr, %

[clang] [docs][OpenMP] Remove "unclaimed" from language-specific items (PR #157481)

2025-09-08 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/157481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

2025-09-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM but let's see if other people have opinions in the next few days. That GCC did it first and did not get pushback is reassuring @erichkeane https://github.com/llvm/llvm-project/pull/157364 __

[clang] [clang] Restrict -Wnrvo to C++ code only. (PR #157059)

2025-09-08 Thread Corentin Jabot via cfe-commits
@@ -223,6 +223,7 @@ Deprecated Compiler Flags Modified Compiler Flags --- - The `-gkey-instructions` compiler flag is now enabled by default when DWARF is emitted for plain C/C++ and optimizations are enabled. (#GH149509) +- The `-Wnrvo` compiler flag will

[clang-tools-extra] [clang-tidy][NFC] Do less unnecessary work in `NoLintDirectiveHandler` (PR #147553)

2025-09-08 Thread via cfe-commits
github-actions[bot] wrote: @localspook 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 bui

[clang-tools-extra] [clang-tidy][NFC] Do less unnecessary work in `NoLintDirectiveHandler` (PR #147553)

2025-09-08 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook closed https://github.com/llvm/llvm-project/pull/147553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] ab898f3 - [clang-tidy][NFC] Do less unnecessary work in `NoLintDirectiveHandler` (#147553)

2025-09-08 Thread via cfe-commits
Author: Victor Chernyakin Date: 2025-09-08T08:30:01-07:00 New Revision: ab898f32c60689d1d47d0b6de66c30d3476994bb URL: https://github.com/llvm/llvm-project/commit/ab898f32c60689d1d47d0b6de66c30d3476994bb DIFF: https://github.com/llvm/llvm-project/commit/ab898f32c60689d1d47d0b6de66c30d3476994bb.d

[clang] [analyzer] Revert #115918, so empty base class optimization works again (PR #157480)

2025-09-08 Thread Balazs Benics via cfe-commits
steakhal wrote: FYI @ziqingluo-90 https://github.com/llvm/llvm-project/pull/157480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-08 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/157464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][Mangle] Inject structor type into mangled name when mangling for LLDB JIT expressions (PR #155485)

2025-09-08 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/155485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Added assert to prevent infinite recursion in computing layout (PR #154134)

2025-09-08 Thread Michael Buch via cfe-commits
Michael137 wrote: Personally i think the assert makes sense here (if a user can't ever create an AST like that, which IIUC they can't). Although it is true that we try not to assert on user input as Jonas mentioned, this was a bug in our LLDB's AST creation. Malformed DWARF can already cause a

[clang] [clang] Allow attributes on first constructor argument in pre-C++11 (PR #157300)

2025-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -6007,10 +6007,9 @@ bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, // A C++11 attribute here signals that we have a constructor, and is an // attribute on the first constructor parameter. - if (getLangOpts().CPlusPlus11 && - isCXX11

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-08 Thread Morris Hafner via cfe-commits
@@ -1053,9 +1053,12 @@ mlir::LogicalResult CIRToLLVMBaseClassAddrOpLowering::matchAndRewrite( mlir::LogicalResult CIRToLLVMAllocaOpLowering::matchAndRewrite( cir::AllocaOp op, OpAdaptor adaptor, mlir::ConversionPatternRewriter &rewriter) const { - assert(!cir::Missing

[clang] 2946879 - [CIR] Fix assertion order in 'Address' (#157477)

2025-09-08 Thread via cfe-commits
Author: Erich Keane Date: 2025-09-08T14:59:31Z New Revision: 2946879c49d2cb17d1b53ff398edd681baf49417 URL: https://github.com/llvm/llvm-project/commit/2946879c49d2cb17d1b53ff398edd681baf49417 DIFF: https://github.com/llvm/llvm-project/commit/2946879c49d2cb17d1b53ff398edd681baf49417.diff LOG: [

[clang] [analyzer] Revert #115918, so empty base class optimization works again (PR #157480)

2025-09-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/157480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][CLANG] DMF VSX Vector float GER 2x (rank-2 update) (PR #147383)

2025-09-08 Thread Maryam Moghadas via cfe-commits
https://github.com/maryammo edited https://github.com/llvm/llvm-project/pull/147383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Fix assertion order in 'Address' (PR #157477)

2025-09-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/157477 We are checking the 'type' of 'pointer' before we are checking whether it is null or not! This is clearly incorrect, so this patch reorders the asserts. >From b0d937cc90e9797094248a7df1f5c5d8b373c015 Mon Se

  1   2   >