This revision was automatically updated to reflect the committed changes.
Closed by commit rL286468: clang-format: [JS] do not break after declare 
namespace. (authored by mprobst).

Changed prior to commit:
  https://reviews.llvm.org/D26274?vs=76831&id=77493#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26274

Files:
  cfe/trunk/lib/Format/UnwrappedLineParser.cpp


Index: cfe/trunk/lib/Format/UnwrappedLineParser.cpp
===================================================================
--- cfe/trunk/lib/Format/UnwrappedLineParser.cpp
+++ cfe/trunk/lib/Format/UnwrappedLineParser.cpp
@@ -669,14 +669,14 @@
   // FIXME: This returns true for C/C++ keywords like 'struct'.
   return FormatTok->is(tok::identifier) &&
          (FormatTok->Tok.getIdentifierInfo() == nullptr ||
-          !FormatTok->isOneOf(Keywords.kw_in, Keywords.kw_of, Keywords.kw_as,
-                              Keywords.kw_async, Keywords.kw_await,
-                              Keywords.kw_yield, Keywords.kw_finally,
-                              Keywords.kw_function, Keywords.kw_import,
-                              Keywords.kw_is, Keywords.kw_let, Keywords.kw_var,
-                              Keywords.kw_abstract, Keywords.kw_extends,
-                              Keywords.kw_implements, Keywords.kw_instanceof,
-                              Keywords.kw_interface, Keywords.kw_throws));
+          !FormatTok->isOneOf(
+              Keywords.kw_in, Keywords.kw_of, Keywords.kw_as, 
Keywords.kw_async,
+              Keywords.kw_await, Keywords.kw_yield, Keywords.kw_finally,
+              Keywords.kw_function, Keywords.kw_import, Keywords.kw_is,
+              Keywords.kw_let, Keywords.kw_var, tok::kw_const,
+              Keywords.kw_abstract, Keywords.kw_extends, 
Keywords.kw_implements,
+              Keywords.kw_instanceof, Keywords.kw_interface,
+              Keywords.kw_throws));
 }
 
 static bool mustBeJSIdentOrValue(const AdditionalKeywords &Keywords,


Index: cfe/trunk/lib/Format/UnwrappedLineParser.cpp
===================================================================
--- cfe/trunk/lib/Format/UnwrappedLineParser.cpp
+++ cfe/trunk/lib/Format/UnwrappedLineParser.cpp
@@ -669,14 +669,14 @@
   // FIXME: This returns true for C/C++ keywords like 'struct'.
   return FormatTok->is(tok::identifier) &&
          (FormatTok->Tok.getIdentifierInfo() == nullptr ||
-          !FormatTok->isOneOf(Keywords.kw_in, Keywords.kw_of, Keywords.kw_as,
-                              Keywords.kw_async, Keywords.kw_await,
-                              Keywords.kw_yield, Keywords.kw_finally,
-                              Keywords.kw_function, Keywords.kw_import,
-                              Keywords.kw_is, Keywords.kw_let, Keywords.kw_var,
-                              Keywords.kw_abstract, Keywords.kw_extends,
-                              Keywords.kw_implements, Keywords.kw_instanceof,
-                              Keywords.kw_interface, Keywords.kw_throws));
+          !FormatTok->isOneOf(
+              Keywords.kw_in, Keywords.kw_of, Keywords.kw_as, Keywords.kw_async,
+              Keywords.kw_await, Keywords.kw_yield, Keywords.kw_finally,
+              Keywords.kw_function, Keywords.kw_import, Keywords.kw_is,
+              Keywords.kw_let, Keywords.kw_var, tok::kw_const,
+              Keywords.kw_abstract, Keywords.kw_extends, Keywords.kw_implements,
+              Keywords.kw_instanceof, Keywords.kw_interface,
+              Keywords.kw_throws));
 }
 
 static bool mustBeJSIdentOrValue(const AdditionalKeywords &Keywords,
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to