[code-complete] Put call-pattern heuristics under a flag

The original hope was we could make these heuristics really good, but
since that is not currently in sight (and may never be), we want to be
able to turn them off.  For now, just plumb through an internal flag to
control the behaviour.  A future change will customize the behaviour in
SourceKit.

rdar://31113161
This commit is contained in:
Ben Langmuir
2017-12-15 13:23:44 -08:00
parent 796efd3e10
commit 93956eb34b
10 changed files with 56 additions and 15 deletions

View File

@@ -1054,6 +1054,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.CodeCompleteInitsInPostfixExpr |=
Args.hasArg(OPT_code_complete_inits_in_postfix_expr);
Opts.CodeCompleteCallPatternHeuristics |=
Args.hasArg(OPT_code_complete_call_pattern_heuristics);
if (auto A = Args.getLastArg(OPT_enable_target_os_checking,
OPT_disable_target_os_checking)) {
Opts.EnableTargetOSChecking