[PATCH] D33644: Add default values for function parameter chunks

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 08:58:34 PDT 2017

klimek added inline comments.

Comment at: lib/Sema/SemaCodeComplete.cpp:2453
     std::string PlaceholderStr = FormatFunctionParameter(Policy, Param);
+    if (Param->hasDefaultArg() && PlaceholderStr.find("=") == std::string::npos) {
+        std::string DefaultValue =
yvvan wrote:
> klimek wrote:
> > Why the check for = in the PlaceholderStr?
> Not to add default value twice. If there's already "=" in placeholder string that means we've already added it in FormatFunctionParameter call
In which cases would the default value not be added in FormatFunctionParameter if there is one, and need to be added here?


More information about the cfe-commits mailing list