OwningExprResult Result = ParseExpression();
// Match the ')'.
- if (Result.isInvalid())
- SkipUntil(tok::r_paren);
-
- if (Tok.is(tok::r_paren))
- RParenLoc = ConsumeParen();
- else
- MatchRHSPunctuation(tok::r_paren, LParenLoc);
+ RParenLoc = MatchRHSPunctuation(tok::r_paren, LParenLoc);
if (!Result.isInvalid() && !CastTy.isInvalid())
Result = Actions.ActOnCXXNamedCast(OpLoc, Kind,
const char array[2];
make_X0(array);
}
+
+// PR5210 recovery
+class C {
+protected:
+ template <int> float* &f0(); // expected-note{{candidate}}
+ template <unsigned> float* &f0(); // expected-note{{candidate}}
+
+ void f1() {
+ static_cast<float*>(f0<0>()); // expected-error{{ambiguous}}
+ }
+};