[PATCH] D37845: [clang-format] New flag - BraceWrapping.AfterExternC

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 14 02:47:45 PDT 2017


krasimir added inline comments.


================
Comment at: docs/ClangFormatStyleOptions.rst:664
 
+  * ``bool AfterExternC`` Wrap extern "C" blocks.
+
----------------
I think this is overly specific. The C++ standard also [[ http://en.cppreference.com/w/cpp/language/language_linkage | allows `extern "C++"` blocks ]]. I'd rename this to `AfterExternBlock` or something similar.


================
Comment at: lib/Format/UnwrappedLineParser.cpp:1044
+          addUnwrappedLine();
+        parseBlock(/*MustBeDeclaration=*/true);
         addUnwrappedLine();
----------------
I think we should keep the old `/*AddLevel=*/false` when `AfterExternC` is false. That way you also don't have to change the following test case.


https://reviews.llvm.org/D37845





More information about the cfe-commits mailing list