[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change introduces lowering from CIR to LLVM IR of global integer variables, using defaults for attributes that aren't yet implemented. --- Full diff: https://github.com/llvm/llvm-project/pull/125260.d

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This change introduces lowering from CIR to LLVM IR of global integer variables, using defaults for attributes that aren't yet implemented. --- Full diff: https://github.com/llvm/llvm-project/pull/125260

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/125260 This change introduces lowering from CIR to LLVM IR of global integer variables, using defaults for attributes that aren't yet implemented. >From 4801886dd4c45d32891a7337ad7430a6c5137929 Mon Sep 17 00:00:00

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-31 Thread Aidan Goldfarb via cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">;

[clang] [clang] C++20 Modules: document how to perform automated reductions (PR #124997)

2025-01-31 Thread via cfe-commits
https://github.com/cor3ntin requested changes to this pull request. This is an excellent idea. But I think this needs to be a bit more specific and describe how to write an interestingness test specific to modules. (I thought we had non-modules documentation for creduce but apparently not) ht

[clang] [NFC][analyzer][docs] Improve Annotations.rst (PR #122749)

2025-01-31 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: > LLVM Buildbot has detected a new failure on builder > `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang` > at step 6 "test-build-unified-tree-check-all". > > Full details are available at: > https:

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This fixes instantiation of definition for friend function templates, when the declaration found and the one containing the definition have different template contexts. In these cases, the the function de

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Matheus Izvekov (mizvekov) Changes This fixes instantiation of definition for friend function templates, when the declaration found and the one containing the definition have different template contexts. In these cases, the the fun

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-01-31 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: I’m not in a position where I can test the patch properly right now, but if the whole qtbase can be built (not only the reduced testcase or the specific source file that triggered the issue before), I’m good with it - thanks! https://github.com/llvm/llvm-project/pull/125266 ___

[clang] [clang] Support member function poiners in Decl::getFunctionType() (PR #125077)

2025-01-31 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. https://github.com/llvm/llvm-project/pull/125077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ef91cae - Allow 'inline' on some declarations in MS compatibility mode (#125250)

2025-01-31 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-01-31T13:50:01-05:00 New Revision: ef91caec2cf313624829114802cff92ae682e550 URL: https://github.com/llvm/llvm-project/commit/ef91caec2cf313624829114802cff92ae682e550 DIFF: https://github.com/llvm/llvm-project/commit/ef91caec2cf313624829114802cff92ae682e550.diff

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread via cfe-commits
@@ -196,3 +199,13 @@ Options // The following pointer may not become a 'int *const'. int *changing_pointee = &value; changing_pointee = &result; + +.. option:: AllowedTypes + + A semicolon-separated list of names of types that will be excluded from + const-correct

[clang] Allow 'inline' on some declarations in MS compatibility mode (PR #125250)

2025-01-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/125250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SveEmitter] Explicitly merge with `poison` instead of `undef` (PR #124596)

2025-01-31 Thread Pedro Lobo via cfe-commits
pedroclobo wrote: Thanks for the heads-up! I've skimmed through the [Arm Architecture Reference Manual for A-profile architecture](https://developer.arm.com/documentation/ddi0487/latest/) but what I've found is rather inconclusive. Section B1.4.5.3 states that "_Merging predication is perform

[clang] [NFC][analyzer][docs] Improve Annotations.rst (PR #122749)

2025-01-31 Thread Donát Nagy via cfe-commits
NagyDonat wrote: Yes, I also don't understand what caused the buildbot failure, but it's definitely unrelated to this commit. https://github.com/llvm/llvm-project/pull/122749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-01-31 Thread via cfe-commits
@@ -5276,9 +5277,31 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { +NamedDecl *ND = Function; +DeclContext *DC

[clang] [clang][bytecode] Return failure for dead non-temporary pointers (PR #125247)

2025-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/125247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6b8d076 - [clang][bytecode] Return failure for dead non-temporary pointers (#125247)

2025-01-31 Thread via cfe-commits
Author: Timm Baeder Date: 2025-01-31T20:06:29+01:00 New Revision: 6b8d076b1f0a00341945ed25626eaec099422982 URL: https://github.com/llvm/llvm-project/commit/6b8d076b1f0a00341945ed25626eaec099422982 DIFF: https://github.com/llvm/llvm-project/commit/6b8d076b1f0a00341945ed25626eaec099422982.diff L

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [clang] C++20 Modules: document how to perform automated reductions (PR #124997)

2025-01-31 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Yes, we don't have a generic document on automated reduction without modules. The idea of this document here is to inform developers who already know how to perform such reductions, so that they can target modules as well. The key piece of information here that surprises most p

[clang-tools-extra] [include-cleaner] Dont report explicit refs for global operator new/delete (PR #125199)

2025-01-31 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/125199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] Dont report explicit refs for global operator new/delete (PR #125199)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/125199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-31 Thread Budimir Aranđelović via cfe-commits
@@ -5335,6 +5335,230 @@ static void handlePreferredTypeAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) PreferredTypeAttr(S.Context, AL, ParmTSI)); } +// Returns vector of format attributes. There are no two attributes with same +// arguments in r

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-31 Thread Antonio Frighetto via cfe-commits
@@ -128,6 +128,15 @@ static void addLocAccess(MemoryEffects &ME, const MemoryLocation &Loc, ME |= MemoryEffects::argMemOnly(MR); return; } + // TODO: This should be refined to use upcoming Loc.TBAAErrno for errno + // memory, rather than manually inspecting the und

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-31 Thread Antonio Frighetto via cfe-commits
@@ -672,13 +703,15 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, Changed |= setDoesNotThrow(F); Changed |= setDoesNotCapture(F, 0); Changed |= setOnlyReadsMemory(F, 0); +Changed |= setOnlyAccessesErrnoMemory(F); antoniofrighetto wrote

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-31 Thread Antonio Frighetto via cfe-commits
@@ -554,6 +579,7 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, Changed |= setDoesNotThrow(F); Changed |= setDoesNotCapture(F, 0); Changed |= setOnlyReadsMemory(F, 0); +Changed |= setOnlyAccessesErrnoMemory(F); antoniofrighetto wrote:

[clang] c8ba57e - [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#125157)

2025-01-31 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-31T07:50:04-08:00 New Revision: c8ba57ec23ddf6ab9a178dbabc8b61924f0f36fa URL: https://github.com/llvm/llvm-project/commit/c8ba57ec23ddf6ab9a178dbabc8b61924f0f36fa DIFF: https://github.com/llvm/llvm-project/commit/c8ba57ec23ddf6ab9a178dbabc8b61924f0f36fa.diff L

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread via cfe-commits
@@ -2237,6 +2237,9 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) { if (PP.isCodeCompletionReached() && !CalledSignatureHelp) RunSignatureHelp(); LHS = ExprError(); + } else if (!HasError && HasTrailingComma) { +

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/125232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread via cfe-commits
cor3ntin wrote: Can you add a release note and a more detailed description? Thanks https://github.com/llvm/llvm-project/pull/125232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125158)

2025-01-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/125158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9268494 - [TableGen] Migrate away from PointerUnion::dyn_cast (NFC) (#125158)

2025-01-31 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-31T07:50:18-08:00 New Revision: 9268494f03cb940de0ae4b747b447ffc07b10ea7 URL: https://github.com/llvm/llvm-project/commit/9268494f03cb940de0ae4b747b447ffc07b10ea7 DIFF: https://github.com/llvm/llvm-project/commit/9268494f03cb940de0ae4b747b447ffc07b10ea7.diff L

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread Haojian Wu via cfe-commits
@@ -2237,6 +2237,9 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) { if (PP.isCodeCompletionReached() && !CalledSignatureHelp) RunSignatureHelp(); LHS = ExprError(); + } else if (!HasError && HasTrailingComma) { +

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/125232 >From 5ecb2de4ba92619dc0bee89e06db5203e256ea42 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 31 Jan 2025 14:59:39 +0100 Subject: [PATCH 1/2] Diagnose the code with trailing comma in the function call. --

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread Haojian Wu via cfe-commits
hokein wrote: > Can you add a release note and a more detailed description? Thanks Done. I think we don't need a release note, this is a regression fix, and https://github.com/llvm/llvm-project/pull/114684 is not released yet. https://github.com/llvm/llvm-project/pull/125232 __

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

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

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/125232 >From 5ecb2de4ba92619dc0bee89e06db5203e256ea42 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 31 Jan 2025 14:59:39 +0100 Subject: [PATCH 1/2] Diagnose the code with trailing comma in the function call. --

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125157)

2025-01-31 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/125157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Pass -offload-lto instead of -lto for cuda/hip kernels (PR #125243)

2025-01-31 Thread Omar Ahmed via cfe-commits
https://github.com/omarahmed created https://github.com/llvm/llvm-project/pull/125243 ClangLinkerWrapper tool in one of its clang commands to generate ptx kernel binary from llvm bitcode kernel was using -flto option which should be only used for cpu code not gpu kernel code. This PR fixes

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PCH, CUDA] Take CUDA attributes into account (PR #125127)

2025-01-31 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/125127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PCH, CUDA] Take CUDA attributes into account (PR #125127)

2025-01-31 Thread kadir çetinkaya via cfe-commits
@@ -14,12 +16,19 @@ void kcall(void (*kp)()) { __global__ void kern() { } +__host__ int overloaded_func(); kadircet wrote: can you also add a comment here explaining what we're testing? https://github.com/llvm/llvm-project/pull/125127 ___

[clang] c1163b8 - [NFC] remove string literals from AArch64SVEACLETypes.def (#125063)

2025-01-31 Thread via cfe-commits
Author: Tomas Matheson Date: 2025-01-31T13:27:17Z New Revision: c1163b843b63f775817b84f124cdcf33f25c28f6 URL: https://github.com/llvm/llvm-project/commit/c1163b843b63f775817b84f124cdcf33f25c28f6 DIFF: https://github.com/llvm/llvm-project/commit/c1163b843b63f775817b84f124cdcf33f25c28f6.diff LOG

[clang] [clang][bytecode] Return failure for dead non-temporary pointers (PR #125247)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes ... even when we're not performing a lvalue-to-rvalue conversion. --- Full diff: https://github.com/llvm/llvm-project/pull/125247.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/EvalEmitter.cpp

[clang] [clang][bytecode] Return failure for dead non-temporary pointers (PR #125247)

2025-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125247 ... even when we're not performing a lvalue-to-rvalue conversion. >From 3d42d2f1e9e70f5836e1f10be9b18c986c4394f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 31 Jan 2025 17:37:17 +01

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/7] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)

2025-01-31 Thread via cfe-commits
higher-performance wrote: /cherry-pick 20fd7df0b847bb46aac2f0b5b71d242220027cbc https://github.com/llvm/llvm-project/pull/124329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

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

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I'm WAY happier with this. I don't have the ability to review the SA stuff well enough to give an approval, but the rest of the stuff is good. 1 Nit, else LGTM. https://github.com/llvm/llvm-project/pull/117437

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -5570,8 +5570,10 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, /*SkipImmediateInvocations=*/NestedDefaultChecking)) return ExprError(); + Expr *RewrittenExpr = Init == Param->getDefaultArg() ? nullptr : Init; erichkeane

[clang] fbf544c - [CIR] Fix some clang-tidy problems in CIR (#125128)

2025-01-31 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-01-31T08:39:33-08:00 New Revision: fbf544c4226524d8518ebe375bad412a08358233 URL: https://github.com/llvm/llvm-project/commit/fbf544c4226524d8518ebe375bad412a08358233 DIFF: https://github.com/llvm/llvm-project/commit/fbf544c4226524d8518ebe375bad412a08358233.diff L

[clang] [CIR] Fix some clang-tidy problems in CIR (PR #125128)

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

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread via cfe-commits
yronglin wrote: I've made changes in Sema, if the rewritten-expr same as `Field->getInClassInitializer()`/`Param->getDefaultArg()`, this PR will set `{CXXDefaultArgExprBits, CXXDefaultInitExprBits}.HasRewrittenInit` false. https://github.com/llvm/llvm-project/pull/117437 __

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/123413 >From 26c73cba1157bc538eb69c4ce11bba79c21ec3c6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 18 Jan 2025 00:49:29 +0300 Subject: [PATCH 1/4] [clang-tidy] Added support for 3-argument string ctor ---

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk approved this pull request. https://github.com/llvm/llvm-project/pull/125232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread Eugene Epshteyn via cfe-commits
https://github.com/eugeneepshteyn created https://github.com/llvm/llvm-project/pull/125248 When -fimplicit-none-ext is passed, flang behaves as if "implicit none(external)" was specified for all relevant constructs in Fortran source file. Note: implicit17.f90 was based on implicit07.f90 with

[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)

2025-01-31 Thread via cfe-commits
higher-performance wrote: Did the cherry pick not work, or does it take a while? https://github.com/llvm/llvm-project/pull/124329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-semantics Author: Eugene Epshteyn (eugeneepshteyn) Changes When -fimplicit-none-ext is passed, flang behaves as if "implicit none(external)" was specified for all relevant constructs in Fortran source file. Note: implicit17.f90 was based on impl

[clang] Fix false negative when value initializing a field annotated with [[clang::require_field_initialization]] (PR #124329)

2025-01-31 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#125249 https://github.com/llvm/llvm-project/pull/124329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add support for -fimplicit-none-ext option (PR #125248)

2025-01-31 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Clang] Make OpenMP offloading consistently use the bound architecture (PR #125135)

2025-01-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-dylib` running on `linaro-flang-aarch64-dylib` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9707 Here is the relevant

[clang] Add clang atomic control options and attribute (PR #114841)

2025-01-31 Thread Yaxun Liu via cfe-commits
@@ -4972,3 +4972,59 @@ def NoTrivialAutoVarInit: InheritableAttr { let Documentation = [NoTrivialAutoVarInitDocs]; let SimpleHandler = 1; } + +def Atomic : StmtAttr { + let Spellings = [Clang<"atomic">]; + let Args = [ +EnumArgument<"NoRemoteMemory", "NoRemoteMemoryTy

[clang] Add clang atomic control options and attribute (PR #114841)

2025-01-31 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > The changes should definitely come with a release note in > `clang/docs/ReleaseNotes.rst`, but this also seems like it maybe should get > wider documentation in the language extensions manual. I mentioned a need for > attribute documentation, that could be simple docs which p

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-31 Thread via cfe-commits
https://github.com/gbMattN updated https://github.com/llvm/llvm-project/pull/119387 >From 8781ff2355750ae61d140620b1f6862537de07e3 Mon Sep 17 00:00:00 2001 From: gbMattN Date: Tue, 10 Dec 2024 15:01:37 + Subject: [PATCH 01/11] [ASan] Add metadata to renamed instructions so ASan doesn't use

[clang] [llvm] [NVPTX] Add tcgen05 alloc/dealloc intrinsics (PR #124961)

2025-01-31 Thread Durgadoss R via cfe-commits
@@ -962,6 +962,109 @@ The ``griddepcontrol`` intrinsics allows the dependent grids and prerequisite gr For more information, refer `PTX ISA `__. +

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 Thread Aaron Ballman via cfe-commits
@@ -3830,6 +3830,8 @@ def warn_type_attribute_wrong_type : Warning< "'%0' only applies to %select{function|pointer|" "Objective-C object or block pointer}1 types; type here is %2">, InGroup; +def warn_attribute_on_void_param: Warning< + "attribute %0 cannot be applied to

[clang] [NFC] remove string literals from AArch64SVEACLETypes.def (PR #125063)

2025-01-31 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm closed https://github.com/llvm/llvm-project/pull/125063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 Thread Aaron Ballman via cfe-commits
@@ -90,7 +90,7 @@ struct testSubset1Struct { }; #pragma clang attribute pop -#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = variable) +#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = variable) // expected-warning {{attribute

[clang] 46befd7 - [clang][bytecode][NFC] Remove unused function (#125201)

2025-01-31 Thread via cfe-commits
Author: Timm Baeder Date: 2025-01-31T15:03:15+01:00 New Revision: 46befd720995647485c516ba94a49eee5548283a URL: https://github.com/llvm/llvm-project/commit/46befd720995647485c516ba94a49eee5548283a DIFF: https://github.com/llvm/llvm-project/commit/46befd720995647485c516ba94a49eee5548283a.diff L

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-31 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 42e03bb9cc9bd815476b0a3f06ac5f58826e3708 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 31 Jan 2025 19:29:05 +0300 Subject: [PATCH] [clang-tidy] add new check bugprone-reset-ambiguous-call ---

[clang] [Clang] Make OpenMP offloading consistently use the bound architecture (PR #125135)

2025-01-31 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/125135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 272ce90 - [Clang] Make OpenMP offloading consistently use the bound architecture (#125135)

2025-01-31 Thread via cfe-commits
Author: Joseph Huber Date: 2025-01-31T10:32:24-06:00 New Revision: 272ce90ed4814a2a5c87c78b5bcf24fc60b5703c URL: https://github.com/llvm/llvm-project/commit/272ce90ed4814a2a5c87c78b5bcf24fc60b5703c DIFF: https://github.com/llvm/llvm-project/commit/272ce90ed4814a2a5c87c78b5bcf24fc60b5703c.diff

[clang] [Clang] Make OpenMP offloading consistently use the bound architecture (PR #125135)

2025-01-31 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/125135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-31 Thread via cfe-commits
@@ -0,0 +1,626 @@ +#!/usr/bin/env python3 + +""" generate_unsupported_in_drivermode.py + +usage: python generate_unsupported_in_drivermode.py /Options.td [/llvm-tblgen] + +This script generates a Lit regression test file that validates that options +are only exposed to intended d

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 42e03bb9cc9bd815476b0a3f06ac5f58826e3708 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 31 Jan 2025 19:29:05 +0300 Subject: [PATCH 1/2] [clang-tidy] add new check bugprone-reset-ambiguous-call

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-01-31 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/125232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2025-01-31 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/117437 >From b5117efb5ec147a73e265023c5e3d6d9f2d750b7 Mon Sep 17 00:00:00 2001 From: yronglin Date: Sat, 1 Feb 2025 00:09:16 +0800 Subject: [PATCH] [Analyzer][CFG] Correctly handle rebuilt default arg and default ini

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-31 Thread Eli Friedman via cfe-commits
@@ -672,13 +703,15 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, Changed |= setDoesNotThrow(F); Changed |= setDoesNotCapture(F, 0); Changed |= setOnlyReadsMemory(F, 0); +Changed |= setOnlyAccessesErrnoMemory(F); efriedma-quic wrote:

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-31 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-31 Thread Aidan Goldfarb via cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">;

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-31 Thread Aaron Jarmusch via cfe-commits
ajarmusch wrote: Hi, an LLVM OpenMP Offloading CI/CD detected a new failure during testing on an AMD MI210 and MI300A. The Failed test is [test_requires_atomic_default_mem_order_seq_cst.F90](https://github.com/OpenMP-Validation-and-Verification/OpenMP_VV/blob/master/tests/5.0/requires/test_requ

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-01-31 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > I’m not in a position where I can test the patch properly right now, but if > the whole qtbase can be built (not only the reduced testcase or the specific > source file that triggered the issue before), I’m good with it - thanks! Yes it does, no problem! https://github.com/l

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-31 Thread via cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">;

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 Thread Erich Keane via cfe-commits
@@ -50,8 +50,8 @@ struct testRecoverStrictnessStruct { }; #pragma clang attribute pop -#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(function, record(unless(is_union)), variable, enum)) -// expected-error@-1 {{attribute 'abi_tag' cannot be appli

[clang] eb0af4e - [CIR] Fix shared build. NFC

2025-01-31 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2025-01-31T13:19:43-05:00 New Revision: eb0af4e48d0e039849c6bbf36e791610e7ef9a06 URL: https://github.com/llvm/llvm-project/commit/eb0af4e48d0e039849c6bbf36e791610e7ef9a06 DIFF: https://github.com/llvm/llvm-project/commit/eb0af4e48d0e039849c6bbf36e791610e7ef9a06.diff

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-31 Thread Aaron Ballman via cfe-commits
@@ -50,8 +50,8 @@ struct testRecoverStrictnessStruct { }; #pragma clang attribute pop -#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(function, record(unless(is_union)), variable, enum)) -// expected-error@-1 {{attribute 'abi_tag' cannot be appli

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-01-31 Thread Eli Friedman via cfe-commits
@@ -1596,12 +1596,14 @@ QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, QualType ProblemTy; if (T->isAnyPointerType() || T->isReferenceType() || -T->isMemberPointerType()) { +T->isMemberPointerType() || T->isArrayType()) { ---

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-31 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: This breaks `ARCH=arm64 allmodconfig` for me. ``` $ echo CONFIG_WERROR=n >kernel/configs/no-werror.config $ make -skj"$(nproc)" ARCH=arm64 LLVM=1 mrproper {allmod,no-werror.}config drivers/net/ethernet/sfc/falcon/falcon.o PLEASE submit a bug report to https://github.com/llv

[clang] [Clang] Fixed invalid virtual copy constructor assertion (PR #124819)

2025-01-31 Thread via cfe-commits
vortex73 wrote: @shafik does this look good? https://github.com/llvm/llvm-project/pull/124819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-31 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-31 Thread Aidan Goldfarb via cfe-commits
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">;

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-01-31 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/125266 This fixes instantiation of definition for friend function templates, when the declaration found and the one containing the definition have different template contexts. In these cases, the the function declarat

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-31 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Hi, an LLVM OpenMP Offloading CI/CD detected a new failure during testing on > an AMD MI210 and MI300A. The Failed test is > [test_requires_atomic_default_mem_order_seq_cst.F90](https://github.com/OpenMP-Validation-and-Verification/OpenMP_VV/blob/master/tests/5.0/requires/test_

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
@@ -22,13 +34,127 @@ using namespace llvm; namespace cir { namespace direct { +struct ConvertCIRToLLVMPass +: public mlir::PassWrapper> { + void getDependentDialects(mlir::DialectRegistry ®istry) const override { +registry.insert(); + } + void runOnOperation() final

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/125253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Initial implementation of CIR-to-LLVM IR lowering pass (PR #125260)

2025-01-31 Thread Andy Kaylor via cfe-commits
@@ -1,8 +1,10 @@ // Smoke test for ClangIR-to-LLVM IR code generation // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - | FileCheck %s -// TODO: Add checks when proper lowering is implemented. -// For now, we're just creating an empty mod

[clang] f354981 - [clang][bytecode] Stack-allocate bottom function frame (#125253)

2025-01-31 Thread via cfe-commits
Author: Timm Baeder Date: 2025-01-31T20:08:58+01:00 New Revision: f3549814f8a2e14b61ebe05b94cd216008633fa5 URL: https://github.com/llvm/llvm-project/commit/f3549814f8a2e14b61ebe05b94cd216008633fa5 DIFF: https://github.com/llvm/llvm-project/commit/f3549814f8a2e14b61ebe05b94cd216008633fa5.diff L

<    1   2   3   4   5   >