================ @@ -0,0 +1,1013 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - -Wstack-exhausted -verify + +class AClass { +public: + AClass() {} + AClass &foo() { return *this; } +}; + +void test_bar() { + AClass a; + // expected-warning@* {{stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely}} + a.foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo().foo() ---------------- ilya-biryukov wrote:
It's not that I disagree with DAMP or always prefer DRY, I am just trying to make the best trade-off in each situation and also feel the right trade-off one here is closer to DRY. https://github.com/llvm/llvm-project/pull/111701 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits