[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -91,15 +91,60 @@ void bar() { namespace GH82104 { -template int Zero = 0; +template int Value = sizeof...(D); -template -using T14 = decltype([]() { return Zero; }()); +template +using T14 = decltype([](auto Param) { + return Value + V + (int)sizeof(Param); +}("hell

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. I agree this is not the long term way forward, but it improves the current interim solution, so LGTM, minus nit. https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-c

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -91,15 +91,84 @@ void bar() { namespace GH82104 { -template int Zero = 0; +template int Value = sizeof...(D); mizvekov wrote: ```suggestion template constexpr int Value = sizeof...(D); ``` https://github.com/llvm/llvm-project/pull/89934 __

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-08-26 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-08-26 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @cor3ntin What's the deadline? https://github.com/llvm/llvm-project/pull/104458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Use upper case letters for bool conversion suffix (PR #104882)

2024-08-26 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: @Da-Viper I believe there's some merge conflicts to fix before being able to merge :) https://github.com/llvm/llvm-project/pull/104882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-26 Thread via cfe-commits
@@ -103,6 +103,13 @@ class TypeDescriptor { /// representation is that of bitcasting the floating-point value to an /// integer type. TK_Float = 0x0001, +/// An _BitInt(N) type. Lowest bit is 1 for a signed value, 0 for an +/// unsigned value. Remaining bits

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-26 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-26 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: Hello! Requesting upstream to take a look again as I believe all feedback at the moment has been addressed. Please let me know if I still miss anything. https://github.com/llvm/llvm-project/pull/99282 ___ cfe-commits mailing lis

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-26 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-26 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-26 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Concepts] Fix the constraint equivalence checking involving parameter packs (PR #102131)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -972,8 +972,30 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( // equivalence. LocalInstantiationScope ScopeForParameters(S); if (auto *FD = DeclInfo.getDecl()->getAsFunction()) -for (auto *PVD : FD->parameters()) - ScopeForParameters

[clang] [analyzer] Report violations of the "returns_nonnull" attribute (PR #106048)

2024-08-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/106048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Report violations of the "returns_nonnull" attribute (PR #106048)

2024-08-26 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Thanks for the updates! https://github.com/llvm/llvm-project/pull/106048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Report violations of the "returns_nonnull" attribute (PR #106048)

2024-08-26 Thread Donát Nagy via cfe-commits
@@ -588,8 +588,8 @@ Warns when a null pointer is passed to a pointer which has a _Nonnull type. .. _nullability-NullReturnedFromNonnull: -nullability.NullReturnedFromNonnull (ObjC) -"" +nullability.NullReturnedFromNonnull +

[clang] [analyzer] Report violations of the "returns_nonnull" attribute (PR #106048)

2024-08-26 Thread Donát Nagy via cfe-commits
@@ -51,3 +54,15 @@ int *cannot_return_null() { __attribute__((returns_nonnull)) int *passthrough(int *p) { return p; // no-warning: we have no evidence that `p` is null, i.e., violating the contract } + +__attribute__((noreturn)) +void exit(int); NagyDonat w

[clang] [clang] Remove an incorrect assertion in ConstantFoldAttrs (PR #105789)

2024-08-26 Thread via cfe-commits
Sirraide wrote: > Hm, what comment are you referring to exactly? Ah, this one: https://github.com/llvm/llvm-project/blob/d88876e74f7882643546becc544a771a5e5e9787/clang/include/clang/Sema/Sema.h#L1838-L1842 The main thing I’m (if only a bit) worried about is that some code somewhere might be ex

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/106117 This patch covers CWG issues regarding declaration matching when `friend` declarations are involved: [CWG138](https://cplusplus.github.io/CWG/issues/138.html), [CWG386](https://cplusplus.github.io/CWG/issues/3

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch covers CWG issues regarding declaration matching when `friend` declarations are involved: [CWG138](https://cplusplus.github.io/CWG/issues/138.html), [CWG386](https://cplusplus.github.io/CWG

[clang] [clang][FMV] Pass the '+fmv' target-feature when FMV is enabled. (PR #87942)

2024-08-26 Thread via cfe-commits
Sirraide wrote: Makes sense; I was just going through some of the old prs w/ little activity to make sure we haven’t forgotten about them ;Þ https://github.com/llvm/llvm-project/pull/87942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [lldb] Use CLANG_RESOURCE_DIR more consistently (PR #103388)

2024-08-26 Thread Kim Gräsman via cfe-commits
kimgr wrote: Thanks! https://github.com/llvm/llvm-project/pull/103388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,105 @@ +// RUN: %clang_cc1 -triple i386-unknown-unknown -target-feature +mmx \ +// RUN: -target-feature +sse2 -O0 -emit-llvm %s -o - | FileCheck %s + +// Test that mmx/sse2 shift intrinsics map to the expected builtins. + +// Don't include mm_malloc.h, it's system spec

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
@@ -0,0 +1,387 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only \ pogo59 wrote: Okay. https://github.com/llvm/llvm-project/pull/105852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/105852 >From fbdf1c4a2bc88e1872bb6b91265b142319b7ccc8 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 23 Aug 2024 09:40:08 -0700 Subject: [PATCH 1/2] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/105852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)

2024-08-26 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 edited https://github.com/llvm/llvm-project/pull/105852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Use upper case letters for bool conversion suffix (PR #104882)

2024-08-26 Thread via cfe-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/104882 >From 5ca62897b62306958a67e0534a96909ea5c704de Mon Sep 17 00:00:00 2001 From: Ebuka Ezike Date: Sun, 11 Aug 2024 21:39:35 +0100 Subject: [PATCH 01/14] [clang-tidy] use upper cace letters for bool conversion su

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-26 Thread via cfe-commits
@@ -11,99 +11,84 @@ #include "llvm/Support/ErrorHandling.h" namespace clang { +std::vector getCOrLater(const int MinimumStd) { + std::vector Result{}; + +#define TESTLANGUAGE(lang, version, std_flag, version_index) +#define TESTLANGUAGE_C(lang, version, std_flag, version_inde

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-26 Thread via cfe-commits
@@ -27,37 +27,117 @@ struct TestClangConfig { /// The argument of the `-target` command line flag. std::string Target; - bool isC() const { return Language == Lang_C89 || Language == Lang_C99; } - - bool isC99OrLater() const { return Language == Lang_C99; } - - bool isC

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-26 Thread via cfe-commits
@@ -0,0 +1,47 @@ + +//===-- TestLanguage.def - Language Versions for Testing *- 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: A

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-26 Thread via cfe-commits
@@ -11,99 +11,84 @@ #include "llvm/Support/ErrorHandling.h" namespace clang { +std::vector getCOrLater(const int MinimumStd) { + std::vector Result{}; + +#define TESTLANGUAGE(lang, version, std_flag, version_index) +#define TESTLANGUAGE_C(lang, version, std_flag, version_inde

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-26 Thread via cfe-commits
@@ -27,37 +27,117 @@ struct TestClangConfig { /// The argument of the `-target` command line flag. std::string Target; - bool isC() const { return Language == Lang_C89 || Language == Lang_C99; } - - bool isC99OrLater() const { return Language == Lang_C99; } - - bool isC

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-26 Thread via cfe-commits
@@ -1224,7 +1224,7 @@ TEST_P(ASTMatchersTest, CastExpression_MatchesImplicitCasts) { } TEST_P(ASTMatchersTest, CastExpr_DoesNotMatchNonCasts) { - if (GetParam().Language == Lang_C89 || GetParam().Language == Lang_C99) { + if (GetParam().isC()) { Sirraide wr

[clang] [clang][test] add TestLanguage.def to specify all tested language versions (PR #94243)

2024-08-26 Thread via cfe-commits
@@ -27,37 +27,117 @@ struct TestClangConfig { /// The argument of the `-target` command line flag. std::string Target; - bool isC() const { return Language == Lang_C89 || Language == Lang_C99; } - - bool isC99OrLater() const { return Language == Lang_C99; } - - bool isC

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-26 Thread Connie Zhu via cfe-commits
https://github.com/connieyzhu updated https://github.com/llvm/llvm-project/pull/105902 >From 5801e58f5e89fb90a3b18414e1cb959d027b4fee Mon Sep 17 00:00:00 2001 From: Connie Zhu Date: Fri, 23 Aug 2024 17:23:22 + Subject: [PATCH 1/2] [clang][test] Rewrote test to work with lit internal shell

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-26 Thread Connie Zhu via cfe-commits
@@ -0,0 +1,22 @@ +import argparse +import os + +def get_file_size(file_path): +try: +return os.path.getsize(file_path) +except: +print(f"Unable to get file size of {file_path}") +return None connieyzhu wrote: Now that I look at it

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-26 Thread Connie Zhu via cfe-commits
https://github.com/connieyzhu updated https://github.com/llvm/llvm-project/pull/105902 >From 5801e58f5e89fb90a3b18414e1cb959d027b4fee Mon Sep 17 00:00:00 2001 From: Connie Zhu Date: Fri, 23 Aug 2024 17:23:22 + Subject: [PATCH 1/3] [clang][test] Rewrote test to work with lit internal shell

[clang] [clang][Sema] Fix particular operator overload crash (PR #105976)

2024-08-26 Thread Matheus Izvekov via cfe-commits
@@ -7425,6 +7425,13 @@ void Sema::AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, /*ExplicitArgs*/ nullptr, ObjectType, ObjectClassification, Args, CandidateSet, Supp

[clang] [clang][test] Rewrote test to work with lit internal shell syntax (PR #105902)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,22 @@ +import argparse ilovepi wrote: > Test files generally do not have license headers. Ah, right. I was thinking of them differently, since they're not par to of the test per se, but now that you spell it out, that makes sense. Thanks. https://g

[clang] [clang][Sema] Fix particular operator overload crash (PR #105976)

2024-08-26 Thread Nicolas van Kempen via cfe-commits
@@ -7425,6 +7425,13 @@ void Sema::AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, /*ExplicitArgs*/ nullptr, ObjectType, ObjectClassification, Args, CandidateSet, Supp

[clang] [Clang] Correctly finds subexpressions of immediate invocations (PR #106055)

2024-08-26 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-26 Thread Greg Roth via cfe-commits
https://github.com/pow2clk commented: Looks good overall. I have some areas where I still feel confused though https://github.com/llvm/llvm-project/pull/104544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-26 Thread Greg Roth via cfe-commits
@@ -1154,3 +1156,70 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +static bool calculateIsIntangibleType(QualType Ty) { + Ty = Ty->getCanonicalTypeUnqualified(); + if (Ty->isBuiltinType()) +return Ty->isHLSLSp

[clang] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-26 Thread Greg Roth via cfe-commits
@@ -1154,3 +1156,70 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +static bool calculateIsIntangibleType(QualType Ty) { + Ty = Ty->getCanonicalTypeUnqualified(); + if (Ty->isBuiltinType()) +return Ty->isHLSLSp

[clang] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-26 Thread Greg Roth via cfe-commits
@@ -1154,3 +1156,70 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +static bool calculateIsIntangibleType(QualType Ty) { + Ty = Ty->getCanonicalTypeUnqualified(); + if (Ty->isBuiltinType()) +return Ty->isHLSLSp

[clang] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-26 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/104544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-26 Thread Greg Roth via cfe-commits
@@ -1154,3 +1156,70 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +static bool calculateIsIntangibleType(QualType Ty) { + Ty = Ty->getCanonicalTypeUnqualified(); + if (Ty->isBuiltinType()) +return Ty->isHLSLSp

[clang] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-26 Thread Greg Roth via cfe-commits
@@ -5683,6 +5685,14 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return true; return false; } + case UTT_IsIntangibleType: +if (!T->isVoidType() && !T->isIncompleteArrayType()) + if (Self.RequireCompleteType(TInfo->getTypeLoc().getBe

[clang] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-26 Thread Greg Roth via cfe-commits
@@ -1154,3 +1156,70 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +static bool calculateIsIntangibleType(QualType Ty) { + Ty = Ty->getCanonicalTypeUnqualified(); + if (Ty->isBuiltinType()) +return Ty->isHLSLSp

[clang] [HLSL] Implement '__builtin_hlsl_is_intangible' type trait (PR #104544)

2024-08-26 Thread Greg Roth via cfe-commits
@@ -1154,3 +1156,70 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { } return false; } + +static bool calculateIsIntangibleType(QualType Ty) { + Ty = Ty->getCanonicalTypeUnqualified(); + if (Ty->isBuiltinType()) +return Ty->isHLSLSp

[clang] [Clang] Correctly finds subexpressions of immediate invocations (PR #106055)

2024-08-26 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/106055 >From 33ff4f03257c9af03192b92cbd425b731e0f238c Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 26 Aug 2024 12:28:07 +0200 Subject: [PATCH 1/2] [Clang] Correctly finds subexpressions of immediate invoc

[clang] Allow installation of Clang .cfg files if they where generated. (PR #105580)

2024-08-26 Thread Vladimir Vereschaka via cfe-commits
https://github.com/vvereschaka updated https://github.com/llvm/llvm-project/pull/105580 >From b34482f4f9e1273f69d47b2d500989a5c3c857df Mon Sep 17 00:00:00 2001 From: Vladimir Vereschaka Date: Wed, 21 Aug 2024 13:37:47 -0700 Subject: [PATCH] Allow installation of Clang .cfg files if they where

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-26 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH] [Clang] prevent assertion failure when converting vectors to i

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-08-26 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/85325 >From 907210a3ad3d829a8e49a5c976d129f8653801bf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 14 Mar 2024 18:24:37 +0100 Subject: [PATCH 01/15] [Clang] Add `dump()` method for `Attr` --- clang/include/clan

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-26 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman could you review these changes? https://github.com/llvm/llvm-project/issues/105486#issuecomment-2308879407 thanks https://github.com/llvm/llvm-project/pull/105727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-08-26 Thread via cfe-commits
@@ -13830,61 +13820,27 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { getSema().AddTemplateParametersToLambdaCallOperator(NewCallOperator, Class, TPL); - // Transform the type of the original lambda's call o

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-08-26 Thread via cfe-commits
@@ -361,3 +361,11 @@ LLVM_DUMP_METHOD void ConceptReference::dump(raw_ostream &OS) const { ASTDumper P(OS, Ctx, Ctx.getDiagnostics().getShowColors()); P.Visit(this); } + +//===--===// +// Attr method imple

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-08-26 Thread via cfe-commits
@@ -3140,13 +3184,20 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-08-26 Thread via cfe-commits
@@ -7231,12 +7226,16 @@ QualType TreeTransform::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { -TypeLocBuilder AuxiliaryTLB; -AuxiliaryTLB.reserve(TL.getFullD

[clang] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var (PR #105930)

2024-08-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/105930 >From cd1c20ce8856ca24ffea6db22a758e588f0398e2 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 Aug 2024 10:08:23 +0200 Subject: [PATCH] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use

[clang] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var (PR #105930)

2024-08-26 Thread Amr Hesham via cfe-commits
@@ -15,70 +15,70 @@ // DXIL_NATIVE_HALF: define noundef half @ // SPIR_NATIVE_HALF: define spir_func noundef half @ -// DXIL_NATIVE_HALF: %hlsl.frac = call half @llvm.dx.frac.f16( -// SPIR_NATIVE_HALF: %hlsl.frac = call half @llvm.spv.frac.f16( +// DXIL_NATIVE_HALF: %hlsl.frac

[clang] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var (PR #105930)

2024-08-26 Thread Amr Hesham via cfe-commits
@@ -25,7 +25,7 @@ void main(unsigned GI : SV_GroupIndex) {} //CHECK-NEXT: entry: //CHECK-NEXT: call void @"?call_me_first@@YAXXZ"() //CHECK-NEXT: call void @"?then_call_me@@YAXXZ"() -//CHECK-NEXT: %0 = call i32 @llvm.dx.flattened.thread.id.in.group() +//CHECK-NEXT: %0 =

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-08-26 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/85325 >From 907210a3ad3d829a8e49a5c976d129f8653801bf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 14 Mar 2024 18:24:37 +0100 Subject: [PATCH 01/16] [Clang] Add `dump()` method for `Attr` --- clang/include/clan

[clang] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var (PR #105930)

2024-08-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/105930 >From f161a06ef18e52fd03809a7b73cc0aa978513344 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 Aug 2024 10:08:23 +0200 Subject: [PATCH] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use

[clang] [clang] Add support for omitting only global destructors (PR #104899)

2024-08-26 Thread Shoaib Meenai via cfe-commits
https://github.com/smeenai closed https://github.com/llvm/llvm-project/pull/104899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7945435 - [clang] Add support for omitting only global destructors (#104899)

2024-08-26 Thread via cfe-commits
Author: Shoaib Meenai Date: 2024-08-26T13:11:05-07:00 New Revision: 7945435f46c4b0a9fd08c6d76eee8ea8f5e37bca URL: https://github.com/llvm/llvm-project/commit/7945435f46c4b0a9fd08c6d76eee8ea8f5e37bca DIFF: https://github.com/llvm/llvm-project/commit/7945435f46c4b0a9fd08c6d76eee8ea8f5e37bca.diff

[clang] [HLSL] Apply NoRecurse attrib to all HLSL functions (PR #105907)

2024-08-26 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/105907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,109 @@ +//===--- Mustache.h -*- 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] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,135 @@ +//===- llvm/unittest/Support/MustacheTest.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

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

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,276 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2024-08-26 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,135 @@ +//===- llvm/unittest/Support/MustacheTest.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var (PR #105930)

2024-08-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/105930 >From 452073564bd2e5c43b7a485db2fdf1652aa3da1f Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 Aug 2024 10:08:23 +0200 Subject: [PATCH] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use

[clang] [clang][AArch64] Add SME2.1 feature macros (PR #105657)

2024-08-26 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm milestoned https://github.com/llvm/llvm-project/pull/105657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread via cfe-commits
cor3ntin wrote: I think both CWG1900 and CW1477 can be marked as implemented with such a test ```cpp namespace N { struct A { friend int f(); }; } int N::f() { return 0; } int N::g() { return 0; } // expected-error@-1 {{out-of-line definition of 'g' does not match any declaration in names

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread via cfe-commits
@@ -568,6 +568,80 @@ namespace cwg137 { // cwg137: yes const volatile int *cvqcv = static_cast(cvp); } +namespace cwg138 { // cwg138: partial +namespace example1 { +void foo(); // #cwg138-ex1-foo +namespace A { + using example1::foo; // #cwg138-ex1-using + class X { +s

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread via cfe-commits
@@ -1369,6 +1369,75 @@ namespace cwg385 { // cwg385: 2.8 // expected-note@#cwg385-n {{member is declared here}} } +namespace cwg386 { // cwg386: no +namespace example1 { +namespace N1 { +// Binds name 'f' in N1. Target scope is N1. +template void f( T* x ) { + // ... othe

[clang] [Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (PR #104458)

2024-08-26 Thread via cfe-commits
cor3ntin wrote: I think there won't be a rc4 so it's actually probably too late (@tobias) - but presumably there will be a `19.0.2` version a couple of weeks after release. So ~2 or 3 weeks? https://github.com/llvm/llvm-project/pull/104458 ___ cfe-co

[clang] [clang][AArch64] Add SME2.1 feature macros (PR #105657)

2024-08-26 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: /cherry-pick 2617023923175b0fd2a8cb94ad677c061c01627f https://github.com/llvm/llvm-project/pull/105657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Add SME2.1 feature macros (PR #105657)

2024-08-26 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#106135 https://github.com/llvm/llvm-project/pull/105657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [docs] Document the missing Apple availability platforms (PR #104653)

2024-08-26 Thread Ian Anderson via cfe-commits
@@ -1637,31 +1637,42 @@ specifies availability for the current target platform, the availability attributes are ignored. Supported platforms are: ``ios`` +``ios_app_extension`` ian-twilightcoder wrote: I actually feel like these don't need descriptions and w

[clang] [clang][test] Rewrote test using $() to work with lit internal shell syntax (PR #105902)

2024-08-26 Thread Connie Zhu via cfe-commits
https://github.com/connieyzhu edited https://github.com/llvm/llvm-project/pull/105902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c821cc3 - [Clang] Correctly finds subexpressions of immediate invocations (#106055)

2024-08-26 Thread via cfe-commits
Author: cor3ntin Date: 2024-08-26T22:55:32+02:00 New Revision: c821cc3f8824e29ba1861fb1de43e90543928498 URL: https://github.com/llvm/llvm-project/commit/c821cc3f8824e29ba1861fb1de43e90543928498 DIFF: https://github.com/llvm/llvm-project/commit/c821cc3f8824e29ba1861fb1de43e90543928498.diff LOG:

[clang] [Clang] Correctly finds subexpressions of immediate invocations (PR #106055)

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

[clang] [Clang] Correctly finds subexpressions of immediate invocations (PR #106055)

2024-08-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/4816 Here is the relevant piece of t

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-26 Thread via cfe-commits
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr, return false; } +static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) { Sirraide wrote: > The > [Attr.td](https://github.com/llvm/llvm-project/blob/m

[clang] [docs] Document the missing Apple availability platforms (PR #104653)

2024-08-26 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/104653 >From e908672f2f9c3a8995dcc7c50fe1fb72fdd467e9 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Fri, 16 Aug 2024 17:32:29 -0700 Subject: [PATCH] [docs] Document the missing availability platforms and

[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-08-26 Thread via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx11 -pedantic -std=c++11 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx14 -pedantic -std=c++14 %s +// RUN: %clang_cc1 -fsyntax-only -verify=expected,cxx17 -pedantic -std=c++17 %s +// RUN: %clang_cc1 -

[clang] [docs] Document the missing Apple availability platforms (PR #104653)

2024-08-26 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/104653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [docs] Document the missing availability platforms and environments (PR #104653)

2024-08-26 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/104653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix diagnostic for function overloading in extern "C" (PR #106033)

2024-08-26 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM Thanks for the patch! I’ll merge once CI is done with this. https://github.com/llvm/llvm-project/pull/106033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/106117 >From 65307bd2f5f8ca5c6aaa24335c77a63280d668e3 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 26 Aug 2024 20:45:31 +0300 Subject: [PATCH 1/2] [clang] Add tests for CWG issues about friend declarati

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/106117 >From 65307bd2f5f8ca5c6aaa24335c77a63280d668e3 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 26 Aug 2024 20:45:31 +0300 Subject: [PATCH 1/3] [clang] Add tests for CWG issues about friend declarati

[clang-tools-extra] [clang-tidy] Use upper case letters for bool conversion suffix (PR #104882)

2024-08-26 Thread via cfe-commits
Da-Viper wrote: > @Da-Viper I believe there's some merge conflicts to fix before being able to > merge :) rebased https://github.com/llvm/llvm-project/pull/104882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang-format] Add new option: WrapNamespaceBodyWithNewlines (PR #106145)

2024-08-26 Thread via cfe-commits
https://github.com/dmasloff created https://github.com/llvm/llvm-project/pull/106145 I would like to suggest a new clang-format option for llvm-project - WrapNamespaceBodyWithNewlines. I think it can be added to upstream since it is used by many popular public repositories, for example, [ytsa

  1   2   3   4   5   >