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

2025-01-26 Thread Mészáros Gergely 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] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely 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] [Clang] only inherit the parent eval context inside of lambdas (PR #124426)

2025-01-26 Thread via cfe-commits
@@ -13108,14 +13109,16 @@ class Sema final : public SemaBase { ? ExpressionEvaluationContext::ImmediateFunctionContext : ExpressionEvaluationContext::PotentiallyEvaluated); if (FD) { +auto &Current = S.currentEvaluationContext(), +

[clang] [clang] Add dump() support for lvalue APValues (PR #124476)

2025-01-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/124476 Add some lvalue information to the `dump()` output of lvalue APValues. >From 49295093082278b251325e97bf0e0c2a08e8375e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 26 Jan 2025 19:17:2

[clang] [clang] Add dump() support for lvalue APValues (PR #124476)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Add some lvalue information to the `dump()` output of lvalue APValues. --- Full diff: https://github.com/llvm/llvm-project/pull/124476.diff 3 Files Affected: - (modified) clang/lib/AST/TextNodeDumper.cpp (

[clang] [clang] Add dump() support for lvalue APValues (PR #124476)

2025-01-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/124476 >From 89b0e78879578fb740948badca141cf6acb21357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 26 Jan 2025 19:17:28 +0100 Subject: [PATCH] [clang] Add dump() support for lvalue APValues

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/123513 >From ca55a3fd1ca8e7d87758b7eda8f0d813e1bee2ce Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 19 Jan 2025 15:08:52 +0100 Subject: [PATCH] [Clang] Mangling of pack indexing type and expression for ita

[clang] [Sema] Fix __array_rank queried type at template instantiation (PR #124491)

2025-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks, the changes LGTM. I'll help you merge it if there are no other comments within today. https://github.com/llvm/llvm-project/pull/124491 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-26 Thread Michael Jabbour via cfe-commits
@@ -2551,18 +2551,7 @@ void Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, // Make the old tag definition visible. makeMergedDefinitionVisible(Hidden); - // If this was an unscoped enumeration, yank all of its enumerators - // out of the scop

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-26 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] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-26 Thread Sam James via cfe-commits
thesamesam wrote: > Is that something you've looked into by any chance? If not, it would be > worthwhile to know what the fallout is. I'm worried about the fallout and I have vague recollections of some early work I did when I assumed we were making this change for the C99 enforcement work,

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-26 Thread Sam James via cfe-commits
thesamesam wrote: @AaronBallman On another note, we've had people request this many times in GCC for C++ at least, but it has FPs as a result of how it's implemented. I was under the impression Clang generally didn't do "middle-end"-style (or optimisation-dependent) warnings. Is it implemented

[clang] [TableGen] Avoid repeated map lookups (NFC) (PR #124448)

2025-01-26 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124448 ___ 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-26 Thread Nikolaos Chatzikonstantinou 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", createyourpersonalaccount wrot

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

2025-01-26 Thread Nikolaos Chatzikonstantinou via cfe-commits
https://github.com/createyourpersonalaccount updated https://github.com/llvm/llvm-project/pull/123926 >From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Sep 17 00:00:00 2001 From: Nikolaos Chatzikonstantinou Date: Wed, 22 Jan 2025 05:43:02 -0500 Subject: [PATCH 1/8] [clang-format] Add null-term

[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)

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

[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)

2025-01-26 Thread Nathan Ridge via cfe-commits
@@ -133,8 +133,8 @@ TemplateName getReferencedTemplateName(const Type *T) { CXXRecordDecl *HeuristicResolverImpl::resolveTypeToRecordDecl(const Type *T) { assert(T); - // Unwrap type sugar such as type aliases. - T = T->getCanonicalTypeInternal().getTypePtr(); + // Unwrap

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-26 Thread Jason Rice via cfe-commits
https://github.com/ricejasonf edited https://github.com/llvm/llvm-project/pull/121417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-26 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/123922 >From 341fa64bf30585dea8193565142d713f11e008eb Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Wed, 22 Jan 2025 15:41:41 +0530 Subject: [PATCH] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" li

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

2025-01-26 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/123922 >From 5a800480f205497f9f22e833e41f4bb0065b768b Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Wed, 22 Jan 2025 15:41:41 +0530 Subject: [PATCH] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" li

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

2025-01-26 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 65df99c208ed40271f6dcdfc29bed56540467ce7 341fa64bf30585dea8193565142d713f11e008eb --e

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

2025-01-26 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/123922 >From 55582eeada535b101ec43dadbad3922021951343 Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Wed, 22 Jan 2025 15:41:41 +0530 Subject: [PATCH] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" li

[clang] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx10.2 to alias of 512 bit options (PR #124511)

2025-01-26 Thread Shengchen Kan via cfe-commits
KanRobert wrote: > We also change -mno-avx10.[1,2]-512 to alias of 256 bit options to disable > both 256 and 512 instructions. Why this? https://github.com/llvm/llvm-project/pull/124511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [clang][Sema] Handle dependent qualifier in HeuristicResolver::resolveDeclRefExpr() (PR #124515)

2025-01-26 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124515 None >From fa75210dc704848727f0822e84d1c3e6c8f0738f Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 27 Jan 2025 02:14:13 -0500 Subject: [PATCH] [clang][Sema] Handle dependent qualifier in Heurist

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-26 Thread via cfe-commits
=?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand Message-ID: In-Reply-To: https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/124407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang][Sema] Handle dependent qualifier in HeuristicResolver::resolveDeclRefExpr() (PR #124515)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/124515.diff 2 Files Affected: - (modified) clang/lib/Sema/HeuristicResolver.cpp (+3-2) - (modified) clang/unittests/Sema/HeuristicResolverT

[clang] [clang][Sema] Handle dependent qualifier in HeuristicResolver::resolveDeclRefExpr() (PR #124515)

2025-01-26 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (This is something I noticed while working on the improvements discussed [here](https://github.com/llvm/llvm-project/pull/124451#discussion_r1929954747). Sending out separately to keep things easy to review.) https://github.com/llvm/llvm-project/pull/124515 __

[clang] [clang] Add dump() support for lvalue APValues (PR #124476)

2025-01-26 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/124476 >From 373dda500b436a5ee4ca44383ccbb711090fa844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 26 Jan 2025 19:

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124503)

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

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
cor3ntin wrote: > Hmm, I'm unfamiliar with the libcxx/LLVM demangler part, but it does look > like we're duplicating something. Can anyone explain why we have to do that? https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Demangle/README.txt It's... not great ( guess how many tim

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
@@ -4787,6 +4788,7 @@ void CXXNameMangler::mangleRequirement(SourceLocation RequiresExprLoc, void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, bool AsTemplateArg) { + // clang-format off cor3ntin wrote

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124503)

2025-01-26 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124503 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

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

2025-01-26 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124502 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [Sema] Fix __array_rank queried type at template instantiation (PR #124491)

2025-01-26 Thread via cfe-commits
cor3ntin wrote: Can you add a changelog entry in clang/docs/ReleaseNotes.rst? https://github.com/llvm/llvm-project/pull/124491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124503)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/123513 >From ca55a3fd1ca8e7d87758b7eda8f0d813e1bee2ce Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 19 Jan 2025 15:08:52 +0100 Subject: [PATCH 1/2] [Clang] Mangling of pack indexing type and expression for

[clang] 7107f55 - [clang] NFC: remove redundant dyn_cast

2025-01-26 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2025-01-27T00:26:38-03:00 New Revision: 7107f55d82f8d1077d5478e8f58c94851385c06f URL: https://github.com/llvm/llvm-project/commit/7107f55d82f8d1077d5478e8f58c94851385c06f DIFF: https://github.com/llvm/llvm-project/commit/7107f55d82f8d1077d5478e8f58c94851385c06f.dif

[clang] [libcxxabi] [llvm] [Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-26 Thread via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-linux-gnu -std=c++2a | FileCheck %s + +namespace spaceship { + struct X {}; + struct Y {}; + int operator<=>(X, Y); + + // CHECK-LABEL: define {{.*}} @_ZN9spaceship1fIiEEvDTcmltcvNS_1YE_EcvNS_1XE_EcvT__EE

[clang] [StrTable] Mechanically convert Hexagon builtins to use TableGen (PR #123460)

2025-01-26 Thread Ikhlas Ajbar via cfe-commits
https://github.com/iajbar approved this pull request. LGTM, thanks. https://github.com/llvm/llvm-project/pull/123460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-26 Thread via cfe-commits
=?utf-8?q?Andr=C3=A9?= Brand , =?utf-8?q?Andr=C3=A9?= Brand Message-ID: In-Reply-To: https://github.com/cor3ntin approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/124407 ___ cfe-commits mailing list cfe-commits@lists

[clang] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx10.2 to alias of 512 bit options (PR #124511)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Phoebe Wang (phoebewang) Changes Per the feedback we got, we’d like to switch m[no-]avx10.2 to alias of 512 bit options and disable m[no-]avx10.1 due to they were alias of 256 bit options. We also change -mno-avx10.[1,2]-512 to ali

[clang] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx10.2 to alias of 512 bit options (PR #124511)

2025-01-26 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/124511 >From 7c56c51bb4d5982606ca9e2bcaac0651d59e5873 Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Mon, 27 Jan 2025 14:13:22 +0800 Subject: [PATCH 1/2] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx

[clang] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx10.2 to alias of 512 bit options (PR #124511)

2025-01-26 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/124511 >From 806ed62f5c856ad15e5290da3b3b84ddcf9083d3 Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Mon, 27 Jan 2025 14:13:22 +0800 Subject: [PATCH] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx10.2

[clang] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx10.2 to alias of 512 bit options (PR #124511)

2025-01-26 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang created https://github.com/llvm/llvm-project/pull/124511 Per the feedback we got, we’d like to switch m[no-]avx10.2 to alias of 512 bit options and disable m[no-]avx10.1 due to they were alias of 256 bit options. We also change -mno-avx10.[1,2]-512 to alias of 256

[clang] [clang] Add dump() support for lvalue APValues (PR #124476)

2025-01-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -710,10 +710,39 @@ void TextNodeDumper::Visit(const APValue &Value, QualType Ty) { << GetApproxValue(Value.getComplexFloatImag()) << 'i'; } return; - case APValue::LValue: + case APValue::LValue: { (

[clang] [clang] Add dump() support for lvalue APValues (PR #124476)

2025-01-26 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/124476 >From 373dda500b436a5ee4ca44383ccbb711090fa844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= D

[clang] [clang] Add dump() support for lvalue APValues (PR #124476)

2025-01-26 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: tbaederr wrote: @shafik Sorry, I screwed up before. The problematic APValue actually doesn't show up because the initializer is not constant. Not sure how to make the problem appear. https://gi

[clang] [clang][Sema] Handle dependent qualifier in HeuristicResolver::resolveDeclRefExpr() (PR #124515)

2025-01-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/124515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-01-26 Thread via cfe-commits
@@ -5284,8 +5284,22 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, savedContext.pop(); } - DeclGroupRef DG(Function); - Consumer.HandleTopLevelDecl(DG); + // With CWG2369, we substitute constraints before instantiating the associate

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

2025-01-26 Thread Nikolaos Chatzikonstantinou via cfe-commits
@@ -205,6 +205,12 @@ def main(): "commits" ), ) +p.add_argument( +"-0", +"--null", createyourpersonalaccount wrote: Done in e2ecb4bfc9dc8d43d7020d0d7476e86a6a29cadf, 9bd8510d2e4739dbb0347694c84360820a5343b1. https:

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

2025-01-26 Thread Nikolaos Chatzikonstantinou via cfe-commits
https://github.com/createyourpersonalaccount updated https://github.com/llvm/llvm-project/pull/123926 >From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Sep 17 00:00:00 2001 From: Nikolaos Chatzikonstantinou Date: Wed, 22 Jan 2025 05:43:02 -0500 Subject: [PATCH 1/7] [clang-format] Add null-term

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

2025-01-26 Thread Nikolaos Chatzikonstantinou via cfe-commits
@@ -261,14 +267,14 @@ def main(): "ignored by clang-format):" ) for filename in ignored_files: -print("%s" % filename) +print_filename(filename, opts.null) createyourpersonalaccount wro

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

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

[clang] [Clang] Add predefined macros for integer constants to implement section 7.18.4 of ISO/IEC 9899:1999 in `` in a safe way (PR #123514)

2025-01-26 Thread via cfe-commits
github-actions[bot] wrote: @redcode Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [Clang] Add predefined macros for integer constants to implement section 7.18.4 of ISO/IEC 9899:1999 in `` in a safe way (PR #123514)

2025-01-26 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/123514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124447)

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

[clang] f09a6f6 - [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#124447)

2025-01-26 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-26T01:34:59-08:00 New Revision: f09a6f632584c2b34f8f2d048a5420b040bb1005 URL: https://github.com/llvm/llvm-project/commit/f09a6f632584c2b34f8f2d048a5420b040bb1005 DIFF: https://github.com/llvm/llvm-project/commit/f09a6f632584c2b34f8f2d048a5420b040bb1005.diff L

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

2025-01-26 Thread Nikolaos Chatzikonstantinou via cfe-commits
createyourpersonalaccount wrote: > From #123921, it seems that you only want the new option to work with > `--staged`, but should it also work with other options that may print a list > of filenames? I don't know; I only use `git clang-format` as in #123921 and I am not familiar with all its

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

2025-01-26 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124446 ___ 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-26 Thread Nikolaos Chatzikonstantinou via cfe-commits
https://github.com/createyourpersonalaccount updated https://github.com/llvm/llvm-project/pull/123926 >From 9dfbb9a3cc7f6bc557bc1ccf25cc727a02c4274c Mon Sep 17 00:00:00 2001 From: Nikolaos Chatzikonstantinou Date: Wed, 22 Jan 2025 05:43:02 -0500 Subject: [PATCH 1/3] [clang-format] Add null-term

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

2025-01-26 Thread Nikolaos Chatzikonstantinou via cfe-commits
@@ -869,5 +875,12 @@ def convert_string(bytes_input): return str(bytes_input) +def print_filename(filename, null=False): createyourpersonalaccount wrote: I removed the default value of the argument in c47ce3ca8946f81f39757c82bfa5eb4cddc863a5. https

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-01-26 Thread Trevor Laughlin via cfe-commits
@@ -2052,6 +2052,19 @@ def referenced(self): return self._referenced +@property +def specialized(self): +""" +For a cursor that is instantiated from a template, returns a cursor +representing the template that it was instantiated from.

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

2025-01-26 Thread Mészáros Gergely 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] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely 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] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-01-26 Thread Mészáros Gergely 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] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-26 Thread via cfe-commits
https://github.com/Sirraide commented: Makes sense, but it still needs a test https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly determine constexprness of dependent lambdas. (PR #124468)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We skipped checking if a lambda is constexpr if the parent context was dependent, even if the lambda itself wasn't (and there is no other opportunity to establish constexprness) --- Full diff: https://github.c

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-26 Thread Michael Jabbour via cfe-commits
michael-jabbour-sonarsource wrote: @vsapsai Thank you for sharing the previous patch. This is really interesting. > For the record, the previous work I've abandoned is > https://reviews.llvm.org/D114833 Doesn't seem particularly relevant to this > change to be honest. As far as I can see, it

[clang] [Clang] only inherit the parent eval context inside of lambdas (PR #124426)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/124426 >From 8462731de5711879ad86919dbc06112d8136b2ba Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 25 Jan 2025 20:45:29 +0100 Subject: [PATCH 1/2] [Clang] only inherit the parent eval context inside of la

[clang] [clang] Add dump() support for lvalue APValues (PR #124476)

2025-01-26 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -710,10 +710,39 @@ void TextNodeDumper::Visit(const APValue &Value, QualType Ty) { << GetApproxValue(Value.getComplexFloatImag()) << 'i'; } return; - case APValue::LValue: + case APValue::LValue: { (

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ziqing Luo (ziqingluo-90) Changes In `VisitObjCForCollectionStmt`, the function does `evalLocation` for the current element at the original source state `Pred`. The evaluation may result in a new state, say `PredNew`. I.

[clang] [experimental] Detect return-stack-addr using CFG (PR #124133)

2025-01-26 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/124133 >From 22990789b61e9f9d22e88a6b008eb3166fd1cb56 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 23 Jan 2025 15:47:39 + Subject: [PATCH 1/3] [experimental] Detect return-stack-addr using CFG --- .../A

[clang] [TableGen] Avoid repeated map lookups (NFC) (PR #124448)

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

[clang] ccc066e - [TableGen] Avoid repeated map lookups (NFC) (#124448)

2025-01-26 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-26T11:50:10-08:00 New Revision: ccc066e8d5a742f79b41a0f90ef309d5b9e92c2a URL: https://github.com/llvm/llvm-project/commit/ccc066e8d5a742f79b41a0f90ef309d5b9e92c2a DIFF: https://github.com/llvm/llvm-project/commit/ccc066e8d5a742f79b41a0f90ef309d5b9e92c2a.diff L

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-26 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/124477 In `VisitObjCForCollectionStmt`, the function does `evalLocation` for the current element at the original source state `Pred`. The evaluation may result in a new state, say `PredNew`. I.e., there is a tran

[clang] [Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue (PR #124478)

2025-01-26 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/124478 When implmenting P2280R4 here: https://github.com/llvm/llvm-project/pull/95474 When creating the APValue to store and constexprUnknown value I used an offset of CharUnits::One() but it should have been CharUnits

[clang] [Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue (PR #124478)

2025-01-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes When implmenting P2280R4 here: https://github.com/llvm/llvm-project/pull/95474 When creating the APValue to store and constexprUnknown value I used an offset of CharUnits::One() but it should have been Cha

[clang] [Clang] Fix createConstexprUnknownAPValues to use zero offset when ceating APValue (PR #124478)

2025-01-26 Thread Shafik Yaghmour via cfe-commits
shafik wrote: No Release notes b/c this is a fix for https://github.com/llvm/llvm-project/pull/95474 which has its own release note. Tests for this fix will be added by https://github.com/llvm/llvm-project/pull/124476 https://github.com/llvm/llvm-project/pull/124478 __

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-26 Thread Ziqing Luo via cfe-commits
@@ -124,24 +124,26 @@ void ExprEngine::VisitObjCForCollectionStmt(const ObjCForCollectionStmt *S, bool isContainerNull = state->isNull(collectionV).isConstrainedTrue(); - ExplodedNodeSet dstLocation; - evalLocation(dstLocation, S, elem, Pred, state, elementV, false); ---

[clang] ab895ad - [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#124446)

2025-01-26 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-26T01:34:41-08:00 New Revision: ab895ad2bfb6835e8c47d8e616edb6cadaf59b77 URL: https://github.com/llvm/llvm-project/commit/ab895ad2bfb6835e8c47d8e616edb6cadaf59b77 DIFF: https://github.com/llvm/llvm-project/commit/ab895ad2bfb6835e8c47d8e616edb6cadaf59b77.diff L

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

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

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-26 Thread via cfe-commits
@@ -2670,8 +2670,11 @@ StmtResult Sema::BuildCXXForRangeStmt( // them in properly when we instantiate the loop. if (!LoopVar->isInvalidDecl() && Kind != BFRK_Check) { if (auto *DD = dyn_cast(LoopVar)) -for (auto *Binding : DD->bindings()) - Bindin

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-26 Thread via cfe-commits
@@ -2484,6 +2489,16 @@ TemplateInstantiator::TransformDeclRefExpr(DeclRefExpr *E) { if (PD->isParameterPack()) return TransformFunctionParmPackRefExpr(E, PD); + if (BindingDecl *BD = dyn_cast(D); BD && BD->isParameterPack()) { +BD = cast_or_null(TransformDecl(

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-26 Thread via cfe-commits
@@ -3423,6 +3425,13 @@ VarDecl *BindingDecl::getHoldingVar() const { return VD; } +llvm::ArrayRef BindingDecl::getBindingPackExprs() const { + if (!Binding) +return {}; cor3ntin wrote: Looking at how this is used, i think we can assert here instead ht

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin commented: Some nitpicks. Getting close :) https://github.com/llvm/llvm-project/pull/121417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-26 Thread via cfe-commits
@@ -1523,9 +1570,25 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) { // If the type of the decomposition is dependent, then so is the type of // each binding. if (DecompType->isDependentType()) { -for (auto *B : DD->bindings()) - B->s

[clang] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (PR #124414)

2025-01-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/124414 >From 220988c7a2fb6873e22680e6131c91e563d7c2f3 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 25 Jan 2025 16:54:18 +0100 Subject: [PATCH 1/2] [Clang] call HandleImmediateInvocation before checking fo

[clang] [clang-refactor] Add Matcher Edit refactoring rule (PR #123782)

2025-01-26 Thread Сергеев Игнатий via cfe-commits
IgnatSergeev wrote: According to PR workflows, llvm uses external CI platform (buildkite). `buildkite/github-pull-requests/linux-linux-x64` workflow seems like the one which builds and tests changes https://github.com/llvm/llvm-project/pull/123782 ___

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-01-26 Thread via cfe-commits
@@ -3324,6 +3324,9 @@ def err_attribute_argument_out_of_range : Error< def err_init_priority_object_attr : Error< "can only use 'init_priority' attribute on file-scope definitions " "of objects of class type">; +def warn_init_priority_reserved : Warning< el

[clang] [experimental] Detect return-stack-addr using CFG (PR #124133)

2025-01-26 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/124133 >From 22990789b61e9f9d22e88a6b008eb3166fd1cb56 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 23 Jan 2025 15:47:39 + Subject: [PATCH 1/3] [experimental] Detect return-stack-addr using CFG --- .../A

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-26 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/123548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-26 Thread Sergei Barannikov via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-26 Thread Chandler Carruth via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] [TableGen] Avoid repeated map lookups (NFC) (PR #124448)

2025-01-26 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Can't this use DenseSet? It looks like the names here live for the lifetime of the set. https://github.com/llvm/llvm-project/pull/124448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-26 Thread André Brand via cfe-commits
thebrandre wrote: I almost forgot to mention that this is actually valid code. [C++23 [class.mem] p6](https://wg21.link/class.mem#general-6) > A member shall not be declared twice in the *member-specification* except that > * a nested class or member class template can be declared and then later

[clang] [clang-refactor] Add Matcher Edit refactoring rule (PR #123782)

2025-01-26 Thread Сергеев Игнатий via cfe-commits
IgnatSergeev wrote: > @IgnatSergeev, thanks for posting this PR! > > First question, where is this new code tested? > > Do you know the status of automated testing for this LLVM refactoring support > software and the `clang-refactor` tool? > > According to: > > * https://llvm.org/docs/Testin

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-01-26 Thread via cfe-commits
https://github.com/el-ev edited https://github.com/llvm/llvm-project/pull/121577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-26 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 unassigned https://github.com/llvm/llvm-project/pull/124477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-26 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 unassigned https://github.com/llvm/llvm-project/pull/124477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   >