[PATCH] D136554: Implement CWG2631

Corentin via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 16 10:04:04 PST 2023


Yes please! However the warning looks correct to me in that case. A
constructs x which constructs A etc.

On Mon, Jan 16, 2023, 18:00 Chris Bowler via Phabricator <
reviews at reviews.llvm.org> wrote:

> cebowleratibm added a comment.
>
> I've reduced a regression on:
>
> commit ca619613801233ef2def8c3cc7d311d5ed0033cb <
> https://reviews.llvm.org/rGca619613801233ef2def8c3cc7d311d5ed0033cb>
> (HEAD, refs/bisect/bad)
> Author: Corentin Jabot <corentinjabot at gmail.com>
> Date:   Sun Oct 23 17:32:58 2022 +0200
>
>   template <class T> int f(T) { return 42; }
>
>   struct A {
>      int x = f(A());
>      A() { }
>   };
>
>   void foo() { A(); }
>
>
>
>   clang++ t2.C -c
>   t2.C:4:12: warning: stack nearly exhausted; compilation time may suffer,
> and crashes due to stack overflow are likely [-Wstack-exhausted]
>      int x = f(A());
>              ^
>   Segmentation fault (core dumped)
>
> @cor3ntin would you like me to open a new issue?
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D136554/new/
>
> https://reviews.llvm.org/D136554
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230116/8c672048/attachment-0001.html>


More information about the cfe-commits mailing list