forked from OSchip/llvm-project
Function declarations are, in fact, permitted in the init-statement of a for
loop. Don't confuse Sema by saying they're not. llvm-svn: 274080
This commit is contained in:
parent
42398051d8
commit
3ffc45f5fd
|
@ -2119,9 +2119,9 @@ public:
|
|||
case FileContext:
|
||||
case MemberContext:
|
||||
case BlockContext:
|
||||
case ForContext:
|
||||
return true;
|
||||
|
||||
case ForContext:
|
||||
case ConditionContext:
|
||||
case KNRTypeListContext:
|
||||
case TypeNameContext:
|
||||
|
|
|
@ -502,3 +502,7 @@ namespace PR24989 {
|
|||
using T = decltype(x);
|
||||
void (T::*p)(int) const = &T::operator();
|
||||
}
|
||||
|
||||
void forinit_decltypeauto() {
|
||||
for (decltype(auto) forinit_decltypeauto_inner();;) {} // expected-warning {{interpreted as a function}} expected-note {{replace}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue