mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add initializers to postfix-expr code completions
Previously, the only way to get initializers was completing after the
name of the type:
Foo#^complete_here^#
Foo(#^or_here^#
And now it will also work in unadorned expressions:
#^a_top_level_completion^#
bar(a, #^walked_into_a_bar^#
Unfortunately, not all our clients handle this well yet, so it's
protected by a language option.
-code-complete-inits-in-postfix-expr
Swift SVN r27275
This commit is contained in:
@@ -623,7 +623,10 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.EnableAccessControl
|
||||
= A->getOption().matches(OPT_enable_access_control);
|
||||
}
|
||||
|
||||
|
||||
Opts.CodeCompleteInitsInPostfixExpr |=
|
||||
Args.hasArg(OPT_code_complete_inits_in_postfix_expr);
|
||||
|
||||
if (auto A = Args.getLastArg(OPT_enable_target_os_checking,
|
||||
OPT_disable_target_os_checking)) {
|
||||
Opts.EnableTargetOSChecking
|
||||
|
||||
Reference in New Issue
Block a user