[cfe-commits] r160896 - /cfe/trunk/lib/AST/CommentSema.cpp
Dmitri Gribenko
gribozavr at gmail.com
Fri Jul 27 14:34:43 PDT 2012
Author: gribozavr
Date: Fri Jul 27 16:34:43 2012
New Revision: 160896
URL: http://llvm.org/viewvc/llvm-project?rev=160896&view=rev
Log:
Comment Sema: don't try to typo-correct a \param when function has zero
arguments. Just an optimization, no functional change.
Modified:
cfe/trunk/lib/AST/CommentSema.cpp
Modified: cfe/trunk/lib/AST/CommentSema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentSema.cpp?rev=160896&r1=160895&r2=160896&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CommentSema.cpp (original)
+++ cfe/trunk/lib/AST/CommentSema.cpp Fri Jul 27 16:34:43 2012
@@ -169,6 +169,10 @@
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
More information about the cfe-commits
mailing list