shafik added a comment. Apologies for wacky C++ code that follows but will this also work for the following cases:
auto f2() { auto l = []() { struct X{}; return X(); }; return l(); } auto f3() { if ( struct X{} x; true) return X(); else return X(); } auto f4() { for(struct X{} x;;) return X(); } auto f5() { switch(struct X{} x; 10) { case 10: return X(); } } godbolt live example <https://godbolt.org/z/_SXcje> Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70819/new/ https://reviews.llvm.org/D70819 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits