Mordante planned changes to this revision. Mordante marked an inline comment as done. Mordante added inline comments.
================ Comment at: clang/lib/AST/CommentSema.cpp:1121 + if (isFunctionOrMethodVariadic() && + Typo.find_first_not_of('.') == StringRef::npos) + return ParamCommandComment::VarArgParamIndex; ---------------- Mordante wrote: > gribozavr2 wrote: > > I'm not sure I like the heuristic. > > > > ``` > > // \param foo.bar Something. > > void foo(int foo_bar, ...); > > ``` > > > > Here we would suggest to correct `foo.bar` to `...`. > > > > Instead, I'd suggest to throw a "..." identifier into the typo corrector if > > the function is variadic, and let the edit distance decide. > This heuristic works at the moment. The `lexIdentifier` will not accept > `foo.bar`. However since you requested to remove the `lexIdentifier` your > approach makes more sense. Any suggestion how to do this? The `SimpleTypoCorrector` expects a `NamedDecl`, but AFAIK `...` isn't a `NamedDecl`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71966/new/ https://reviews.llvm.org/D71966 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits