Revert "[Clang] Implement Change scope of lambda trailing-return-type"
This reverts commit d708a186 (and typo fix e4bc9898). It causes a compilation error for this: ``` struct StringLiteral { template <int N> StringLiteral(const char (&array)[N]) __attribute__((enable_if(N > 0 && N == __builtin_strlen(array) + 1, "invalid string literal"))); }; struct Message { Message(StringLiteral); }; void Func1() { auto x = Message("x"); // Note: this is fine // Note: "xx\0" to force a different type, StringLiteral<3>, otherwise this // successfully builds. auto y = [&](decltype(Message("xx"))) {}; // ^ fails with: repro.cc:18:13: error: reference to local variable 'array' // declared in enclosing function 'StringLiteral::StringLiteral<3>' (void)x; (void)y; } ``` More details posted to D124351.
Loading
Please sign in to comment