[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-01-01 Thread Ralf Jung via cfe-commits
RalfJung wrote: RISC-V has similar checks here: https://github.com/llvm/llvm-project/blob/ed572f2003275da8e06a634b4d6658b7921e8334/llvm/lib/Target/RISCV/RISCVISelLowering.cpp#L88-L100 So maybe the ARM checks could be added in a similar place? RISC-V handles ABI variants in a very clean way, an

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-01-01 Thread Ralf Jung via cfe-commits
https://github.com/RalfJung edited https://github.com/llvm/llvm-project/pull/111334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-01-01 Thread Ralf Jung via cfe-commits
https://github.com/RalfJung edited https://github.com/llvm/llvm-project/pull/111334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-01 Thread via cfe-commits
@@ -0,0 +1,623 @@ +// -*- C++ -*- +//===--===// +// +// 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

[clang] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified base classes (PR #121419)

2025-01-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/121419 >From f3b5fc2a32fe2da301779048e3afbbeb7af8cb3c Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 1 Jan 2025 01:47:17 +0200 Subject: [PATCH] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified b

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: kefan cao (caokefan) Changes Add AST Matcher for `dependentTemplateSpecializationType` Fixes:https://github.com/llvm/llvm-project/issues/121307 --- Full diff: https://github.com/llvm/llvm-project/pull/121435.diff 7 Files Affected: - (mo

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread kefan cao via cfe-commits
https://github.com/caokefan created https://github.com/llvm/llvm-project/pull/121435 Add AST Matcher for `dependentTemplateSpecializationType` Fixes:https://github.com/llvm/llvm-project/issues/121307 >From a70a9e55f99accc659b23d1a76888e151bdd8f73 Mon Sep 17 00:00:00 2001 From: Kefan Cao <459580

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

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

[clang] Reapply "[Driver][OHOS] Fix lld link issue for OHOS (#118192)" (PR #120159)

2025-01-01 Thread Peng Huang via cfe-commits
phuang wrote: Thanks for reviewing it. Could you please land it for me? Seems I cannot land it. https://github.com/llvm/llvm-project/pull/120159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang-format] Support globstar in .clang-format-ignore (PR #121404)

2025-01-01 Thread Owen Pan via cfe-commits
@@ -164,6 +164,41 @@ TEST_F(MatchFilePathTest, Path) { EXPECT_FALSE(match("foo\\", R"(foo*\)")); } +TEST_F(MatchFilePathTest, Globstar) { + EXPECT_TRUE(match("/", "**")); + EXPECT_TRUE(match("foo", "**")); + EXPECT_TRUE(match("/foo", "**")); + EXPECT_TRUE(match("foo/", "

[clang] [clang-format] Support globstar in .clang-format-ignore (PR #121404)

2025-01-01 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/121404 >From 36efaa2849ee6276be5b3c0739f295d0921d1e6e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 31 Dec 2024 08:13:53 -0800 Subject: [PATCH 1/3] [clang-format] Support globstar in .clang-format-ignore Closes #1

[clang] [clang-format] Support globstar in .clang-format-ignore (PR #121404)

2025-01-01 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/121404 >From 36efaa2849ee6276be5b3c0739f295d0921d1e6e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 31 Dec 2024 08:13:53 -0800 Subject: [PATCH 1/4] [clang-format] Support globstar in .clang-format-ignore Closes #1

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-01-01 Thread Chris Copeland via cfe-commits
@@ -16,7 +16,7 @@ // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -flto=thin -c -o %t.call_thin.bc -DCALL_LIB // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -flto=thin -c -o %t.define_thin.bc -DDEFINE_LIB -// RUN

[clang] [Clang] Add GCC's __builtin_stack_address() to Clang. (PR #121332)

2025-01-01 Thread Nikolas Klauser via cfe-commits
@@ -4782,6 +4782,30 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, Function *F = CGM.getIntrinsic(Intrinsic::frameaddress, AllocaInt8PtrTy); return RValue::get(Builder.CreateCall(F, Depth)); } + case Builtin::BI__builtin_stack_ad

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-01-01 Thread Ralf Jung via cfe-commits
@@ -311,11 +311,15 @@ ARMBaseTargetMachine::getSubtargetImpl(const Function &F) const { // function that reside in TargetOptions. resetTargetOptions(F); I = std::make_unique(TargetTriple, CPU, FS, *this, isLittle, -F.hasMinSi

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 commented: Thanks! I agree with @AmrDeveloper's comments. Otherwise, this looks pretty good! https://github.com/llvm/llvm-project/pull/121435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread Nathan Ridge via cfe-commits
@@ -1926,6 +1926,21 @@ TEST_P(ASTMatchersTest, DependentNameType) { dependentNameType())); } +TEST_P(ASTMatchersTest, DependentTemplateSpecializationType) { + if (!GetParam().isCXX()) { +return; + } + + EXPECT_TRUE(matches( + R"( + template struct A; ---

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

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

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2025-01-01 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/120055 >From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Mon, 16 Dec 2024 08:24:14 +0100 Subject: [PATCH 1/7] [clang-tidy] Add readability-string-view-substr check

[clang] bd154e8 - Reapply "[Driver][OHOS] Fix lld link issue for OHOS (#118192)" (#120159)

2025-01-01 Thread via cfe-commits
Author: Peng Huang Date: 2025-01-01T13:19:39-08:00 New Revision: bd154e823eba4d62366dfa3d56ae0b99ab171b96 URL: https://github.com/llvm/llvm-project/commit/bd154e823eba4d62366dfa3d56ae0b99ab171b96 DIFF: https://github.com/llvm/llvm-project/commit/bd154e823eba4d62366dfa3d56ae0b99ab171b96.diff LO

[clang] Reapply "[Driver][OHOS] Fix lld link issue for OHOS (#118192)" (PR #120159)

2025-01-01 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/120159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Driver][OHOS] Fix lld link issue for OHOS (#118192)" (PR #120159)

2025-01-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/6297 Here is the relevant piece of the build log fo

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-01-01 Thread Chris Copeland via cfe-commits
@@ -311,11 +311,15 @@ ARMBaseTargetMachine::getSubtargetImpl(const Function &F) const { // function that reside in TargetOptions. resetTargetOptions(F); I = std::make_unique(TargetTriple, CPU, FS, *this, isLittle, -F.hasMinSi

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-01-01 Thread Chris Copeland via cfe-commits
@@ -311,11 +311,15 @@ ARMBaseTargetMachine::getSubtargetImpl(const Function &F) const { // function that reside in TargetOptions. resetTargetOptions(F); I = std::make_unique(TargetTriple, CPU, FS, *this, isLittle, -F.hasMinSi

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

2025-01-01 Thread Jason Rice via cfe-commits
@@ -3395,26 +3395,37 @@ VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() { if (auto *Var = llvm::dyn_cast(this)) return Var; if (auto *BD = llvm::dyn_cast(this)) -return llvm::dyn_cast(BD->getDecomposedDecl()); +return llvm::dyn_cast_or_null(BD->getDecompos

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-01-01 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc edited https://github.com/llvm/llvm-project/pull/111334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Implement simple folding of preprocessor branches (rebased) (PR #121449)

2025-01-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: SR_team (sr-tream) Changes It's a rebased PR #80592 without pseudo-parser usage. Extract directive branches information from DirectiveTree, fold branches that don't end with eof. Fixes https://github.com/clangd/clangd/issues/

[clang-tools-extra] [clangd] Implement simple folding of preprocessor branches (rebased) (PR #121449)

2025-01-01 Thread via cfe-commits
https://github.com/sr-tream created https://github.com/llvm/llvm-project/pull/121449 It's a rebased PR #80592 without pseudo-parser usage. Extract directive branches information from DirectiveTree, fold branches that don't end with eof. Fixes https://github.com/clangd/clangd/issues/1661 >Fro

[clang-tools-extra] [clangd] Implement simple folding of preprocessor branches (rebased) (PR #121449)

2025-01-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: SR_team (sr-tream) Changes It's a rebased PR #80592 without pseudo-parser usage. Extract directive branches information from DirectiveTree, fold branches that don't end with eof. Fixes https://github.com/clangd/clangd/issues/1661 --- F

[clang] [clang] Use a Worklist for some CodeGenFunctions (PR #115395)

2025-01-01 Thread John McCall via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: split-file %s %t +// RUN: python %t/gen.py %t/switch-overflow.c %t/tmp.c && %clang_cc1 -emit-llvm %t/tmp.c -o - | FileCheck %t/tmp.c + +//--- gen.py rjmccall wrote: If you don't mind working on the representation issue, I think that wou

[clang] [clang-format] Add `VariableTemplates` option (PR #121318)

2025-01-01 Thread Owen Pan via cfe-commits
owenca wrote: > Should there be a parse test? About half of the `List of Strings` options don't have a `CHECK_PARSE` test. I'll fix that in a separate patch. https://github.com/llvm/llvm-project/pull/121318 ___ cfe-commits mailing list cfe-commits@li

[clang] [Clang] Repair the function "rParenEndsCast" to make incorrect judgments in template variable cases (PR #120904)

2025-01-01 Thread Owen Pan via cfe-commits
owenca wrote: See #121318. https://github.com/llvm/llvm-project/pull/120904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2025-01-01 Thread Owen Pan via cfe-commits
owenca wrote: > > If we were to add // clang-format off-next-line, would "next line" mean the > > next physical or logical/unwrapped line? > > I would expect it to apply only to the physical line, similar to how other > formatters work. However, the main concern doesn’t seem to be about its >

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

2025-01-01 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-01 Thread via cfe-commits
@@ -3395,26 +3395,37 @@ VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() { if (auto *Var = llvm::dyn_cast(this)) return Var; if (auto *BD = llvm::dyn_cast(this)) -return llvm::dyn_cast(BD->getDecomposedDecl()); +return llvm::dyn_cast_or_null(BD->getDecompos

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

2025-01-01 Thread via cfe-commits
@@ -3395,26 +3395,37 @@ VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() { if (auto *Var = llvm::dyn_cast(this)) return Var; if (auto *BD = llvm::dyn_cast(this)) -return llvm::dyn_cast(BD->getDecomposedDecl()); +return llvm::dyn_cast_or_null(BD->getDecompos

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

2025-01-01 Thread via cfe-commits
@@ -4219,6 +4220,13 @@ class DecompositionDecl final void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override; + /// Visit the variables (if any) that hold the values of evaluating the + /// binding. Only present for user-defined bindings for tuple-lik

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

2025-01-01 Thread via cfe-commits
@@ -5397,6 +5393,13 @@ bool ValueDecl::isInitCapture() const { return false; } +bool ValueDecl::isParameterPack() const { + if (const auto *NTTP = dyn_cast(this)) +return NTTP->isParameterPack(); + + return isa_and_nonnull(getType().getTypePtrOrNull()); ---

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

2025-01-01 Thread via cfe-commits
@@ -3395,26 +3395,37 @@ VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() { if (auto *Var = llvm::dyn_cast(this)) return Var; if (auto *BD = llvm::dyn_cast(this)) -return llvm::dyn_cast(BD->getDecomposedDecl()); +return llvm::dyn_cast_or_null(BD->getDecompos

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

2025-01-01 Thread via cfe-commits
@@ -237,10 +237,12 @@ bool Decl::isTemplateParameterPack() const { } bool Decl::isParameterPack() const { - if (const auto *Var = dyn_cast(this)) + if (isTemplateParameterPack()) +return true; + if (const auto *Var = dyn_cast(this)) return Var->isParameterPack();

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

2025-01-01 Thread via cfe-commits
@@ -1965,3 +1965,51 @@ CXXFoldExpr::CXXFoldExpr(QualType T, UnresolvedLookupExpr *Callee, SubExprs[SubExpr::RHS] = RHS; setDependence(computeDependence(this)); } + +ResolvedUnexpandedPackExpr::ResolvedUnexpandedPackExpr(SourceLocation BL, +

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

2025-01-01 Thread via cfe-commits
@@ -3656,6 +3656,11 @@ bool Expr::HasSideEffects(const ASTContext &Ctx, // These never have a side-effect. return false; + // ResolvedUnexpandedPackExpr is currently only used for + // structed bindings which have no side effects cor3ntin wrote: Eve

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

2025-01-01 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks a lot for this PR First review pass. I think the changes generally. I'd like to see more tests. Notably - Check it works with pack indexing - BitField tests - Codegen tests - PCH/Module tests There are unimplemented bits (ASTDumper/JSONDumpe

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

2025-01-01 Thread via cfe-commits
@@ -5321,6 +5321,54 @@ class BuiltinBitCastExpr final } }; +class ResolvedUnexpandedPackExpr final cor3ntin wrote: Can you add a comment describing this class? https://github.com/llvm/llvm-project/pull/121417 ___

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

2025-01-01 Thread via cfe-commits
@@ -951,28 +959,130 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return New; } +namespace { +// CheckBindingsCount +// - Checks the arity of the structured bindings +// - Creates the resolved pack expr if there is +//one +bool CheckBindingsCount(Sema

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

2025-01-01 Thread via cfe-commits
@@ -3395,26 +3395,37 @@ VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() { if (auto *Var = llvm::dyn_cast(this)) return Var; if (auto *BD = llvm::dyn_cast(this)) -return llvm::dyn_cast(BD->getDecomposedDecl()); +return llvm::dyn_cast_or_null(BD->getDecompos

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

2025-01-01 Thread via cfe-commits
@@ -951,28 +959,130 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return New; } +namespace { +// CheckBindingsCount +// - Checks the arity of the structured bindings +// - Creates the resolved pack expr if there is +//one +bool CheckBindingsCount(Sema

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

2025-01-01 Thread via cfe-commits
@@ -1965,3 +1965,51 @@ CXXFoldExpr::CXXFoldExpr(QualType T, UnresolvedLookupExpr *Callee, SubExprs[SubExpr::RHS] = RHS; setDependence(computeDependence(this)); } + +ResolvedUnexpandedPackExpr::ResolvedUnexpandedPackExpr(SourceLocation BL, +

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

2025-01-01 Thread via cfe-commits
@@ -19,6 +19,7 @@ #include "clang/Sema/Sema.h" #include "clang/Sema/SemaInternal.h" #include "clang/Sema/Template.h" +#include "llvm/ADT/ScopeExit.h" cor3ntin wrote: Unrelated change? https://github.com/llvm/llvm-project/pull/121417 __

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

2025-01-01 Thread via cfe-commits
@@ -7331,18 +7332,33 @@ void Parser::ParseDecompositionDeclarator(Declarator &D) { Diag(Tok, diag::err_expected_comma_or_rsquare); } -SkipUntil(tok::r_square, tok::comma, tok::identifier, - StopAtSemi | StopBeforeMatch); +//

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

2025-01-01 Thread via cfe-commits
@@ -1965,3 +1965,51 @@ CXXFoldExpr::CXXFoldExpr(QualType T, UnresolvedLookupExpr *Callee, SubExprs[SubExpr::RHS] = RHS; setDependence(computeDependence(this)); } + +ResolvedUnexpandedPackExpr::ResolvedUnexpandedPackExpr(SourceLocation BL, +

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2025-01-01 Thread via cfe-commits
MichelleCDjunaidi wrote: @5chmidti @EugeneZelenko Happy New Year! Is there anything left I need to do to get this merged? https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [Clang] Repair the function "rParenEndsCast" to make incorrect judgments in template variable cases (PR #120904)

2025-01-01 Thread via cfe-commits
@@ -2831,8 +2842,21 @@ class AnnotatingParser { IsQualifiedPointerOrReference(BeforeRParen, LangOpts); bool ParensCouldEndDecl = AfterRParen->isOneOf(tok::equal, tok::semi, tok::l_brace, tok::greater); -if (ParensAreType && !ParensCouldEndDecl) +if

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

2025-01-01 Thread Sam Elliott via cfe-commits
@@ -4963,6 +4963,10 @@ def msave_restore : Flag<["-"], "msave-restore">, Group, def mno_save_restore : Flag<["-"], "mno-save-restore">, Group, HelpText<"Disable using library calls for save and restore">; } // let Flags = [TargetSpecific] +def mload_store_pairs : Flag<["-"]

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread Amr Hesham via cfe-commits
@@ -2546,6 +2546,17 @@ Node Matchers }; +MatcherType>dependentTemplateSpecializationTypeMatcherDependentTemplateSpecializationT

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper requested changes to this pull request. https://github.com/llvm/llvm-project/pull/121435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread Amr Hesham via cfe-commits
@@ -1113,6 +1113,8 @@ AST Matchers - Add ``dependentNameType`` matcher to match a dependent name type. +- Add ``dependentTemplateSpecializationType`` matcher to match dependent template specialization types. AmrDeveloper wrote: ```suggestion - Add ``depende

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-01-01 Thread Chris Copeland via cfe-commits
chrisnc wrote: > RISC-V has similar checks here: > > https://github.com/llvm/llvm-project/blob/ed572f2003275da8e06a634b4d6658b7921e8334/llvm/lib/Target/RISCV/RISCVISelLowering.cpp#L88-L100 > > So maybe the ARM checks could be added in a similar place? RISC-V handles ABI > variants in a very cl

[clang] Make armv6 iOS by default instead of macOS when targeting Darwin (PR #117243)

2025-01-01 Thread via cfe-commits
https://github.com/Un1q32 updated https://github.com/llvm/llvm-project/pull/117243 >From 4a746cbe467f4ad22436dc206a8966ecaa77892f Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Thu, 21 Nov 2024 17:31:07 -0500 Subject: [PATCH] make armv6-darwin iOS by default --- clang/lib/Driver/ToolChains/Darwi

[clang-tools-extra] [clangd] Remove clangd's HasValue GMock matcher (PR #121309)

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

[clang] [clang][bytecode] Check for memcpy/memmove dummy pointers earlier (PR #121453)

2025-01-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/121453 None >From 9aeae2efcfb038af30f01a07eb8960a4a59929f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 2 Jan 2025 06:28:08 +0100 Subject: [PATCH] [clang][bytecode] Check for memcpy/memmove

[clang] [clang][bytecode] Check for memcpy/memmove dummy pointers earlier (PR #121453)

2025-01-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/121453.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+4-3) - (modified) clang/test/CodeGen/builtin-memfns.c (+1)

[clang-tools-extra] [clangd] Add a unit test suite for HeuristicResolver (PR #121313)

2025-01-01 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/121313 >From 9bb43932c38558741f5b26a29b7cadd9958b9eb7 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 6 Oct 2024 00:41:48 -0400 Subject: [PATCH] [clangd] Add a unit test suite for HeuristicResolver Fixes

[clang-tools-extra] [clangd] Add a unit test suite for HeuristicResolver (PR #121313)

2025-01-01 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/121313 >From 052d67acf9d1f28ba487557d8bba6732fbab538f Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 6 Oct 2024 00:41:48 -0400 Subject: [PATCH] [clangd] Add a unit test suite for HeuristicResolver Fixes

[clang-tools-extra] [clangd] Add a unit test suite for HeuristicResolver (PR #121313)

2025-01-01 Thread Nathan Ridge via cfe-commits
@@ -0,0 +1,521 @@ +//===-- HeuristicResolverTests.cpp --*- C++ -*-===// +// +// 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] 1a0d0ae - [clang-format] Add `VariableTemplates` option (#121318)

2025-01-01 Thread via cfe-commits
Author: Owen Pan Date: 2025-01-01T18:24:56-08:00 New Revision: 1a0d0ae234544dc4978f1e12730408cb83f6b923 URL: https://github.com/llvm/llvm-project/commit/1a0d0ae234544dc4978f1e12730408cb83f6b923 DIFF: https://github.com/llvm/llvm-project/commit/1a0d0ae234544dc4978f1e12730408cb83f6b923.diff LOG:

[clang] [clang-format] Add `VariableTemplates` option (PR #121318)

2025-01-01 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/121318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] bc87a53 - [clangd] Remove clangd's HasValue GMock matcher (#121309)

2025-01-01 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-01-02T01:42:21-05:00 New Revision: bc87a537d9b8117cfd63d5d9b798d6017a99097f URL: https://github.com/llvm/llvm-project/commit/bc87a537d9b8117cfd63d5d9b798d6017a99097f DIFF: https://github.com/llvm/llvm-project/commit/bc87a537d9b8117cfd63d5d9b798d6017a99097f.diff

[clang-tools-extra] [clangd] Remove clangd's HasValue GMock matcher (PR #121309)

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

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2025-01-01 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: > I’m fine with continuing the discussion in the GitHub issue Ok, let's move the discussion to the issue, and I'll delete the PR. From there, we can summarize all the concerns to proceed with a decision on this proposal. I think it would be useful to add comments or update th

[clang] [Clang] Repair the function "rParenEndsCast" to make incorrect judgments in template variable cases (PR #120904)

2025-01-01 Thread via cfe-commits
@@ -2831,8 +2842,21 @@ class AnnotatingParser { IsQualifiedPointerOrReference(BeforeRParen, LangOpts); bool ParensCouldEndDecl = AfterRParen->isOneOf(tok::equal, tok::semi, tok::l_brace, tok::greater); -if (ParensAreType && !ParensCouldEndDecl) +if

[clang] Make armv6 iOS by default instead of macOS when targeting Darwin (PR #117243)

2025-01-01 Thread via cfe-commits
Un1q32 wrote: bump https://github.com/llvm/llvm-project/pull/117243 ___ 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-01 Thread Jason Rice via cfe-commits
@@ -5397,6 +5393,13 @@ bool ValueDecl::isInitCapture() const { return false; } +bool ValueDecl::isParameterPack() const { + if (const auto *NTTP = dyn_cast(this)) +return NTTP->isParameterPack(); + + return isa_and_nonnull(getType().getTypePtrOrNull()); ---

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-01 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/4] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [Clang] Repair the function "rParenEndsCast" to make incorrect judgments in template variable cases (PR #120904)

2025-01-01 Thread via cfe-commits
https://github.com/dty2 deleted https://github.com/llvm/llvm-project/pull/120904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Repair the function "rParenEndsCast" to make incorrect judgments in template variable cases (PR #120904)

2025-01-01 Thread via cfe-commits
@@ -2474,6 +2480,11 @@ class AnnotatingParser { Current.getNextNonComment()->isOneOf(tok::comma, tok::r_brace)) { Current.setType(TT_StringInConcatenation); } +} else if (Style.isCpp() && Current.is(tok::kw_using)) { + if (Current.Next && Curren

[clang] [clang-format][NFC] Add missing config tests for List of Strings (PR #121451)

2025-01-01 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/121451 None >From 305aacf68126a7827376a0718a774006f10879f4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 1 Jan 2025 20:15:26 -0800 Subject: [PATCH] [clang-format][NFC] Add missing config tests for List of Strings

[clang] [clang-format][NFC] Add missing config tests for List of Strings (PR #121451)

2025-01-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/121451.diff 1 Files Affected: - (modified) clang/unittests/Format/ConfigParseTest.cpp (+12-5) ``diff diff --git a/clang/unittests/Form

[clang] [clang-format] Add `VariableTemplates` option (PR #121318)

2025-01-01 Thread Owen Pan via cfe-commits
owenca wrote: > > Should there be a parse test? > > About half of the `List of Strings` options don't have a `CHECK_PARSE` test. > I'll fix that in a separate patch. See #121451. https://github.com/llvm/llvm-project/pull/121318 ___ cfe-commits maili

[clang-tools-extra] [clangd] Add a unit test suite for HeuristicResolver (PR #121313)

2025-01-01 Thread Nathan Ridge via cfe-commits
@@ -0,0 +1,521 @@ +//===-- HeuristicResolverTests.cpp --*- C++ -*-===// +// +// 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] [clangd] Add a unit test suite for HeuristicResolver (PR #121313)

2025-01-01 Thread Nathan Ridge via cfe-commits
@@ -0,0 +1,521 @@ +//===-- HeuristicResolverTests.cpp --*- C++ -*-===// +// +// 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][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-01-01 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/119711 From d398fa13c2fa141954c79ca68a59c6ac506b393f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 11 Dec 2024 15:43:58 +0100 Subject: [PATCH 1/4] A

[clang] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified base classes (PR #121419)

2025-01-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/121419 >From 902d4f0817f46cc746a23569628b654c0c247601 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 1 Jan 2025 01:47:17 +0200 Subject: [PATCH] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified b

[clang] Reapply "[Driver][OHOS] Fix lld link issue for OHOS (#118192)" (PR #120159)

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

[clang] [Clang][Driver] Declare win32 threads on Windows (PR #121442)

2025-01-01 Thread Mateusz Mikuła via cfe-commits
@@ -619,7 +619,13 @@ class ToolChain { virtual bool SupportsEmbeddedBitcode() const { return false; } /// getThreadModel() - Which thread model does this target use? - virtual std::string getThreadModel() const { return "posix"; } + virtual std::string getThreadModel() c

[clang] [Clang][Driver] Declare win32 threads on Windows (PR #121442)

2025-01-01 Thread Mateusz Mikuła via cfe-commits
https://github.com/mati865 converted_to_draft https://github.com/llvm/llvm-project/pull/121442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cd23949 - [clang-format] Support globstar in .clang-format-ignore (#121404)

2025-01-01 Thread via cfe-commits
Author: Owen Pan Date: 2025-01-01T15:37:59-08:00 New Revision: cd239493c1023cbccfe6b1e9be32e68592a7f304 URL: https://github.com/llvm/llvm-project/commit/cd239493c1023cbccfe6b1e9be32e68592a7f304 DIFF: https://github.com/llvm/llvm-project/commit/cd239493c1023cbccfe6b1e9be32e68592a7f304.diff LOG:

[clang] [clang-format] Support globstar in .clang-format-ignore (PR #121404)

2025-01-01 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/121404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add `VariableTemplates` option (PR #121318)

2025-01-01 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/121318 >From 7e865d66f147da3afa1ebcd55354e97fdfd8374a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 29 Dec 2024 20:17:46 -0800 Subject: [PATCH] [clang-format] Add VariableTemplate option Closes #120148. --- clang

[clang] [clang-format] Support globstar in .clang-format-ignore (PR #121404)

2025-01-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-clang-x86_64-linux-debian` running on `gribozavr4` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/6/builds/5457 Here is the relevant piece of t

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2025-01-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/118566 >From 75da343b0bd6e3b0f3219b349f6be4c882947820 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 4 Dec 2024 02:24:12 +0200 Subject: [PATCH 1/6] [clang-format] extend clang-format directive with options t

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

2025-01-01 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][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread kefan cao via cfe-commits
caokefan wrote: @HighCommander4 https://github.com/llvm/llvm-project/pull/121435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified base classes (PR #121419)

2025-01-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/121419 >From 3f6b1d68978857035a972f49b1cfd9d9d0151be9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 1 Jan 2025 01:47:17 +0200 Subject: [PATCH] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified b

[clang] [clang-format] Support globstar in .clang-format-ignore (PR #121404)

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

[clang] [clang-format] Add `VariableTemplates` option (PR #121318)

2025-01-01 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. Should there be a parse test? https://github.com/llvm/llvm-project/pull/121318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [Clang] emit -Wignored-qualifiers diagnostic for cv-qualified base classes (PR #121419)

2025-01-01 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 %s -std=c++11 -Wignored-qualifiers -verify + +class A { }; + +typedef const A A_Const; +class B : public A_Const { }; // expected-warning {{'const' qualifier on base class type 'A_Const' (aka 'const A') have no effect}} \ +

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2025-01-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2025-01-01 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,34 @@ +.. title:: clang-tidy - bugprone-incorrect-enable-shared-from-this + +bugprone-incorrect-enable-shared-from-this +== + +Detect classes or structs that do not publicly inherit from +``std::enable_shared_from_this``, because

[clang-tools-extra] [clang-tidy] Create bugprone-incorrect-enable-shared-from-this check (PR #102299)

2025-01-01 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,64 @@ +//===--- IncorrectEnableSharedFromThisCheck.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: Apa

  1   2   >