[PATCH] D65183: [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI
Brian Gesiak via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 23 20:40:06 PDT 2019
modocache added a comment.
LGTM, but I don't actively work in this codebase so I really can't say. I'll wait to hear from some other more active clang-format reviewers.
================
Comment at: lib/Format/TokenAnnotator.cpp:2862
return Right.is(TT_TemplateCloser) && Left.is(TT_TemplateCloser) &&
- (Style.Standard != FormatStyle::LS_Cpp11 || Style.SpacesInAngles);
+ (Style.Standard == FormatStyle::LS_Cpp03 || Style.SpacesInAngles);
}
----------------
Just a note: I don't know what the original intent of https://github.com/llvm/llvm-project/commit/dd978ae0e11 was, but in D65043 I modified this condition to be `Style.Standard == FormatStyle::LS_Cpp03 || Style.Standard == FormatStyle::LS_Auto`, because I believe that mirrors the current behavior exactly. With this change, a user that specified a standard of `FormatStyle::LS_Auto` will experience a change in behavior.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65183/new/
https://reviews.llvm.org/D65183
More information about the cfe-commits
mailing list