[InterfaceGen] Remove #ifs from default arguments (#19075)

* [InterfaceGen] Remove #ifs from default args

This patch removes all #if configs form the bodies of default arguments,
which can contain multiline closures, while preserving the bodies of the
clauses that are active.

This code is generalized and should "just work" for inlinable function
bodies, which will come in a later patch.

* Address review comments

* Fix and test CharSourceRange.overlaps

* Fix CharSourceRange::print to respect half-open ranges
This commit is contained in:
Harlan
2018-08-31 20:18:48 -07:00
committed by GitHub
parent 3e260c9bd5
commit dc1bc823e6
17 changed files with 390 additions and 54 deletions

View File

@@ -207,8 +207,6 @@ static void adjustPrintOptions(PrintOptions &AdjustedOptions) {
// Print var declarations separately, one variable per decl.
AdjustedOptions.ExplodePatternBindingDecls = true;
AdjustedOptions.VarInitializers = false;
AdjustedOptions.PrintDefaultParameterPlaceholder = true;
}
ArrayRef<StringRef>