[PATCH] D47515: [clang-format] Process line's children once in guessIsObjC

Attila via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 30 00:44:22 PDT 2018


Uran198 created this revision.
Uran198 added reviewers: djasper, klimek.

Repository:
  rC Clang

https://reviews.llvm.org/D47515

Files:
  lib/Format/Format.cpp


Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -1558,9 +1558,9 @@
                                TT_ObjCMethodSpecifier, TT_ObjCProperty)) {
           return true;
         }
-        if (guessIsObjC(Line->Children, Keywords))
-          return true;
       }
+      if (guessIsObjC(Line->Children, Keywords))
+        return true;
     }
     return false;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47515.149052.patch
Type: text/x-patch
Size: 470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180530/b03aa414/attachment.bin>


More information about the cfe-commits mailing list