[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: Matheus Izvekov (mizvekov) Changes This fixes the core issue described in P3579, following the design intent of P0522 to not introduce any new cases where a template template parameter match is allowed f

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/124313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-01-24 Thread Jeremy Morse via cfe-commits
@@ -412,6 +412,20 @@ New Compiler Flags only for thread-local variables, and none (which corresponds to the existing ``-fno-c++-static-destructors`` flag) skips all static destructors registration. +- The ``-fextend-variable-liveness`` flag has been added to allow for imp

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-01-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/118026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-01-24 Thread Jeremy Morse via cfe-commits
@@ -4298,6 +4298,26 @@ def stack_usage_file : Separate<["-"], "stack-usage-file">, Visibility<[CC1Option]>, HelpText<"Filename (or -) to write stack usage output to">, MarshallingInfoString>; +def fextend_variable_liveness_EQ : Joined<["-"], "fextend-variable-liveness=">

[clang] [clang][ASTImporter] Fix possible crash at import of function template (PR #124273)

2025-01-24 Thread Balázs Kéri via cfe-commits
balazske wrote: If this case is not handled, the following `setDescribedFunctionTemplate` will run into an assertion. The case happens in the test code. What exactly happens is that because of the `__get_first_arg` mismatch a field `basic_string::_M_allocated_capacity` is missing from `basic_s

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne created https://github.com/llvm/llvm-project/pull/124319 This Pull Request is to fix issue #24841. I am also cherry-pick commit a3c7fca28faee679a59afd58c2e814025771ff63. @LegalizeAdulthood @PiotrZSL >From 581cc0eda9d42458ff71f2c913a2e03d2de0b5f2 Mon Sep 17 00:0

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-24 Thread Craig Topper via cfe-commits
@@ -0,0 +1,95 @@ +//===-- RISCVInstrInfoXMips.td -*- tablegen -*-===// +// +// 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] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-24 Thread Devon Loehr via cfe-commits
DKLoehr wrote: I've now added documentation for this warning explaining what it means and how to resolve it. I also added a release note mentioning its existence. https://github.com/llvm/llvm-project/pull/117622 ___ cfe-commits mailing list cfe-commit

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features predres and ls64. (PR #124266)

2025-01-24 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/124266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-24 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/117622 >From 5ef8b8f3b84133ac7501331bf9b86b0b2f8b9ed9 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Thu, 21 Nov 2024 19:29:00 + Subject: [PATCH 1/3] Warn when unique objects might be duplicated in shared librar

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-24 Thread Michael Buch via cfe-commits
@@ -3441,13 +3441,33 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportParmVarDecl) { ASSERT_TRUE(FromVar); ASSERT_TRUE(FromVar->hasUninstantiatedDefaultArg()); ASSERT_TRUE(FromVar->getUninstantiatedDefaultArg()); + ASSERT_FALSE(FromVar->isExplicitObjectParameter());

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 01/17] initial template arg fix push --- .../clang/Basic/Diagnost

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb deleted 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-24 Thread Aidan Goldfarb via cfe-commits
@@ -4872,7 +4872,19 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "%1 and %3 of conflicting types for parameter %0}2,4">; def note_ovl_candidate_explicit_arg_mismatch_named : Note< "candidate template ignored: invalid explicitly-specified argument " -

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseCppStyleCommentsCheck.cpp - clang-tidy-===// + +// +// 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:

[clang] [HLSL] Introduce address space `hlsl_constant(2)` for constant buffer declarations (PR #123411)

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

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/123533 >From e451a8869420d9240f9006eb2adb599a3e6fd9f8 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Sun, 19 Jan 2025 23:13:46 + Subject: [PATCH 1/4] [Clang] Reject declaring an alias template with th

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/123533 >From e451a8869420d9240f9006eb2adb599a3e6fd9f8 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Sun, 19 Jan 2025 23:13:46 + Subject: [PATCH 1/4] [Clang] Reject declaring an alias template with th

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/124313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/124319 >From 581cc0eda9d42458ff71f2c913a2e03d2de0b5f2 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH 1/5] This commit is to resolve the issue #24841 -

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-24 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: There's probably a better way, but I just built my first clang normally then built a second one with `-DCMAKE_C_COMPILER` and `-DCMAKE_CXX_COMPILER` pointing to the first one, and `-DLLVM_ENABLE_MODULES=1` to enable modules. https://github.com/llvm/llvm-project/pull/122726 _

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

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

2025-01-24 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120896 >From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 22 Dec 2024 15:14:30 +0200 Subject: [PATCH] [Clang] allow restrict qualifier for array types with pointer

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features predres and ls64. (PR #124266)

2025-01-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang,compiler-rt,llvm` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/1237

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2025-01-24 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120734 >From 55fb96c1673911f30721c2a53bea32e7e4b5dc6e Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 20 Dec 2024 15:32:55 +0200 Subject: [PATCH 1/3] [Clang] handle [[warn_unused]] attribute for unused privat

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] df9b31f - [clang][Sema] Handle undeduced auto types in HeuristicResolver (#124236)

2025-01-24 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-01-24T16:11:18-05:00 New Revision: df9b31f1e0cdb8096e9d2e0749e473dd815b39f7 URL: https://github.com/llvm/llvm-project/commit/df9b31f1e0cdb8096e9d2e0749e473dd815b39f7 DIFF: https://github.com/llvm/llvm-project/commit/df9b31f1e0cdb8096e9d2e0749e473dd815b39f7.diff

[clang] [clang][Sema] Handle undeduced auto types in HeuristicResolver (PR #124236)

2025-01-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/124236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia created https://github.com/llvm/llvm-project/pull/124353 None >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH] [PGO] Add a clang option -fprofile-continuous that enables P

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

2025-01-24 Thread via cfe-commits
higher-performance wrote: Note the build error appears unrelated: ``` # | /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-gwhg7-1/llvm-project/github-pull-requests/build-runtimes/libcxxabi/test-suite-install/include/c++/v1/__chrono/utc_clock.h:94:11: error: unknown type name 'tzdb' # |9

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Wael Yehia (w2yehia) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/124353.diff 6 Files Affected: - (modified) clang/docs/UsersManual.rst (+8) - (modified) clang/include/clang/Basic/CodeGenOptions.def (+1) -

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Richard Smith via cfe-commits
@@ -65,7 +65,8 @@ namespace InFunctions { template struct S3 { // expected-note {{template parameter is declared here}} template using T = int; // expected-error {{declaration of 'T' shadows template parameter}} }; - template using Z = Z; + template // expected-note

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
w2yehia wrote: Follow up PR https://github.com/w2yehia/llvm-project/pull/1 to switch all applicable tests in `compiler-rt/test/profile/ContinuousSyncMode` to use `-fprofile-continuous` https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: This change looks good to me. https://github.com/llvm/llvm-project/pull/123533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-24 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/117622 >From 5ef8b8f3b84133ac7501331bf9b86b0b2f8b9ed9 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Thu, 21 Nov 2024 19:29:00 + Subject: [PATCH 1/2] Warn when unique objects might be duplicated in shared librar

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features predres and ls64. (PR #124266)

2025-01-24 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/124266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 474f5d2 - [FMV][AArch64] Remove features predres and ls64. (#124266)

2025-01-24 Thread via cfe-commits
Author: Alexandros Lamprineas Date: 2025-01-24T17:22:27Z New Revision: 474f5d2aefb44430b89ed72774a3c1d26a0adfb1 URL: https://github.com/llvm/llvm-project/commit/474f5d2aefb44430b89ed72774a3c1d26a0adfb1 DIFF: https://github.com/llvm/llvm-project/commit/474f5d2aefb44430b89ed72774a3c1d26a0adfb1.di

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features predres and ls64. (PR #124266)

2025-01-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang,compiler-rt,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/10771 Here is the

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-24 Thread Craig Topper via cfe-commits
@@ -514,6 +514,80 @@ class RVInstJhttps://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping @PiotrZSL @5chmidti https://github.com/llvm/llvm-project/pull/123413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2025-01-24 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/110102 >From fdfa695bc74847f5cc366bfcbf142bd5c2e3937f Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 16:55:39 +0100 Subject: [PATCH 1/6] [Clang] Add fake use emission to Clang with -fextend-lifeti

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-24 Thread Balázs Kéri via cfe-commits
@@ -3441,13 +3441,33 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportParmVarDecl) { ASSERT_TRUE(FromVar); ASSERT_TRUE(FromVar->hasUninstantiatedDefaultArg()); ASSERT_TRUE(FromVar->getUninstantiatedDefaultArg()); + ASSERT_FALSE(FromVar->isExplicitObjectParameter());

[clang] [clangd] Add code completion for if constexpr (PR #124315)

2025-01-24 Thread via cfe-commits
https://github.com/FantasqueX created https://github.com/llvm/llvm-project/pull/124315 C++17 supports `if constexpr` statement. This patch implements this in code completion. >From 47f97a5ca5964d4b970be2ee13e3dc4ffc95d3b6 Mon Sep 17 00:00:00 2001 From: Letu Ren Date: Sat, 25 Jan 2025 01:23:52

[clang] [clang] __STDC_NO_THREADS__ is no longer necessary for VS 2022 1939 and above (PR #117149)

2025-01-24 Thread Dipesh Sharma via cfe-commits
dipeshs809 wrote: @AaronBallman Thanks for reviewing the PR, have incorporated the changes. https://github.com/llvm/llvm-project/pull/117149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -39,3 +39,10 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + + +.. option:: AllowNoNamespaceComments + + When true, the check will allow that no namespace comment is present. + If

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -39,3 +39,10 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + + +.. option:: AllowNoNamespaceComments + + When true, the check will allow that no namespace comment is present. + If

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/124265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-24 Thread Balazs Benics via cfe-commits
steakhal wrote: > Working on some benchmarking. Posted some problems in the discord channel, > but working through it now, and benchmarking with the CodeChecker tool using > only clangsa. Is there an already established set of benchmarks y'all use > somewhere? IIRC, there was some github repo

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/124319 >From 581cc0eda9d42458ff71f2c913a2e03d2de0b5f2 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH 1/6] This commit is to resolve the issue #24841 -

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-24 Thread Balazs Benics via cfe-commits
@@ -437,7 +437,7 @@ bool SymbolReaper::isLiveRegion(const MemRegion *MR) { // tell if anything still refers to this region. Unlike SymbolicRegions, // AllocaRegions don't have associated symbols, though, so we don't actually // have a way to track their liveness. - retur

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-24 Thread Michael Flanders via cfe-commits
Flandini wrote: Benchmarking is taking a while for me, and I can only really run benchmarks with low run-time variance overnight. I will post more over time as I get more benchmark projects added. Here is the result from benchmarking one C project, libsodium, so far. These results are for 13

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-01-24 Thread Stephen Tozer via cfe-commits
@@ -412,6 +412,20 @@ New Compiler Flags only for thread-local variables, and none (which corresponds to the existing ``-fno-c++-static-destructors`` flag) skips all static destructors registration. +- The ``-fextend-variable-liveness`` flag has been added to allow for imp

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseCppStyleCommentsCheck.h - clang-tidy---===// +// +// 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-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseCppStyleCommentsCheck.cpp - clang-tidy-===// + +// +// 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:

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseCppStyleCommentsCheck.cpp - clang-tidy-===// + +// +// 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:

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-24 Thread Balazs Benics via cfe-commits
steakhal wrote: > Benchmarking is taking a while for me, and I can only really run benchmarks > with low run-time variance overnight. I will post more over time as I get > more benchmark projects added. > > Here is the result from benchmarking one C project, libsodium, so far. These > results

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: Thank you for working on this check! Please, read comments on previous pull request https://github.com/llvm/llvm-project/pull/99713. I think there could be some improvements done based on comments in that PR. For moving this check to `readability` section script `clang-tools-ext

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb deleted 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] [HLSL] cbuffer: Create host layout structs (PR #122820)

2025-01-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/122820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP][RISCV] Support for Zvabd fast-track proposal (PR #124239)

2025-01-24 Thread Craig Topper via cfe-commits
@@ -575,15 +575,16 @@ multiclass VALU_IV_X funct6> { SchedBinaryMC<"WriteVIALUX", "ReadVIALUV", "ReadVIALUX">; } -multiclass VALU_IV_I funct6> { - def I : VALUVI, - SchedUnaryMC<"WriteVIALUI", "ReadVIALUV">; +multiclass VALU_IV_I funct6, Operand optype =

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -108,3 +108,8 @@ void test_f1() { int ir = (f1)(nullptr); } +// __nullptr keyword in C +void foo(void *); +void bar() { foo(__nullptr); } +static_assert(nullptr == __nullptr); +static_assert(_Generic(typeof(__nullptr), nullptr_t: true, default: false)); e

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124313 >From 7a7950dd8fd6a01cdc0d1351b86962798d300ea6 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sun, 12 Jan 2025 14:45:24 -0300 Subject: [PATCH] [clang] disallow narrowing when matching template template p

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -39,3 +39,10 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + + +.. option:: AllowNoNamespaceComments + + When true, the check will allow that no namespace comment is present. + If

[clang] [llvm] [mlir] [TableGen] Only store direct superclasses in Record (PR #123072)

2025-01-24 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/123072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2025-01-24 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/11 >From 6a873f5c487a936344f6cd226b7d525b406f34b2 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 15:08:39 +0100 Subject: [PATCH 1/9] [Clang] Add "extend lifetime" flags and release note Follow

[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-24 Thread Balazs Benics via cfe-commits
@@ -437,7 +437,7 @@ bool SymbolReaper::isLiveRegion(const MemRegion *MR) { // tell if anything still refers to this region. Unlike SymbolicRegions, // AllocaRegions don't have associated symbols, though, so we don't actually // have a way to track their liveness. - retur

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

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (higher-performance) Changes It turns out we weren't handling one case: the value-initialization of a field inside a struct. I'm not sure why this falls under `IK_Direct` rather than `IK_Value` in Clang, but it seems to work. --- F

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

2025-01-24 Thread via cfe-commits
https://github.com/higher-performance created https://github.com/llvm/llvm-project/pull/124329 It turns out we weren't handling one case: the value-initialization of a field inside a struct. I'm not sure why this falls under `IK_Direct` rather than `IK_Value` in Clang, but it seems to work.

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

2025-01-24 Thread via cfe-commits
higher-performance wrote: @AaronBallman Could we get this into the 20.x release before branching? (Sorry for the last-minute PR, I just noticed the bug.) https://github.com/llvm/llvm-project/pull/124329 ___ cfe-commits mailing list cfe-commits@lists.l

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb deleted 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] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-24 Thread Balazs Benics via cfe-commits
steakhal wrote: > > Have you considered changing `MemRegion::getMemorySpace()` into > > `MemRegion::getMemorySpace(ProgramStateRef)`? > > I thought about this, but I decided against it since I am thinking that > MemSpaces will eventually be their own separate thing, not part of the > MemRegio

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [HLSL] Introduce address space `hlsl_constant(2)` for constant buffer declarations (PR #123411)

2025-01-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/123411 >From ac04912dbe81d2eeebef5a8d1eb895f3ad723cb9 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Fri, 17 Jan 2025 13:31:01 -0800 Subject: [PATCH 1/4] [HLSL] Add address space `hlsl_constant(2)` for constant buff

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -6930,17 +6934,20 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, IsConvertedConstantExpression = false; } - if (getLangOpts().CPlusPlus17) { + if (getLangOpts().CPlusPlus17 || PartialOrderingTTP) { // C++17 [temp.arg.nontype]p1:

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/123119 >From 51372333df218cfb4fa8dcc0cebee03c0e3ebc5f Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 15 Jan 2025 15:24:12 -0500 Subject: [PATCH 1/8] __nullptr -> KEYALL, added relevant test --- clang/include/c

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-24 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [clang][bytecode] Use std::allocator calls for Descriptor source (PR #123900)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/123900 >From efa329ed0262d1a8dacbc609094998dbf8157d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 21 Jan 2025 12:31:05 +0100 Subject: [PATCH] [clang][bytecode] Use std::allocator calls for

[clang-tools-extra] 46a08ce - [clang-tidy][NFC] simplify `TimerGroup` in `ClangTidyProfiling` (#123958)

2025-01-24 Thread via cfe-commits
Author: Congcong Cai Date: 2025-01-24T19:29:24+08:00 New Revision: 46a08ce83262767b3aae5c9828fabcd13f2e8a96 URL: https://github.com/llvm/llvm-project/commit/46a08ce83262767b3aae5c9828fabcd13f2e8a96 DIFF: https://github.com/llvm/llvm-project/commit/46a08ce83262767b3aae5c9828fabcd13f2e8a96.diff

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

2025-01-24 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,150 @@ +//===--- SmartptrResetAmbiguousCallCheck.cpp - clang-tidy -===// +// +// 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-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-24 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,150 @@ +//===--- SmartptrResetAmbiguousCallCheck.cpp - clang-tidy -===// +// +// 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-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-24 Thread via cfe-commits
https://github.com/mydeveloperday requested changes to this pull request. on reflection, I think better named arguments might be better https://github.com/llvm/llvm-project/pull/123926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] dac49e8 - [Arm] Fix generating code with UB in NeonEmitter (#121802)

2025-01-24 Thread via cfe-commits
Author: Momchil Velikov Date: 2025-01-24T10:57:23Z New Revision: dac49e8ddd5dc0104c238f09cdd532e6fb5c4f1d URL: https://github.com/llvm/llvm-project/commit/dac49e8ddd5dc0104c238f09cdd532e6fb5c4f1d DIFF: https://github.com/llvm/llvm-project/commit/dac49e8ddd5dc0104c238f09cdd532e6fb5c4f1d.diff LO

[clang] [Arm] Fix generating code with UB in NeonEmitter (PR #121802)

2025-01-24 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov closed https://github.com/llvm/llvm-project/pull/121802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add ConfigFile option (PR #113864)

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

[clang] [clang][bytecode] Use std::allocator calls for Descriptor source (PR #123900)

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

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-01-24 Thread via cfe-commits
@@ -205,6 +205,12 @@ def main(): "commits" ), ) +p.add_argument( +"-0", +"--null", +action="store_true", +help="print the affected paths with null-terminated characters", mydeveloperday wrote: if you

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

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

[clang] 33fc477 - [clang][NFC] Update `cxx_dr_status.html`

2025-01-24 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-24T15:01:09+04:00 New Revision: 33fc477e6e2614f71541f4287c1d68757b9203b0 URL: https://github.com/llvm/llvm-project/commit/33fc477e6e2614f71541f4287c1d68757b9203b0 DIFF: https://github.com/llvm/llvm-project/commit/33fc477e6e2614f71541f4287c1d68757b9203b0.

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

2025-01-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 29 Dec 2024 15:32:22 +0300 Subject: [PATCH 1/7] [clang-tidy] Add bugprone-reset-call check --- .../bugpr

  1   2   3   4   >