forked from OSchip/llvm-project
[clang-format] Start formatting cpp code in raw strings in google style
Summary: This adds some delimiters to detect cpp code in raw strings. Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46062 llvm-svn: 330832
This commit is contained in:
parent
1f5d994119
commit
5559cc3b75
|
@ -718,20 +718,39 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
|
||||||
GoogleStyle.ObjCSpaceAfterProperty = false;
|
GoogleStyle.ObjCSpaceAfterProperty = false;
|
||||||
GoogleStyle.ObjCSpaceBeforeProtocolList = true;
|
GoogleStyle.ObjCSpaceBeforeProtocolList = true;
|
||||||
GoogleStyle.PointerAlignment = FormatStyle::PAS_Left;
|
GoogleStyle.PointerAlignment = FormatStyle::PAS_Left;
|
||||||
GoogleStyle.RawStringFormats = {{
|
GoogleStyle.RawStringFormats = {
|
||||||
FormatStyle::LK_TextProto,
|
|
||||||
/*Delimiters=*/
|
|
||||||
{
|
{
|
||||||
"pb",
|
FormatStyle::LK_Cpp,
|
||||||
"PB",
|
/*Delimiters=*/
|
||||||
"proto",
|
{
|
||||||
"PROTO",
|
"cc",
|
||||||
|
"CC",
|
||||||
|
"cpp",
|
||||||
|
"Cpp",
|
||||||
|
"CPP",
|
||||||
|
"c++",
|
||||||
|
"C++",
|
||||||
|
},
|
||||||
|
/*EnclosingFunctionNames=*/
|
||||||
|
{},
|
||||||
|
/*CanonicalDelimiter=*/"",
|
||||||
|
/*BasedOnStyle=*/"google",
|
||||||
},
|
},
|
||||||
/*EnclosingFunctionNames=*/
|
{
|
||||||
{},
|
FormatStyle::LK_TextProto,
|
||||||
/*CanonicalDelimiter=*/"",
|
/*Delimiters=*/
|
||||||
/*BasedOnStyle=*/"google",
|
{
|
||||||
}};
|
"pb",
|
||||||
|
"PB",
|
||||||
|
"proto",
|
||||||
|
"PROTO",
|
||||||
|
},
|
||||||
|
/*EnclosingFunctionNames=*/
|
||||||
|
{},
|
||||||
|
/*CanonicalDelimiter=*/"",
|
||||||
|
/*BasedOnStyle=*/"google",
|
||||||
|
},
|
||||||
|
};
|
||||||
GoogleStyle.SpacesBeforeTrailingComments = 2;
|
GoogleStyle.SpacesBeforeTrailingComments = 2;
|
||||||
GoogleStyle.Standard = FormatStyle::LS_Auto;
|
GoogleStyle.Standard = FormatStyle::LS_Auto;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue