]> granicus.if.org Git - clang/commitdiff
[Format] Add curly braces to suppress a -Wmisleading-indentation warning from gcc.
authorCraig Topper <craig.topper@gmail.com>
Sun, 21 May 2017 07:29:07 +0000 (07:29 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 21 May 2017 07:29:07 +0000 (07:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303501 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/TokenAnnotator.cpp

index 49285a913fed830063c71e122bbd7d7f48456284..50583a95055da7aa49a0a8a75605eaa0c6604f6b 100644 (file)
@@ -576,12 +576,13 @@ private:
       }
       break;
     case tok::kw_for:
-      if (Style.Language == FormatStyle::LK_JavaScript)
+      if (Style.Language == FormatStyle::LK_JavaScript) {
         if (Tok->Previous && Tok->Previous->is(tok::period))
           break;
         // JS' for await ( ...
         if (CurrentToken && CurrentToken->is(Keywords.kw_await))
           next();
+      }
       Contexts.back().ColonIsForRangeExpr = true;
       next();
       if (!parseParens())