Index: lib/Parse/ParseInit.cpp =================================================================== --- lib/Parse/ParseInit.cpp +++ lib/Parse/ParseInit.cpp @@ -75,11 +75,24 @@ case tok::amp: case tok::identifier: case tok::kw_this: + case tok::numeric_constant: // These tokens can occur in a capture list or a constant-expression. // Keep looking. ConsumeToken(); continue; - + + case tok::l_brace: + case tok::r_brace: + if (PP.getLangOpts().CPlusPlus11) { + // These tokens can occur in a capture list or a constant-expression. + // Keep looking. + // Vec{[i{0}]() { }}; + // int a[10] = { [Literal{}] = 3, 4 }; + ConsumeBrace(); + continue; + } else { + goto default_label; + } case tok::comma: // Since a comma cannot occur in a constant-expression, this must // be a lambda. @@ -99,11 +112,13 @@ } default: + default_label: // Anything else cannot occur in a lambda capture list, so it // must be a designator. Tentative.Revert(); return true; } + } }