fix <rdar://problem/20167543> "for var x = ..." not parsed as a foreach loop

This was because the ambiguity between c-style and foreach loops wasn't being
properly handled.  Use the canParsePattern() logic to handle this in full 
generality.

Since that logic was unused, dust it off and clean it up a bit.  Similarly,
remove some old vestigates of default argument parsing in tuples and 
old-syntax array handling.



Swift SVN r26164
This commit is contained in:
Chris Lattner
2015-03-15 21:43:04 +00:00
parent 27ef444db5
commit bf73cc23f1
7 changed files with 21 additions and 71 deletions

View File

@@ -1050,7 +1050,6 @@ public:
bool canParseTypeComposition();
bool canParseTypeTupleBody();
bool canParseTypeAttribute();
bool canParseTypeArray();
bool canParseGenericArguments();
bool canParsePatternTuple();