Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp	(revision 317195)
+++ lib/Format/Format.cpp	(working copy)
@@ -1944,7 +1944,7 @@
       AnalyzerPass;
   SmallVector<AnalyzerPass, 4> Passes;
 
-  if (Style.Language == FormatStyle::LK_Cpp) {
+  if (Style.isCpp()) {
     if (Style.FixNamespaceComments)
       Passes.emplace_back([&](const Environment &Env) {
         return NamespaceEndCommentsFixer(Env, Expanded).process();
@@ -2008,7 +2008,7 @@
                               ArrayRef<tooling::Range> Ranges,
                               StringRef FileName) {
   // cleanups only apply to C++ (they mostly concern ctor commas etc.)
-  if (Style.Language != FormatStyle::LK_Cpp)
+  if (!Style.isCpp())
     return tooling::Replacements();
   std::unique_ptr<Environment> Env =
       Environment::CreateVirtualEnvironment(Code, FileName, Ranges);
