diff options
Diffstat (limited to 'lib/AST/CommentSema.cpp')
-rw-r--r-- | lib/AST/CommentSema.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/CommentSema.cpp b/lib/AST/CommentSema.cpp index 5301bfebe9..f0790760a9 100644 --- a/lib/AST/CommentSema.cpp +++ b/lib/AST/CommentSema.cpp @@ -169,6 +169,10 @@ ParamCommandComment *Sema::actOnParamCommandParamNameArg( Diag(ArgLocBegin, diag::warn_doc_param_not_found) << Arg << ArgRange; + // No parameters -- can't suggest a correction. + if (ParamVars.size() == 0) + return Command; + unsigned CorrectedParamIndex = ParamCommandComment::InvalidParamIndex; if (ParamVars.size() == 1) { // If function has only one parameter then only that parameter |