Parse / AST: Allow let / var as argument labels with a warning.

The diagnostic is now a warning and the new message alerts the user that
though it is valid to have let and var as argument label names,
they are interpreted as argument labels, not keywords.
This commit is contained in:
Sam Lazarus
2019-04-16 19:58:05 -04:00
parent 07b6bf4489
commit 2a38b48eea
11 changed files with 70 additions and 52 deletions

View File

@@ -30,8 +30,6 @@ using namespace camel_case;
bool swift::canBeArgumentLabel(StringRef identifier) {
return llvm::StringSwitch<bool>(identifier)
.Case("var", false)
.Case("let", false)
.Case("inout", false)
.Case("$", false)
.Default(true);