[PATCH] D40120: [clang-format] Add text proto filename detection
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 17 07:11:00 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL318525: [clang-format] Add text proto filename detection (authored by krasimir).
Repository:
rL LLVM
https://reviews.llvm.org/D40120
Files:
cfe/trunk/lib/Format/Format.cpp
Index: cfe/trunk/lib/Format/Format.cpp
===================================================================
--- cfe/trunk/lib/Format/Format.cpp
+++ cfe/trunk/lib/Format/Format.cpp
@@ -2084,6 +2084,11 @@
if (FileName.endswith_lower(".proto") ||
FileName.endswith_lower(".protodevel"))
return FormatStyle::LK_Proto;
+ if (FileName.endswith_lower(".textpb") ||
+ FileName.endswith_lower(".pb.txt") ||
+ FileName.endswith_lower(".textproto") ||
+ FileName.endswith_lower(".asciipb"))
+ return FormatStyle::LK_TextProto;
if (FileName.endswith_lower(".td"))
return FormatStyle::LK_TableGen;
return FormatStyle::LK_Cpp;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40120.123338.patch
Type: text/x-patch
Size: 657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171117/4c93f599/attachment.bin>
More information about the cfe-commits
mailing list