Update Clang for rebase to r212749.
This also fixes a small issue with arm_neon.h not being generated always.
Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android
Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index d0750af..20dd573 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -770,7 +770,10 @@
return;
case tok::identifier: {
StringRef Text = FormatTok->TokenText;
- if (Style.Language == FormatStyle::LK_JavaScript && Text == "function") {
+ // Parse function literal unless 'function' is the first token in a line
+ // in which case this should be treated as a free-standing function.
+ if (Style.Language == FormatStyle::LK_JavaScript && Text == "function" &&
+ Line->Tokens.size() > 0) {
tryToParseJSFunction();
break;
}
@@ -891,6 +894,8 @@
if (!FormatTok->isOneOf(tok::identifier, tok::kw_this))
return false;
nextToken();
+ if (FormatTok->is(tok::ellipsis))
+ nextToken();
if (FormatTok->is(tok::comma)) {
nextToken();
} else if (FormatTok->is(tok::r_square)) {
@@ -905,6 +910,11 @@
void UnwrappedLineParser::tryToParseJSFunction() {
nextToken();
+
+ // Consume function name.
+ if (FormatTok->is(tok::identifier))
+ nextToken();
+
if (FormatTok->isNot(tok::l_paren))
return;
nextToken();