aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseCXXInlineMethods.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r--lib/Parse/ParseCXXInlineMethods.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Parse/ParseCXXInlineMethods.cpp b/lib/Parse/ParseCXXInlineMethods.cpp
index 8496ddd002..fbb8a7369d 100644
--- a/lib/Parse/ParseCXXInlineMethods.cpp
+++ b/lib/Parse/ParseCXXInlineMethods.cpp
@@ -145,12 +145,8 @@ void Parser::ParseLexedMethodDeclarations(ParsingClass &Class) {
else {
if (Tok.is(tok::cxx_defaultarg_end))
ConsumeToken();
- else {
- // Warn that there are tokens from the default arg that we left
- // unparsed. This actually indicates a bug in clang but we avoid
- // asserting because we want the parser robust.
- Diag(Tok.getLocation(), diag::warn_default_arg_unparsed);
- }
+ else
+ Diag(Tok.getLocation(), diag::err_default_arg_unparsed);
Actions.ActOnParamDefaultArgument(LM.DefaultArgs[I].Param, EqualLoc,
move(DefArgResult));
}