[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread via cfe-commits
https://github.com/mydeveloperday edited https://github.com/llvm/llvm-project/pull/83709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -313,9 +313,75 @@ Response HandleRecordDecl(const CXXRecordDecl *Rec, // This is to make sure we pick up the VarTemplateSpecializationDecl that this // lambda is defined inside of. - if (Rec->isLambda()) + if (Rec->isLambda()) { if (const Decl *LCD = Rec->getLam

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -313,9 +313,75 @@ Response HandleRecordDecl(const CXXRecordDecl *Rec, // This is to make sure we pick up the VarTemplateSpecializationDecl that this // lambda is defined inside of. - if (Rec->isLambda()) + if (Rec->isLambda()) { if (const Decl *LCD = Rec->getLam

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -614,10 +614,14 @@ bool Sema::SetupConstraintScope( // reference the original primary template. // We walk up the instantiated template chain so that nested lambdas get // handled properly. -for (FunctionTemplateDecl *FromMemTempl = - PrimaryTempl

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -313,9 +313,75 @@ Response HandleRecordDecl(const CXXRecordDecl *Rec, // This is to make sure we pick up the VarTemplateSpecializationDecl that this // lambda is defined inside of. - if (Rec->isLambda()) + if (Rec->isLambda()) { if (const Decl *LCD = Rec->getLam

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -313,9 +313,75 @@ Response HandleRecordDecl(const CXXRecordDecl *Rec, // This is to make sure we pick up the VarTemplateSpecializationDecl that this // lambda is defined inside of. - if (Rec->isLambda()) + if (Rec->isLambda()) { if (const Decl *LCD = Rec->getLam

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -313,9 +313,75 @@ Response HandleRecordDecl(const CXXRecordDecl *Rec, // This is to make sure we pick up the VarTemplateSpecializationDecl that this // lambda is defined inside of. - if (Rec->isLambda()) + if (Rec->isLambda()) { if (const Decl *LCD = Rec->getLam

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -13905,6 +13911,31 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { /*IsInstantiation*/ true); SavedContext.pop(); + // Recompute the dependency of the lambda so that we can defer the lambda call + // construction until after

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -313,9 +313,75 @@ Response HandleRecordDecl(const CXXRecordDecl *Rec, // This is to make sure we pick up the VarTemplateSpecializationDecl that this // lambda is defined inside of. - if (Rec->isLambda()) + if (Rec->isLambda()) { if (const Decl *LCD = Rec->getLam

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -313,9 +313,75 @@ Response HandleRecordDecl(const CXXRecordDecl *Rec, // This is to make sure we pick up the VarTemplateSpecializationDecl that this // lambda is defined inside of. - if (Rec->isLambda()) + if (Rec->isLambda()) { if (const Decl *LCD = Rec->getLam

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -13905,6 +13911,31 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { /*IsInstantiation*/ true); SavedContext.pop(); + // Recompute the dependency of the lambda so that we can defer the lambda call + // construction until after

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -614,6 +682,15 @@ Sema::InstantiatingTemplate::InstantiatingTemplate( PointOfInstantiation, InstantiationRange, Param, Template, TemplateArgs) {} +Sema::InstantiatingTemplate::InstantiatingTemplate( +Sema &SemaRef, SourceLocation PointOfInstantiation

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -313,9 +313,75 @@ Response HandleRecordDecl(const CXXRecordDecl *Rec, // This is to make sure we pick up the VarTemplateSpecializationDecl that this // lambda is defined inside of. - if (Rec->isLambda()) + if (Rec->isLambda()) { if (const Decl *LCD = Rec->getLam

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -13905,6 +13911,31 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { /*IsInstantiation*/ true); SavedContext.pop(); + // Recompute the dependency of the lambda so that we can defer the lambda call + // construction until after

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -313,9 +313,75 @@ Response HandleRecordDecl(const CXXRecordDecl *Rec, // This is to make sure we pick up the VarTemplateSpecializationDecl that this // lambda is defined inside of. - if (Rec->isLambda()) + if (Rec->isLambda()) { if (const Decl *LCD = Rec->getLam

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-05 Thread via cfe-commits
@@ -13905,6 +13911,31 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { /*IsInstantiation*/ true); SavedContext.pop(); + // Recompute the dependency of the lambda so that we can defer the lambda call + // construction until after

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-05 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 923ddf6 - [ObjC] Check entire chain of superclasses to see if class layout is statically known (#81335)

2024-03-05 Thread via cfe-commits
Author: AtariDreams Date: 2024-03-05T06:32:45-05:00 New Revision: 923ddf65f4e21ec67018cf56e823895de18d83bc URL: https://github.com/llvm/llvm-project/commit/923ddf65f4e21ec67018cf56e823895de18d83bc DIFF: https://github.com/llvm/llvm-project/commit/923ddf65f4e21ec67018cf56e823895de18d83bc.diff L

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-03-05 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/81335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-03-05 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/82611 >From 109e72445fb8da4dd0cf08b5985986ca864a3536 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Thu, 22 Feb 2024 11:23:30 + Subject: [PATCH 1/2] [clang][nullability] Don't discard expression state be

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-05 Thread Alexandros Lamprineas via cfe-commits
@@ -11455,9 +11465,8 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD, } // If this is 'default', permit the forward declaration. - if (!OldFD->isMultiVersion() && - ((NewTA && NewTA->isDefaultVersion() && !OldTA) || - (NewTVA && Ne

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-05 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/83887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-03-05 Thread Iain Sandoe via cfe-commits
iains wrote: Do you expect to make any changes to type streaming? https://github.com/llvm/llvm-project/pull/75894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-03-05 Thread via cfe-commits
@@ -248,12 +251,12 @@ class JoinedStateBuilder { // initialize the state of each basic block differently. return {AC.Analysis.typeErasedInitialElement(), AC.InitEnv.fork()}; if (All.size() == 1) martinboehme wrote: > guard on ExprBehavior as we

[clang] [Sema] gh56556 (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/83997 CI >From 69414d7352b170f6fcff22c6f5dfa91cc76b0b58 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 5 Mar 2024 19:56:59 +0800 Subject: [PATCH] gh56556 --- clang/lib/Sema/TreeTransform.h | 6 -- 1 file

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy updated https://github.com/llvm/llvm-project/pull/82872 >From 557ee75d60f0fdb4dd2b353c819b4f22f71b46d7 Mon Sep 17 00:00:00 2001 From: 11happy Date: Sat, 24 Feb 2024 13:50:30 +0530 Subject: [PATCH 1/2] add new flag -Wreturn-mismatch Signed-off-by: 11happy --- clang/

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -fsyntax-only -Wignored-qualifiers -Wno-error=return-type -Wno-error=implicit-int -verify -fblocks -Wno-unreachable-code -Wno-unused-value -Wno-strict-prototypes +// RUN: %clang_cc1 -triple x86_64-apple-darwin9

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -1,5 +1,5 @@ -// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -Wno-int-conversion -Wno-strict-prototypes -Wno-tautological-constant-compare -Wtautological-unsigned-zero-compare -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-purge=none -verify %s -Wno-

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Bhuminjay Soni via cfe-commits
@@ -1,5 +1,5 @@ // XFAIL: target=aarch64-pc-windows-msvc -// RUN: %clang_cc1 -Wno-return-type -Wno-unused-value -emit-llvm %s -w -o - | FileCheck %s +// RUN: %clang_cc1 -Wno-return-type -Wno-return-mismatch -Wno-unused-value -emit-llvm %s -w -o - | FileCheck %s

[clang-tools-extra] [clangd] Add metric for rename decl kind (PR #83867)

2024-03-05 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/83867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add metric for rename decl kind (PR #83867)

2024-03-05 Thread kadir çetinkaya via cfe-commits
@@ -1072,6 +1072,10 @@ llvm::Expected rename(const RenameInputs &RInputs) { if (Reject) return makeError(*Reject); + static constexpr trace::Metric RenameTriggerCounter( kadircet wrote: can you do this at line 1065 instead? that way we can better trac

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-03-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from a simplification that you can fix up when landing. Thank you for this effort, this is fantastic work! https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits mailing l

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -414,20 +415,42 @@ NarrowingKind StandardConversionSequence::getNarrowingKind( if (Initializer->isValueDependent()) return NK_Dependent_Narrowing; - if (Initializer->isCXX11ConstantExpr(Ctx, &ConstantValue)) { + Expr::EvalResult R; + if ((Ctx.g

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: We had a lot that were like this previously. Guessing this one slipped through because of the `zlib` requirement. Does this work with `-nogpulib` instead? Usually easier than passing the dummy CUDA path. https://github.com/llvm/llvm-project/pull/84008

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/83906 >From 7808b8a0f4ab70733ebff4a6b8793f4918d0107b Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 1 Mar 2024 15:28:32 -0600 Subject: [PATCH] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' Summary:

[clang] [clang][NFC] Regroup declarations in `Sema` (PR #82217)

2024-03-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: We talked about this at the Clang Language WG meeting and there were a lot of good arguments for either formatting/reorganizing as separate commits or for formatting/reorganizing in the same commit. If the folks doing a downstream pulldown are experienced with the code base

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > We had a lot that were like this previously. Guessing this one slipped > through because of the `zlib` requirement. I actually think there are some more left; for example `clang/test/Driver/cuda-dwarf-2.cu` has many `not %clang` invocations that don't specify `--cuda-path`. Th

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > It definitely doesn't work for the "pure" CUDA invocations, it still finds my > local installation and complains. It might work for the OpenMP invocations, > but hard to tell for me on a system with CUDA installed. As it's a `.cu` test > after all, I think I would prefer the u

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > It definitely doesn't work for the "pure" CUDA invocations, it still finds > > my local installation and complains. It might work for the OpenMP > > invocations, but hard to tell for me on a system with CUDA installed. As > > it's a `.cu` test after all, I think I would prefe

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > Might need `-nogpulib -nogpuinc` in those cases, we do that in other `.cu` > > files in the test suite. > > No, I already tried that, it doesn't work for me. All > `clang/test/Driver/*.cu` that supply `-nocudainc` also pass `--cuda-path`... The only reason it will fail with

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Joseph Huber via cfe-commits
@@ -325,6 +325,9 @@ BUILTIN(__builtin_amdgcn_read_exec_hi, "Ui", "nc") BUILTIN(__builtin_amdgcn_endpgm, "v", "nr") +BUILTIN(__builtin_amdgcn_get_fpenv, "WUi", "n") jhuber6 wrote: There's no builtin as far as I'm aware. I think there might be some pragmas ho

[clang] [Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (PR #83842)

2024-03-05 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/83842 >From 4725321631e69c8d8480e0dba85128d177541a89 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 4 Mar 2024 08:10:35 -0500 Subject: [PATCH 1/3] [Clang][Sema] Fix crash when using name of Unresolve

[clang] [Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (PR #83842)

2024-03-05 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/83842 >From 4725321631e69c8d8480e0dba85128d177541a89 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 4 Mar 2024 08:10:35 -0500 Subject: [PATCH 1/4] [Clang][Sema] Fix crash when using name of Unresolve

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: In any case, it's not really important and this works. I'm mostly just curious why it doesn't seem to work as I would expect since there might be something to fix. https://github.com/llvm/llvm-project/pull/84008 ___ cfe-commits mailing

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/83987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Congcong Cai via cfe-commits
@@ -156,7 +156,8 @@ Changes in existing checks - Improved :doc:`cppcoreguidelines-missing-std-forward ` check by no longer - giving false positives for deleted functions. + giving false positives for deleted functions and fix false negative when one + parameter is forward

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM since it is helpful to improve this check. But I still take a negative view about use `std::forward` in lambda body. https://github.com/llvm/llvm-project/pull/83987 ___ cfe-commits mailing

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/84014 None >From bdefe754c14c5e050ebf2b9c82eca458041564a4 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Tue, 5 Mar 2024 05:35:16 -0800 Subject: [PATCH] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. -

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/84014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/83906 >From 169f8914270725bd94b14a20f5f91005ce59f494 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 1 Mar 2024 15:28:32 -0600 Subject: [PATCH] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' Summary:

[clang] [Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (PR #83842)

2024-03-05 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/83842 >From 4725321631e69c8d8480e0dba85128d177541a89 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 4 Mar 2024 08:10:35 -0500 Subject: [PATCH 1/5] [Clang][Sema] Fix crash when using name of Unresolve

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > > Might need `-nogpulib -nogpuinc` in those cases, we do that in other > > > `.cu` files in the test suite. > > > > > > No, I already tried that, it doesn't work for me. All > > `clang/test/Driver/*.cu` that supply `-nocudainc` also pass `--cuda-path`... > > The only reason

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > The invocations in `clang/test/Driver/cuda-omp-unsupported-debug-options.cu` > don't pass `-emit-llvm` but `-###`. > > ``` > > cat /dev/null | ./bin/clang -### -x cuda - -nogpulib -nogpuinc -c && echo > $? > ``` > > should error with recent CUDA installations because of `sm_

[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)

2024-03-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/84017 Summary: We already had a special CUDA default that better tracked the state as of modern CUDA installations. Recently this was bumped up to `sm_52`, but there was a location that wasn't respecting this. Fix that.

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Found it https://github.com/llvm/llvm-project/pull/84017. https://github.com/llvm/llvm-project/pull/84008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: We already had a special CUDA default that better tracked the state as of modern CUDA installations. Recently this was bumped up to `sm_52`, but there was a location

[clang] [clang] Sequence C++20 Parenthesized List Init (PR #83476)

2024-03-05 Thread Douglas Deslauriers via cfe-commits
vapdrs wrote: > @vapdrs Do you need us to merge that for you? Thanks Yes, I do not have write access to the repository. Thank you! https://github.com/llvm/llvm-project/pull/83476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Ok, but that still doesn't change the fact that the Clang driver will search for a system-wide CUDA installation unless passed `--cuda-path`... https://github.com/llvm/llvm-project/pull/84008 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang] Add cuda-path arguments to failing test (PR #84008)

2024-03-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Ok, but that still doesn't change the fact that the Clang driver will search > for a system-wide CUDA installation unless passed `--cuda-path`... We also do this with the GCC toolchain, the issue is whether or not there's an error if it didn't find it. Doing `clang -v` will al

[clang] a642eb8 - [Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (#83842)

2024-03-05 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-03-05T08:52:20-05:00 New Revision: a642eb89bdaf10c6b4994fc1187de27b441236ed URL: https://github.com/llvm/llvm-project/commit/a642eb89bdaf10c6b4994fc1187de27b441236ed DIFF: https://github.com/llvm/llvm-project/commit/a642eb89bdaf10c6b4994fc1187de27b441236ed

[clang] [Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (PR #83842)

2024-03-05 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/83842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Thanks for the PR! At first I was hesitant if this checker is the right place for this API. But actually, it should be fine to have it here. Maybe the stdlibraryfunctionschecker would be a better place in long term, but I don't

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/83675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-05 Thread Balazs Benics via cfe-commits
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call) const { + DestinationArgExp

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-05 Thread Balazs Benics via cfe-commits
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call) const { + DestinationArgExp

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-05 Thread Balazs Benics via cfe-commits
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call) const { + DestinationArgExp

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-05 Thread Balazs Benics via cfe-commits
@@ -2516,6 +2518,47 @@ void CStringChecker::evalSprintfCommon(CheckerContext &C, const CallEvent &Call, C.addTransition(State); } +void CStringChecker::evalGetentropy(CheckerContext &C, +const CallEvent &Call) const { + DestinationArgExp

[clang-tools-extra] [clang-tidy] fix false negative in cppcoreguidelines-missing-std-forward (PR #83987)

2024-03-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/83987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Print the "aggregate" for aggregate deduction guide decl. (PR #84018)

2024-03-05 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/84018 I found this is useful for debugging purpose to identify different kind of deduction guide decl. >From 63e1f39e9580f4b33fcd86572aea70bf46edb264 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 5 Mar 2024 14:

[clang] [AST] Print the "aggregate" for aggregate deduction guide decl. (PR #84018)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes I found this is useful for debugging purpose to identify different kind of deduction guide decl. --- Full diff: https://github.com/llvm/llvm-project/pull/84018.diff 3 Files Affected: - (modified) clang/inclu

[clang] [AST] Print the "aggregate" for aggregate deduction guide decl. (PR #84018)

2024-03-05 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff f55b79f59a77b4be586d649e9ced9f8667265011 63e1f39e9580f4b33fcd86572aea70bf46edb264 --

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread Botond István Horváth via cfe-commits
HoBoIs wrote: @erichkeane a question: this PR is partly a fix for a DR for c++20. Right now I only apply the fix for C++20 and newer. Is there a reason for not applying this fix for older standards? I don't see how it would break any existing code, and making the fix retroactive doesn't make a

[clang] [analyzer][NFC] Make CheckerDocumentation checker in-sync with actual checker callbacks (PR #83973)

2024-03-05 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM. Minor remark: "signatires" is misspelled in the commit message. https://github.com/llvm/llvm-project/pull/83973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [analyzer][NFC] Make CheckerDocumentation checker in-sync with actual checker callbacks (PR #83973)

2024-03-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/83973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Make CheckerDocumentation checker in-sync with actual checker callbacks (PR #83973)

2024-03-05 Thread Balazs Benics via cfe-commits
steakhal wrote: > LGTM. > > Minor remark: "signatires" is misspelled in the commit message. Fixed the typos. Thanks! https://github.com/llvm/llvm-project/pull/83973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] 0d8e16a - [analyzer][NFC] Make CheckerDocumentation checker in-sync with actual checker callbacks (#83973)

2024-03-05 Thread via cfe-commits
Author: Balazs Benics Date: 2024-03-05T15:02:41+01:00 New Revision: 0d8e16a0967cfd2dbcd00c7bb7a56f476c0e64fb URL: https://github.com/llvm/llvm-project/commit/0d8e16a0967cfd2dbcd00c7bb7a56f476c0e64fb DIFF: https://github.com/llvm/llvm-project/commit/0d8e16a0967cfd2dbcd00c7bb7a56f476c0e64fb.diff

[clang] [analyzer][NFC] Make CheckerDocumentation checker in-sync with actual checker callbacks (PR #83973)

2024-03-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/83973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Bring cplusplus.ArrayDelete out of alpha (PR #83985)

2024-03-05 Thread via cfe-commits
https://github.com/NagyDonat commented: LGTM. I think you can merge this in a few days (if nobody requests changes). https://github.com/llvm/llvm-project/pull/83985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang] Sequence C++20 Parenthesized List Init (PR #83476)

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

[clang] 4ce737b - [clang] Sequence C++20 Parenthesized List Init (#83476)

2024-03-05 Thread via cfe-commits
Author: Douglas Deslauriers Date: 2024-03-05T15:07:54+01:00 New Revision: 4ce737bfd6fd0aafb436eb220c3e724bfc831db4 URL: https://github.com/llvm/llvm-project/commit/4ce737bfd6fd0aafb436eb220c3e724bfc831db4 DIFF: https://github.com/llvm/llvm-project/commit/4ce737bfd6fd0aafb436eb220c3e724bfc831db4

[clang] [clang] Sequence C++20 Parenthesized List Init (PR #83476)

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

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Matt Arsenault via cfe-commits
@@ -839,6 +839,18 @@ unsigned test_wavefrontsize() { return __builtin_amdgcn_wavefrontsize(); } +// CHECK-LABEL test_get_fpenv( arsenm wrote: Ideally we would also warn if you used these without fenv access enabled https://github.com/llvm/llvm-project/pul

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-05 Thread via cfe-commits
Botond =?utf-8?q?István_Horváth?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: cor3ntin wrote: > @erichkeane a question: this PR is partly a fix for a DR for c++20. Right

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Joseph Huber via cfe-commits
@@ -839,6 +839,18 @@ unsigned test_wavefrontsize() { return __builtin_amdgcn_wavefrontsize(); } +// CHECK-LABEL test_get_fpenv( jhuber6 wrote: Is this related to the DX10 clamp / traps potentially being disabled? Or is this an LLVM concept. https://github

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Matt Arsenault via cfe-commits
@@ -839,6 +839,18 @@ unsigned test_wavefrontsize() { return __builtin_amdgcn_wavefrontsize(); } +// CHECK-LABEL test_get_fpenv( arsenm wrote: It's a standard C concept. You need to enable #pragma STDC FENV_ACCESS ON to do anything valid with the floating p

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Joseph Huber via cfe-commits
@@ -839,6 +839,18 @@ unsigned test_wavefrontsize() { return __builtin_amdgcn_wavefrontsize(); } +// CHECK-LABEL test_get_fpenv( jhuber6 wrote: Hm, I'm not sure. I feel like this is just letting the user access the hardware directly which has a different us

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Matt Arsenault via cfe-commits
@@ -839,6 +839,18 @@ unsigned test_wavefrontsize() { return __builtin_amdgcn_wavefrontsize(); } +// CHECK-LABEL test_get_fpenv( arsenm wrote: This interface is 1 level removed from the hardware, but this cannot be legitimately used without fenv access enab

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { + return 1; // expected-warni

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { + return 1; // expected-warni

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { AaronBallman

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wreturn-type -Wno-return-mismatch -fsyntax-only -verify %s AaronBallman wrote: Because this is the same test code in both files, let's remove this file, add this RUN line to the other file, and rename the other file `return

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { + return 1; // expected-warni

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -94,6 +94,7 @@ Deprecated Compiler Flags Modified Compiler Flags --- +- The `-Wreturn-type` flag has been modified to split some of its functionality into `-Wreturn-mismatch` flag. AaronBallman wrote: ```suggestion - Added a new diagno

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s AaronBallman wrote: When you add the other RUN line, it should use `-verify=return-type`. ```suggestion // RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { + return 1; // expected-warni

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -Wno-return-type -Wreturn-mismatch -fsyntax-only -verify %s + +// Test that -Wreturn-mismatch is enabled and -Wreturn-type is disabled. + +int foo(void) __attribute__((noreturn)); +int bar(void); + +void test1() { + return 1; // expected-warni

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-03-05 Thread Erich Keane via cfe-commits
@@ -12669,6 +12669,19 @@ TreeTransform::TransformCXXNewExpr(CXXNewExpr *E) { ArraySize = NewArraySize.get(); } + // Per C++0x [expr.new]p5, the type being constructed may be a + // typedef of an array type. erichkeane wrote: This comment doesn't real

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-03-05 Thread Aaron Ballman via cfe-commits
@@ -8480,6 +8480,54 @@ class LValueExprEvaluator }; } // end anonymous namespace +/// Get an lvalue to a field of a lambda's closure type. +static bool GetLambdaCaptureAsLValue(EvalInfo &Info, const Expr *E, + LValue &Result, const CXXMethod

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-05 Thread Erich Keane via cfe-commits
@@ -2258,6 +2258,94 @@ class ExtractTypeForDeductionGuide } }; +// Build a deduction guide with the specified parameter types. +FunctionTemplateDecl * +buildDeductionGuide(Sema &SemaRef, TemplateDecl *OriginalTemplate, +TemplateParameterList *TemplatePara

<    1   2   3   4   5   6   >