[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-25 Thread Fangrui Song via cfe-commits
@@ -1,11 +1,20 @@ // RUN: %clang -### -S -fwrapv -fno-wrapv -fwrapv %s 2>&1 | FileCheck -check-prefix=CHECK1 %s // CHECK1: -fwrapv // +// RUN: %clang -### -S -fwrapv-pointer -fno-wrapv-pointer -fwrapv-pointer %s 2>&1 | FileCheck -check-prefix=CHECK1-POINTER %s +// CHECK1-POIN

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

2025-01-25 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/124426 As we create defaul constructors lazily, we should not inherit from the parent evaluation context. However, we need to make an exception for lambdas (in particular their conversion operators, which are also im

[clang] [clang-format] Fix a TableGen crash on comment after l_paren (PR #124380)

2025-01-25 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/124380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124425 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 This patch migrat

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

2025-01-25 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 This p

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

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes As we create defaul constructors lazily, we should not inherit from the parent evaluation context. However, we need to make an exception for lambdas (in particular their conversion operators, which are also imp

[clang] [clang-format] Treat uppercase identifiers after struct as macros (PR #124397)

2025-01-25 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/124397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-25 Thread Trevor Laughlin via cfe-commits
https://github.com/trelau updated https://github.com/llvm/llvm-project/pull/123539 >From bb0542e8f2ad50892ee9d2c1f76ec1def85c3e56 Mon Sep 17 00:00:00 2001 From: Trevor Laughlin Date: Sun, 19 Jan 2025 19:21:10 -0500 Subject: [PATCH 1/2] [cindex] Add API to query the class methods of a type ---

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

2025-01-25 Thread Thorsten Klein via cfe-commits
https://github.com/thorsten-klein updated https://github.com/llvm/llvm-project/pull/124265 >From 9f3bc5021e6da87fa9a8db60b513acb87ed6b02f Mon Sep 17 00:00:00 2001 From: "Klein, Thorsten (GDE-EDSI1)" Date: Fri, 24 Jan 2025 13:46:24 +0100 Subject: [PATCH] added option AllowNoNamespaceComments for

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

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

[clang] [clang-format] Fix a TableGen crash on comment after l_paren (PR #124380)

2025-01-25 Thread Hirofumi Nakamura via cfe-commits
@@ -101,6 +101,9 @@ TEST_F(FormatTestTableGen, BangOperators) { " \"zerozero\",\n" " true: // default\n" " \"positivepositive\");\n"

[clang] [clang-format] Fix a TableGen crash on comment after l_paren (PR #124380)

2025-01-25 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 approved this pull request. https://github.com/llvm/llvm-project/pull/124380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Track source deduction guide for alias template deduction guides (PR #123875)

2025-01-25 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/123875 >From ff55e99b39e2e60859a93db5a479ac2128761e30 Mon Sep 17 00:00:00 2001 From: antangelo Date: Tue, 21 Jan 2025 22:53:39 -0500 Subject: [PATCH 1/2] [clang] Track source deduction guide for alias template deduc

[clang] [clang] Track source deduction guide for alias template deduction guides (PR #123875)

2025-01-25 Thread via cfe-commits
@@ -2290,18 +2290,21 @@ CXXDeductionGuideDecl *CXXDeductionGuideDecl::Create( ASTContext &C, DeclContext *DC, SourceLocation StartLoc, ExplicitSpecifier ES, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, SourceLocation EndLocation, CXXConstr

[clang] [clang] Track source deduction guide for alias template deduction guides (PR #123875)

2025-01-25 Thread via cfe-commits
@@ -8147,6 +8149,26 @@ TEST_P(ImportFunctions, CTADWithLocalTypedef) { ASSERT_TRUE(ToD); } +TEST_P(ImportFunctions, CTADAliasTemplate) { + Decl *TU = getTuDecl( + R"( + template struct A { +A(T); + }; + template + using B = A; + B b{(i

[clang] [clang] Track source deduction guide for alias template deduction guides (PR #123875)

2025-01-25 Thread via cfe-commits
antangelo wrote: > LGTM modulo nits. Can we observe that through sema/pch tests? This functionality isn't yet observable in code (i.e. through lit tests), so it can't be tested through PCH tests on its own (which is primarily why I haven't split this code off sooner). In the CTAD from inherite

[clang] [llvm] [clang][docs] Fix typos concerning wasm __funcref (PR #124365)

2025-01-25 Thread Timothy Herchen via cfe-commits
https://github.com/anematode updated https://github.com/llvm/llvm-project/pull/124365 >From 2508da6fd7f38101011573460724f13df1c1616d Mon Sep 17 00:00:00 2001 From: Timothy Herchen Date: Fri, 24 Jan 2025 15:13:30 -0800 Subject: [PATCH 1/2] [clang][docs] Fix typos concerning wasm __funcref ---

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

2025-01-25 Thread Jason Rice via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++26 %s -verify ricejasonf wrote: I added these to the bottom of this file. https://github.com/llvm/llvm-project/pull/121417 ___ cfe-commits mailing list cfe-co

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

2025-01-25 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] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124430)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124430 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 #124430)

2025-01-25 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 #124434)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124434 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 #124433)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124433 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] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124434)

2025-01-25 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] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124433)

2025-01-25 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 #124434)

2025-01-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bulk port 64-bit x86 builtins to TableGen (PR #121043)

2025-01-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-multistage` running on `systemz-1` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/98/builds/941 Here is the relevant piece of the

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

2025-01-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d2c7cab - [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#124434)

2025-01-25 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-25T15:25:17-08:00 New Revision: d2c7cabe0453d6a6d03c15b7ae1800b53de9e182 URL: https://github.com/llvm/llvm-project/commit/d2c7cabe0453d6a6d03c15b7ae1800b53de9e182 DIFF: https://github.com/llvm/llvm-project/commit/d2c7cabe0453d6a6d03c15b7ae1800b53de9e182.diff L

[clang] 0f3c288 - [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#124433)

2025-01-25 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-25T15:25:04-08:00 New Revision: 0f3c2884f3ccbdbe396e4388feb8be716b50dd68 URL: https://github.com/llvm/llvm-project/commit/0f3c2884f3ccbdbe396e4388feb8be716b50dd68 DIFF: https://github.com/llvm/llvm-project/commit/0f3c2884f3ccbdbe396e4388feb8be716b50dd68.diff L

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

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124434 ___ 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 #124433)

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

[clang] c1ec5be - [clang-format] Fix a TableGen crash on comment after l_paren (#124380)

2025-01-25 Thread via cfe-commits
Author: Owen Pan Date: 2025-01-25T18:31:42-08:00 New Revision: c1ec5beb4ab36c2c4d99ed6d735d217e74364771 URL: https://github.com/llvm/llvm-project/commit/c1ec5beb4ab36c2c4d99ed6d735d217e74364771 DIFF: https://github.com/llvm/llvm-project/commit/c1ec5beb4ab36c2c4d99ed6d735d217e74364771.diff LOG:

[clang] [clang-format] Fix a TableGen crash on comment after l_paren (PR #124380)

2025-01-25 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` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/12436 Here is the relevant piec

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2025-01-25 Thread Owen Pan via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

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

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes This patch avoids repeated map lookups and constructions of temporary std::string instances by switching to StringMap. --- Full diff: https://github.com/llvm/llvm-project/pull/124448.diff 1 Files Aff

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

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124448 This patch avoids repeated map lookups and constructions of temporary std::string instances by switching to StringMap. >From 2273e9e518fa5625a40298a970dfd3ad1c3f27db Mon Sep 17 00:00:00 2001 From: Kazu H

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve CXXDependentScopeMemberExpr (PR #124449)

2025-01-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124449 None >From 6f0ff1b166f2ea3b0bfa58ca2a0911832d751bdf Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 26 Jan 2025 01:30:28 -0500 Subject: [PATCH] [clang][CodeComplete] Use HeuristicResolver to resol

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

2025-01-25 Thread André Brand via cfe-commits
thebrandre wrote: Here are some details why I think this is a valid fix: If you take a look at the generated AST you can see that the EnumConstantDecl for `X 'S::E'` appears twice in the instantiation in the AST for the following example. ```cpp template struct S { enum E : T; enum E

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

2025-01-25 Thread André Brand via cfe-commits
thebrandre wrote: @cor3ntin I came across this while refactoring, which is still in progress because I'm coming across odd things like this that make me a bit uncertain. Sometimes it's hard to tell if its a bug or a feature. https://github.com/llvm/llvm-project/pull/124407

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

2025-01-25 Thread André Brand via cfe-commits
https://github.com/thebrandre updated https://github.com/llvm/llvm-project/pull/124407 From b7f41ebfb51066c48231e44f7e2b681f0c4aba08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Sat, 25 Jan 2025 14:25:32 +0100 Subject: [PATCH 1/3] [clang] Fix issues on template class enum

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-25 Thread André Brand via cfe-commits
https://github.com/thebrandre created https://github.com/llvm/llvm-project/pull/124409 This enhances consistency with CXXRecordDecl and FunctionDecl, which also provide this information in the AST dump. From cf9c5e1593b1a46a4a29925ff4543e7565dcab7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: André Brand (thebrandre) Changes This enhances consistency with CXXRecordDecl and FunctionDecl, which also provide this information in the AST dump. --- Full diff: https://github.com/llvm/llvm-project/pull/124409.diff 1 Files Affected:

[clang] [llvm] Generate `DW_AT_RUST_short_backtrace` attributes for `DISubprogram` nodes (PR #123683)

2025-01-25 Thread via cfe-commits
@@ -605,6 +605,10 @@ HANDLE_DW_AT(0x3b28, BORLAND_Delphi_ABI, 0, BORLAND) HANDLE_DW_AT(0x3b29, BORLAND_Delphi_return, 0, BORLAND) HANDLE_DW_AT(0x3b30, BORLAND_Delphi_frameptr, 0, BORLAND) HANDLE_DW_AT(0x3b31, BORLAND_closure, 0, BORLAND) + +// Rust extensions. +HANDLE_DW_AT(0x3

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-25 Thread André Brand via cfe-commits
thebrandre wrote: ... and the information was very helpful when tracking down enum related issues like #124405. https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

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

2025-01-25 Thread via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call + +bugprone-smartptr-reset-ambiguous-call +== + +Finds potentially erroneous calls to ``reset`` method on EugeneZelenko wrote: Please fill as much

[clang] [scan-build-py] use explicit compiler wrapper paths for intercept (PR #123252)

2025-01-25 Thread Aymeric Wibo via cfe-commits
obiwac wrote: Ping https://github.com/llvm/llvm-project/pull/123252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2