[PATCH] D101628: [Format] Don't sort includes if DisableFormat is true
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 30 06:58:39 PDT 2021
njames93 created this revision.
njames93 added a reviewer: MyDeveloperDay.
njames93 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Fixes https://llvm.org/PR35099.
I'm not sure if this decision was intentional but its definitely confusing for users.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101628
Files:
clang/lib/Format/Format.cpp
Index: clang/lib/Format/Format.cpp
===================================================================
--- clang/lib/Format/Format.cpp
+++ clang/lib/Format/Format.cpp
@@ -2603,7 +2603,7 @@
ArrayRef<tooling::Range> Ranges,
StringRef FileName, unsigned *Cursor) {
tooling::Replacements Replaces;
- if (!Style.SortIncludes)
+ if (!Style.SortIncludes || Style.DisableFormat)
return Replaces;
if (isLikelyXml(Code))
return Replaces;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101628.341891.patch
Type: text/x-patch
Size: 518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210430/4e82874d/attachment.bin>
More information about the cfe-commits
mailing list