[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-30 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @shafik thanks for the review. It seems the `Test documentation build` failure isn't related to these changes. https://github.com/llvm/llvm-project/pull/112424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-10-30 Thread Eli Friedman via cfe-commits
@@ -5272,8 +5272,11 @@ bool Sema::BuiltinAssumeAligned(CallExpr *TheCall) { { ExprResult FirstArgResult = DefaultFunctionArrayLvalueConversion(FirstArg); -if (checkBuiltinArgument(*this, TheCall, 0)) efriedma-quic wrote: checkBuiltinArgument

[clang] [llvm] [llvm] Allow always dropping all llvm.type.test sequences (PR #112787)

2024-10-30 Thread via cfe-commits
https://github.com/pcc approved this pull request. https://github.com/llvm/llvm-project/pull/112787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5dac2db - [FMV][AArch64] Remove features which can be expressed as a combination of others. (#113580)

2024-10-30 Thread via cfe-commits
Author: Alexandros Lamprineas Date: 2024-10-30T11:53:50Z New Revision: 5dac2db5a8dab1feccc176cfb6cc4080fa5656e4 URL: https://github.com/llvm/llvm-project/commit/5dac2db5a8dab1feccc176cfb6cc4080fa5656e4 DIFF: https://github.com/llvm/llvm-project/commit/5dac2db5a8dab1feccc176cfb6cc4080fa5656e4.di

[clang] [clang] Don't consider the lifetimeboundCall when analyzing the gsl pointer construction. (PR #114044)

2024-10-30 Thread Gábor Horváth via cfe-commits
@@ -1094,6 +1094,24 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath &Path) { return false; } +static bool +isLifetimeboundInterleaveInGSL(llvm::ArrayRef PathRef) { Xazax-hun wrote: > The Path is [GslPointerInit, Lifetimebound] I was wondering

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features which can be expressed as a combination of others. (PR #113580)

2024-10-30 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/113580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Suppress a dangling false positive when owner is moved in member initializer. (PR #114213)

2024-10-30 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/114213 This patch extends the filtering heuristic to apply for the Lifetimebound code path. This will suppress a common false positive: ``` namespace std { template struct unique_ptr { T &operator*(); T *get() con

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/112126 >From 3e028394eb4f3ce9796359e3122cbc86270e43f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 13 Oct 2024 08:57:48 +0200 Subject: [PATCH] [clang][bytecode] Start implementing __builtin_

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/112126 >From 3e028394eb4f3ce9796359e3122cbc86270e43f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 13 Oct 2024 08:57:48 +0200 Subject: [PAT

[clang] [clang] Fix 71315698c9 in presence of incomplete types (PR #114095)

2024-10-30 Thread via cfe-commits
https://github.com/serge-sans-paille closed https://github.com/llvm/llvm-project/pull/114095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Suppress a dangling false positive when owner is moved in member initializer. (PR #114213)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes This patch extends the filtering heuristic to apply for the Lifetimebound code path. This will suppress a common false positive: ``` namespace std { template struct unique_ptr { T &operator*();

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/113612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-30 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! https://github.com/llvm/llvm-project/pull/113879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Suppress a dangling false positive when owner is moved in member initializer. (PR #114213)

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

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-10-30 Thread via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/114221 A codegen crash is occurring when a depend object was initialized with omp_all_memory in the depobj directive issue [https://github.com/llvm/llvm-project/issues/114214](url) The root cause of issue looks t

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: None (chandraghale) Changes A codegen crash is occurring when a depend object was initialized with omp_all_memory in the depobj directive issue [https://github.com/llvm/llvm-project/issues/114214](url) T

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-10-30 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 03948882d3bac33cf71a47df1c7ee0f87aad9fc2 4e6d8c1edb73fe08659519d8798cab162875ebc0 --e

[clang] [llvm] [InstrPGO] Support cold function coverage instrumentation (PR #109837)

2024-10-30 Thread Abhina Sree via cfe-commits
abhina-sree wrote: > > Hi, this PR is causing a regression on the AIX bot here > > https://lab.llvm.org/buildbot/#/builders/64/builds/1321/steps/6/logs/FAIL__Clang__pgo-cold-function-coverage_c. > > Would you be able to take a look? I think it can be resolved by using > > clang_cc1 in the test

[clang] [Clang] Start moving X86Builtins.def to X86Builtins.td (PR #106005)

2024-10-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/106005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-30 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/113796 >From aa9e5c50287aa3d60fe1145ccda6b1e5f90c53a8 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 27 Oct 2024 14:15:23 +0800 Subject: [PATCH 1/5] add Binary search operations (on sorted ranges) --- clang/lib/Tooling/I

[clang] [Clang] Add __ugly__ spelling for the msvc attribute scope (PR #113765)

2024-10-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > The MSVC FE team hasn't expressed enthusiasm for adding ugly spellings. > > > If I learn more I'll relay that info. > > > > > > Thank you for checking! Unfortunately, I think that's a reason for Clang to > > not support it for the `msvc` vendor prefix either. > > Wh

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-30 Thread via cfe-commits
@@ -411,6 +411,11 @@ SYMBOL(_27, std::placeholders::, ) SYMBOL(_28, std::placeholders::, ) SYMBOL(_29, std::placeholders::, ) +SYMBOL(binary_search, std::ranges::, ) c8ef wrote: Done. https://github.com/llvm/llvm-project/pull/113796 _

[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-10-30 Thread via cfe-commits
https://github.com/tangaac deleted https://github.com/llvm/llvm-project/pull/114189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Index][USR][NFC] Allow customizing langopts for USR generation (PR #109574)

2024-10-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/109574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling/Inclusion] Add binary search related `std::ranges` symbols to the mapping. (PR #113796)

2024-10-30 Thread via cfe-commits
c8ef wrote: Thanks for your review! https://github.com/llvm/llvm-project/pull/113796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-10-30 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/105738 >From 346c9693c7c02c82358208f8cf2a36ccab5cb70d Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Thu, 22 Aug 2024 09:44:56 -0700 Subject: [PATCH] [Clang] Match MSVC handling of duplicate header search paths

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -477,6 +486,109 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang] 4ba623f - [clang][Index][USR][NFC] Allow customizing langopts for USR generation (#109574)

2024-10-30 Thread via cfe-commits
Author: Balazs Benics Date: 2024-10-30T15:19:37+01:00 New Revision: 4ba623f24479879fb7100988f6ad5d9a62c19842 URL: https://github.com/llvm/llvm-project/commit/4ba623f24479879fb7100988f6ad5d9a62c19842 DIFF: https://github.com/llvm/llvm-project/commit/4ba623f24479879fb7100988f6ad5d9a62c19842.diff

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,399 @@ +// RUN: %clang_cc1 -verify=ref,both -std=c++2a -fsyntax-only %s +// RUN: %clang_cc1 -verify=ref,both -std=c++2a -fsyntax-only -triple aarch64_be-linux-gnu %s +// RUN: %clang_cc1 -verify

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/112517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clean up enumerators when merging named enums (PR #114240)

2024-10-30 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource created https://github.com/llvm/llvm-project/pull/114240 Clang already has a mechanism to cleanup enumerators for typedefs to anonymous enums. So the following example code used to be handled correctly while merging, and ASTWriter behaves as expec

[clang] [clang] Clean up enumerators when merging named enums (PR #114240)

2024-10-30 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-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -477,6 +486,109 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -477,6 +486,109 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor Flavor, setSeverity(Diag, Map, Loc); } +namespace { +class WarningsSpecialCaseList : public llvm::SpecialCaseList { +public: + static std::unique_ptr + create(const llvm::MemoryBuffer &MB, st

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Tom Honermann via cfe-commits
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, + CanQualType KernelNameType, +

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: > such as derived classes, Got me again :disappointed: https://github.com/llvm/llvm-project/pull/112126 ___ cfe-commit

[clang] Remove device override for operator new when the C++ standard >= 26 (PR #114056)

2024-10-30 Thread Ognyan Mirev via cfe-commits
https://github.com/OgnianM updated https://github.com/llvm/llvm-project/pull/114056 >From db9a3ff75fdaf5f838826c809f84dcc471420920 Mon Sep 17 00:00:00 2001 From: ognyan Date: Tue, 29 Oct 2024 15:38:34 +0200 Subject: [PATCH 1/2] Remove device override for operator new when the C++ standard >= 2

[clang] [clang] Clean up enumerators when merging named enums (PR #114240)

2024-10-30 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource edited https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -575,25 +575,42 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, DiagID != diag::fatal_too_many_errors && Diag.FatalsAsError) Result = diag::Severity::Error; + // Rest of the mappings are only applicable for diagnostics associated wit

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Erich Keane via cfe-commits
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">; def Borland : LangOpt<"Borland">; def CUDA : LangOpt<"CUDA">; def HIP : LangOpt<"HIP">; -def SYCL : LangOpt<"SYCLIsDevice">; +def SYCLHost : LangOpt<"SYCLIsHost">; erichkeane wrote: Those are a we

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/112126 >From 3e028394eb4f3ce9796359e3122cbc86270e43f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Erich Keane via cfe-commits
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute facilitates the generation of a

[clang] [clang] Clean up enumerators when merging named enums (PR #114240)

2024-10-30 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource edited https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Erich Keane via cfe-commits
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute facilitates the generation of a

[clang] [NFC} Call base class method in DarwinAArch64TargetInfo::getOSDefines (PR #114241)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Akira Hatanaka (ahatanak) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114241.diff 1 Files Affected: - (modified) clang/lib/Basic/Targets/AArch64.cpp (+1-1) ``diff diff --git a/clang/lib/Basic/Targets/AAr

[clang] [clang] Clean up enumerators when merging named enums (PR #114240)

2024-10-30 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource edited https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/112126 >From 3e028394eb4f3ce9796359e3122cbc86270e43f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= D

[clang] [Clang][Sema] Ignore previous partial specializations of member class templates explicitly specialized for a implicitly instantiated class template specialization (PR #113464)

2024-10-30 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/113464 >From 7542bda555601ed537dd9bacde65537021cf402d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 23 Oct 2024 10:28:23 -0400 Subject: [PATCH 1/4] [Clang][Sema] Ignore previous partial specializatio

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute facilitates the generation of a

[clang] [NFC] Call base class method in DarwinAArch64TargetInfo::getOSDefines (PR #114241)

2024-10-30 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak edited https://github.com/llvm/llvm-project/pull/114241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC} Call base class method in DarwinAArch64TargetInfo::getOSDefines (PR #114241)

2024-10-30 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: What's the motivation for this change? https://github.com/llvm/llvm-project/pull/114241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -575,25 +575,42 @@ DiagnosticIDs::getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc, DiagID != diag::fatal_too_many_errors && Diag.FatalsAsError) Result = diag::Severity::Error; + // Rest of the mappings are only applicable for diagnostics associated wit

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute facilitates the generation of a

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-30 Thread Boaz Brickner via cfe-commits
@@ -946,6 +953,27 @@ class DiagnosticsEngine : public RefCountedBase { return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this); } + /// Diagnostic suppression mappings can be used to suppress specific + /// diagnostics in specific files. + /// Mapping file is exp

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-30 Thread Chris Cotter via cfe-commits
https://github.com/ccotter created https://github.com/llvm/llvm-project/pull/114244 None >From 835540fb51517eb2b9e80a7c3b23988419cfc962 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Wed, 30 Oct 2024 10:54:49 -0400 Subject: [PATCH] Add bugprone-sprintf-overlap --- .../bugprone/BugproneTid

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Chris Cotter (ccotter) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114244.diff 8 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Tom Honermann via cfe-commits
@@ -14296,6 +14296,29 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType, tahonermann wrote: I agree it is silly as is. It will get bigger; see [here](https://gi

[clang] [clang] Clean up enumerators when merging named enums (PR #114240)

2024-10-30 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource edited https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clean up enumerators when merging named enums (PR #114240)

2024-10-30 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource edited https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/112126 >From 3e028394eb4f3ce9796359e3122cbc86270e43f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 13 Oct 2024 08:

[clang] [Tooling/Inclusion] Update std symbols mapping (PR #113612)

2024-10-30 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/113612 >From 853881983faeeb5b7e0582d3e94037c12df12c7c Mon Sep 17 00:00:00 2001 From: vvd170501 <36827317+vvd170...@users.noreply.github.com> Date: Sat, 26 Oct 2024 00:17:26 +0300 Subject: [PATCH 1/5] Fix variant parsi

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-10-30 Thread Marco Elver via cfe-commits
melver wrote: > > I wished that we could just attach attributes to type, e.g. `typedef int > > __attribute__((no_sanitize("signed-integer-overflow")) wrapping_int` or > > something. One thing here is that this should _not_ be a type modifier > > (like volatile and such), so it does not change

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Tom Honermann via cfe-commits
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, + CanQualType KernelNameType, +

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-10-30 Thread Bill Wendling via cfe-commits
@@ -197,6 +197,18 @@ static bool CanElideOverflowCheck(const ASTContext &Ctx, const BinOpInfo &Op) { if (!Op.mayHaveIntegerOverflow()) return true; + if (Op.Ty->isSignedIntegerType() && bwendling wrote: Does this (and the following if-then) need a com

[clang] Revert "[Clang][Sema] Always use latest redeclaration of primary template" (PR #114304)

2024-10-30 Thread Felipe de Azevedo Piovezan via cfe-commits
https://github.com/felipepiovezan closed https://github.com/llvm/llvm-project/pull/114304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4afa978 - Revert "[Clang][Sema] Always use latest redeclaration of primary template" (#114304)

2024-10-30 Thread via cfe-commits
Author: Felipe de Azevedo Piovezan Date: 2024-10-30T14:04:26-07:00 New Revision: 4afa9787560d00474c6ab600be70d59fa7eae87f URL: https://github.com/llvm/llvm-project/commit/4afa9787560d00474c6ab600be70d59fa7eae87f DIFF: https://github.com/llvm/llvm-project/commit/4afa9787560d00474c6ab600be70d59fa

[clang] Revert "[Clang][Sema] Always use latest redeclaration of primary template" (PR #114304)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Felipe de Azevedo Piovezan (felipepiovezan) Changes Clang importer doesn't seem to work well with this change, see discussion in the original PR. Reverts llvm/llvm-project#114258 --- Full diff: https://github.com/llvm/llvm-project/pull/1

[clang] [libunwind] [llvm] Replace documentation mentions of IRC with Discord (PR #114276)

2024-10-30 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel commented: One thing I have noticed is that this does seem to more or less by accident remove the IRC channel from the list of communication channels to which the code of conduct and other policies applied. I am on board with generally replacing use of IRC wit

[clang] [libunwind] [llvm] Replace documentation mentions of IRC with Discord (PR #114276)

2024-10-30 Thread Joshua Cranmer via cfe-commits
@@ -388,27 +384,18 @@ Guidance for office hours hosts from the list above. -.. _IRC: - -IRC +Discord jcranmer-intel wrote: You've removed the thing that lets you link to this section, if I'm recalling my RST correctly. https://github.com/llvm/llvm-p

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-10-30 Thread Pavel Yaskevich via cfe-commits
https://github.com/xedin updated https://github.com/llvm/llvm-project/pull/108631 >From a66d820647c927dee23498cd12338748f4079688 Mon Sep 17 00:00:00 2001 From: Pavel Yaskevich Date: Wed, 20 Dec 2023 14:04:22 -0800 Subject: [PATCH] [clang/AST] Make it possible to use SwiftAttr in type context S

[clang] [Clang][Sema] Always use latest redeclaration of primary template (PR #114258)

2024-10-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I should hopefully have a fix ready tomorrow... apologies for the delay @asmok-g! Getting this patch right is a bit hard since it touches all template instantiation related things :) https://github.com/llvm/llvm-project/pull/114258

[clang] [llvm] [llvm][fatlto] Drop any CFI related instrumentation after emitting bitcode (PR #112788)

2024-10-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/112788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-10-30 Thread Justin Stitt via cfe-commits
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl( return CanonTTP; } +/// Check if a type can have its sanitizer instrumentation elided. +/// Determine this by its presence in a SCL alongside its specified categories. +/// For example: +/// ignorelist.tx

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-10-30 Thread Justin Stitt via cfe-commits
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl( return CanonTTP; } +/// Check if a type can have its sanitizer instrumentation elided. +/// Determine this by its presence in a SCL alongside its specified categories. +/// For example: +/// ignorelist.tx

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-10-30 Thread Justin Stitt via cfe-commits
JustinStitt wrote: @melver > Oh nice. If you have that almost done, why do you still want the filterlist? > For the Linux kernel usecase, wouldn't the attribute be preferrable? My > intuition tells me that maintaining a filterlist detached from the code will > cause headaches, esp. during ref

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-10-30 Thread Justin Stitt via cfe-commits
JustinStitt wrote: @vitalybuka > Is "Test documentation build" error related? I am noticing this documentation build failing in other [un-related Clang patchsets](https://github.com/llvm/llvm-project/actions/runs/11598884769/job/32295763452?pr=114281) (related to `ClangFormattedStatus`?). I d

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-10-30 Thread Marco Elver via cfe-commits
melver wrote: > We could make custom types that are filtered out in an ignorelist, allowing > for types to be more expressive -- without the need for annotations Having this sort of semantic information detached from the code may cause some maintenance headaches. For example, if the type is re

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-10-30 Thread Marco Elver via cfe-commits
@@ -15,8 +15,9 @@ file at compile-time. Goal and usage == -Users of sanitizer tools, such as :doc:`AddressSanitizer`, :doc:`ThreadSanitizer` -or :doc:`MemorySanitizer` may want to disable or alter some checks for +Users of sanitizer tools, such as :doc:`AddressSan

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute specifies that a function defini

[clang-tools-extra] Extend bugprone-use-after-move check to handle std::optional::reset() and std::any::reset() (PR #114255)

2024-10-30 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 a78861fc55d18046989ff4d624a037e9181da170 2d907aa6453b43a2bb537cf1eb32d7f3f8a850a7 --e

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-30 Thread Tom Honermann via cfe-commits
@@ -198,3 +198,12 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr &AL) { handleSimpleAttribute(*this, D, AL); } + +void SemaSYCL::handleKernelEntryPointAttr(Decl *D, const ParsedAttr &AL) { + ParsedType PT = AL.getTypeArg(); + TypeSourceInfo *TSI = nullptr; +

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-10-30 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Is "Test documentation build" error related? https://github.com/llvm/llvm-project/pull/107332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[LLVM] Add IRNormalizer Pass" (PR #113780)

2024-10-30 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I believe the failure reported in the original bot is only under expensive checks (`-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON`) https://github.com/llvm/llvm-project/pull/113780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] b01e2a8 - [llvm] Allow always dropping all llvm.type.test sequences

2024-10-30 Thread via cfe-commits
Author: Paul Kirth Date: 2024-10-30T16:56:30-07:00 New Revision: b01e2a8b5620466c3b80cc6f049efbc90b9d103a URL: https://github.com/llvm/llvm-project/commit/b01e2a8b5620466c3b80cc6f049efbc90b9d103a DIFF: https://github.com/llvm/llvm-project/commit/b01e2a8b5620466c3b80cc6f049efbc90b9d103a.diff LO

[clang] [NFC] Delete unused clang-formatted-file.txt/ClangFormattedStatus.rst files (PR #109220)

2024-10-30 Thread Rahul Joshi via cfe-commits
jurahul wrote: Started https://github.com/llvm/llvm-project/pull/114331 https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-30 Thread Eli Friedman via cfe-commits
@@ -8714,6 +8714,21 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (LangOpts.CUDAIsDevice && LangOpts.HIP) { +if (FunctionDecl *FD = getCurFunctionDecl(); +FD && +

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-10-30 Thread Chuanqi Xu via cfe-commits
@@ -85,19 +85,20 @@ class PrerequisiteModules { /// different versions and different source files. class ModulesBuilder { ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/106683 ___ cfe-commits mailin

[clang] [NFC] Delete unused clang-formatted-file.txt/ClangFormattedStatus.rst files (PR #109220)

2024-10-30 Thread Chris Apple via cfe-commits
cjappl wrote: FYI @jurahul - having a build failure when I try to build docs after this change. I think a few little bits were missed. ``` Warning, treated as error: ./llvm-project/build/tools/clang/docs/ClangFormattedStatus.rst:document isn't included in any toctree ``` https://github.com/ll

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #113845)

2024-10-30 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. I have a couple of small nits that I left as comments. Otherwise LGTM! Also, thank you for writing detailed explanations in your PR descriptions, they help me catch up to your code quickly. https://github.com/llvm/llvm-project/pull/113845

[clang] [clang][CodeGen][OpenCL] Fix `alloca` handling & `sret`when compiling for (PR #113930)

2024-10-30 Thread Matt Arsenault via cfe-commits
@@ -108,11 +108,15 @@ RawAddress CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, CharUnits Align, if (AllocaAddr) *AllocaAddr = Alloca; llvm::Value *V = Alloca.getPointer(); + assert((!getLangOpts().OpenCL || + CGM.getTarget().getTargetAddressSpace(getASTAl

[clang] [NFC] Delete unused clang-formatted-file.txt/ClangFormattedStatus.rst files (PR #109220)

2024-10-30 Thread Rahul Joshi via cfe-commits
jurahul wrote: Let me delete those references. The ones in generated_formatted_state.py are fine https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-30 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/113984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] De-duplicate some logic in `HeaderFileInfoTrait` (PR #114330)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114330.diff 2 Files Affected: - (modified) clang/lib/Serialization/ASTReader.cpp (+11-18) - (modified) clang/lib/Serialization/ASTRead

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-10-30 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,713 @@ +//===-- Mustache.cpp --===// +// +// 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: Ap

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-10-30 Thread Pavel Yaskevich via cfe-commits
xedin wrote: @erichkeane CI are green, could you please merge since I don't have permissions?... https://github.com/llvm/llvm-project/pull/108631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #113845)

2024-10-30 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/113845 >From 1524ca532c9c1ef015c162360d4e4688296bbc0d Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 27 Oct 2024 16:30:48 -0700 Subject: [PATCH 1/5] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functio

[clang] dafb90d - [NFC] Call base class method in DarwinAArch64TargetInfo::getOSDefines (#114241)

2024-10-30 Thread via cfe-commits
Author: Akira Hatanaka Date: 2024-10-30T18:00:59-07:00 New Revision: dafb90dedcda1ad7b94b0bcdbbe7478f7d0f31f6 URL: https://github.com/llvm/llvm-project/commit/dafb90dedcda1ad7b94b0bcdbbe7478f7d0f31f6 DIFF: https://github.com/llvm/llvm-project/commit/dafb90dedcda1ad7b94b0bcdbbe7478f7d0f31f6.diff

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-10-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: I think this is almost there. It's probably about ready after you address the remaining comments. https://github.com/llvm/llvm-project/pull/105893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-10-30 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/105893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >