[clang-format] adds enclosing function detection to raw string formatting
Summary: This patch adds enclosing function detection to raw string formatting.
Reviewers: bkramer
Reviewed By: bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D42167
llvm-svn: 322678
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index ebcf3ab..6ef38ad 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -457,6 +457,7 @@
static void mapping(IO &IO, FormatStyle::RawStringFormat &Format) {
IO.mapOptional("Language", Format.Language);
IO.mapOptional("Delimiters", Format.Delimiters);
+ IO.mapOptional("EnclosingFunctions", Format.EnclosingFunctions);
IO.mapOptional("BasedOnStyle", Format.BasedOnStyle);
}
};
@@ -705,6 +706,12 @@
"textproto",
"TEXTPROTO",
},
+ /*EnclosingFunctionNames=*/
+ {
+ "EqualsProto",
+ "PARSE_TEXT_PROTO",
+ "ParseTextProto",
+ },
/*BasedOnStyle=*/"google",
}};
GoogleStyle.SpacesBeforeTrailingComments = 2;