[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > I tested this idea, might be like this: I meant something else. This patch makes it so the delayed function type importation happens unconditionally. I was aware that change would cause breakages. What I meant is that, we have a special sugar type node that marks deduction,

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Matheus Izvekov via cfe-commits
@@ -3647,15 +3647,19 @@ class IsTypeDeclaredInsideVisitor }; } // namespace -/// This function checks if the function has 'auto' return type that contains +/// This function checks if the given function has a return type that contains /// a reference (in any way) to a

[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

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

[clang] 29ecd6d - [clang-format] Revert breaking stream operators to previous default (#89016)

2024-04-17 Thread via cfe-commits
Author: Owen Pan Date: 2024-04-17T19:51:46-07:00 New Revision: 29ecd6d50f1400e3101f27567b535eb8af905f58 URL: https://github.com/llvm/llvm-project/commit/29ecd6d50f1400e3101f27567b535eb8af905f58 DIFF: https://github.com/llvm/llvm-project/commit/29ecd6d50f1400e3101f27567b535eb8af905f58.diff

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

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

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-17 Thread via cfe-commits
JinjinLi868 wrote: > > This appears to just assert today, but interpreting this as bitcast doesn't > > make sense. I would expect this to emit a pair of casts, fpext to float, > > and fptrunc down to half > > If we don't just reject it as an invalid cast i understand your means, it like a

[clang] f2695a1 - [C++20] [Modules] Avoid writing untouched DeclUpdates from GMF in

2024-04-17 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-18T11:00:28+08:00 New Revision: f2695a1c2f561da42b973187a254b6eeb7da76a9 URL: https://github.com/llvm/llvm-project/commit/f2695a1c2f561da42b973187a254b6eeb7da76a9 DIFF: https://github.com/llvm/llvm-project/commit/f2695a1c2f561da42b973187a254b6eeb7da76a9.diff

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-17 Thread via cfe-commits
https://github.com/JinjinLi868 updated https://github.com/llvm/llvm-project/pull/89051 >From 8d0ed7653c21315c5c920114b3a2d7686e54b9ca Mon Sep 17 00:00:00 2001 From: Jinjin Li Date: Wed, 17 Apr 2024 16:44:50 +0800 Subject: [PATCH] [clang] Fix half && bfloat16 convert node expr codegen Data

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-17 Thread via cfe-commits
https://github.com/nihui updated https://github.com/llvm/llvm-project/pull/89062 >From 05461899522816d2569fdab73b9eeda525524cc8 Mon Sep 17 00:00:00 2001 From: nihui Date: Wed, 17 Apr 2024 20:04:00 +0800 Subject: [PATCH 1/2] fix UB in bfloat16 scalar conversion ---

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
@@ -3647,15 +3647,19 @@ class IsTypeDeclaredInsideVisitor }; } // namespace -/// This function checks if the function has 'auto' return type that contains +/// This function checks if the given function has a return type that contains /// a reference (in any way) to a

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-04-17 Thread Jessica Paquette via cfe-commits
@@ -2050,23 +2069,74 @@ struct CounterCoverageMappingBuilder subtractCounters(ParentCount, TrueCount)); } - void createDecision(const BinaryOperator *E) { + void createOrCancelDecision(const BinaryOperator *E, unsigned Since) { unsigned

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
@@ -3647,15 +3647,19 @@ class IsTypeDeclaredInsideVisitor }; } // namespace -/// This function checks if the function has 'auto' return type that contains +/// This function checks if the given function has a return type that contains /// a reference (in any way) to a

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/89096 >From 0d6d52365a5d31045c347412c3a0fe8be7119006 Mon Sep 17 00:00:00 2001 From: dingfei Date: Thu, 18 Apr 2024 00:33:29 +0800 Subject: [PATCH 1/4] [ASTImporter] Fix infinite recurse on return type declared

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-17 Thread Eli Friedman via cfe-commits
@@ -844,7 +847,18 @@ const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( if (const FieldDecl *Field = efriedma-quic wrote: FieldNo and Layout are referring to fields of "RD"; the "Field" found in the recursive visit is a member of Record (or

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-17 Thread via cfe-commits
JinjinLi868 wrote: > This appears to just assert today, but interpreting this as bitcast doesn't > make sense. I would expect this to emit a pair of casts, fpext to float, and > fptrunc down to half https://github.com/llvm/llvm-project/pull/89051

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

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

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Timm Baeder via cfe-commits
@@ -14547,6 +14547,18 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexpf: tbaederr wrote: Not doing that is fine for now. https://github.com/llvm/llvm-project/pull/88978

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -std=c++23 \ +// RUN: -emit-llvm -o - %s | FileCheck %s + +// RUN %clang_cc1 -x c++ -triple x86_64-linux-gnu -emit-llvm -o - %s \ +// RUN -std=c++23 + +#define INFINITY ((float)(1e+300 * 1e+300)) +#define

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Timm Baeder via cfe-commits
@@ -14547,6 +14547,18 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexpf: + case Builtin::BI__builtin_frexp: { +LValue Pointer; +if (!EvaluateFloat(E->getArg(0), Result, Info) || +

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Timm Baeder via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo , const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform to

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
@@ -3647,15 +3647,19 @@ class IsTypeDeclaredInsideVisitor }; } // namespace -/// This function checks if the function has 'auto' return type that contains +/// This function checks if the given function has a return type that contains /// a reference (in any way) to a

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
https://github.com/danix800 edited https://github.com/llvm/llvm-project/pull/89096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Matheus Izvekov via cfe-commits
@@ -3647,15 +3647,19 @@ class IsTypeDeclaredInsideVisitor }; } // namespace -/// This function checks if the function has 'auto' return type that contains +/// This function checks if the given function has a return type that contains /// a reference (in any way) to a

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-04-17 Thread Jessica Paquette via cfe-commits
@@ -190,18 +190,30 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-04-17 Thread Jessica Paquette via cfe-commits
@@ -190,18 +190,30 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(); +assert(BranchParams == nullptr || BranchParams->ID >= 0); ornata

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-04-17 Thread Jessica Paquette via cfe-commits
@@ -983,7 +979,7 @@ void CodeGenPGO::mapRegionCounters(const Decl *D) { // for most embedded applications. Setting a maximum value prevents the // bitmap footprint from growing too large without the user's knowledge. In // the future, this value could be adjusted with a

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/89019 >From 89a5bbcc89c1e43ac7f2e60f3c234c2c42928c86 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 17 Apr 2024 12:24:56 +0800 Subject: [PATCH 1/2] [clang] Distinguish unresolved templates in

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/89096 >From 0d6d52365a5d31045c347412c3a0fe8be7119006 Mon Sep 17 00:00:00 2001 From: dingfei Date: Thu, 18 Apr 2024 00:33:29 +0800 Subject: [PATCH 1/5] [ASTImporter] Fix infinite recurse on return type declared

[clang] [RISCV][clang] Don't enable -mrelax-all for -O0 on RISC-V (PR #88538)

2024-04-17 Thread Fangrui Song via cfe-commits
@@ -1,4 +1,4 @@ -// XFAIL: target={{.*}}-aix{{.*}} +// XFAIL: target={{.*}}-aix{{.*}}, target=riscv{{.*}} MaskRay wrote: This causes different behaviors with the default target triple, which is probably not perfect. I think we can change the -mrelax-all check

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread Younan Zhang via cfe-commits
@@ -186,3 +186,74 @@ class E { #endif template using D = int; // expected-note {{declared here}} E ed; // expected-note {{instantiation of}} + +namespace non_functions { + +#if __cplusplus >= 201103L +namespace PR88832 { +template struct O { + static const T v = 0; +}; +

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-17 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @rjmccall @dwblaikie ping https://github.com/llvm/llvm-project/pull/75912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTImporter] Fix infinite recurse on return type declared inside body (#68775) (PR #89096)

2024-04-17 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Thanks! https://github.com/llvm/llvm-project/pull/89096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][clang] Don't enable -mrelax-all for -O0 on RISC-V (PR #88538)

2024-04-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. I left a comment at https://github.com/llvm/llvm-project/issues/87127#issuecomment-2063027106 This is more about a weird -O0 -mrelax-all behavior that RISC-V now opts out, which is good on its own, even if the basis looks like a

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread Younan Zhang via cfe-commits
@@ -186,3 +186,74 @@ class E { #endif template using D = int; // expected-note {{declared here}} E ed; // expected-note {{instantiation of}} + +namespace non_functions { + +#if __cplusplus >= 201103L +namespace PR88832 { +template struct O { + static const T v = 0; +}; +

[clang-tools-extra] 3d56ea0 - [clang][NFC] Fix FieldDecl::isUnnamedBitfield() capitalization (#89048)

2024-04-17 Thread via cfe-commits
Author: Timm Baeder Date: 2024-04-18T07:39:29+02:00 New Revision: 3d56ea05b6c746a7144f643bef2ebd599f605b8b URL: https://github.com/llvm/llvm-project/commit/3d56ea05b6c746a7144f643bef2ebd599f605b8b DIFF: https://github.com/llvm/llvm-project/commit/3d56ea05b6c746a7144f643bef2ebd599f605b8b.diff

[clang] [clang-tools-extra] [clang][NFC] Fix FieldDecl::isUnnamedBitfield() capitalization (PR #89048)

2024-04-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/89048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-04-17 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @HighCommander4 Any chance to have a try on this patch? I'm looking forward to the feedback, thanks! https://github.com/llvm/llvm-project/pull/86629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

<    1   2   3   4   5