================ @@ -2230,16 +2274,54 @@ CompletionPrefix guessCompletionPrefix(llvm::StringRef Content, return Result; } +// If Offset is inside what looks like argument comment (e.g. +// "/*^*/" or "/* foo = ^*/"), returns the offset pointing past the closing "*/". +static std::optional<unsigned> +maybeFunctionArgumentCommentEnd(const PathRef FileName, const unsigned Offset, ---------------- argothiel wrote:
Maybe not consistent with finding the beginning of the comment (which is ASCII-only), but it's definitely more correct, and we always have Sema context here, so why not use it. Finding the beginning of the comment can be fixed to use more comprehensive lexing in the future, but it's outside the scope of this change. As searching forward and backward are pretty different actions, it will be a separate code anyway. https://github.com/llvm/llvm-project/pull/187623 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
