Suggested by sammccall in post-commit review of D65183
Details
Details
Diff Detail
Diff Detail
- Repository
- rC Clang
- Build Status
Buildable 35568 Build 35567: arc lint + arc unit
Event Timeline
Comment Actions
getFormattingLangOpts is called with unadjusted FormatStyle (deriveLocalStyle doesn't modify Style). For example, GoogleStyle uses FormatStyle::LS_Auto. We're relying on FormatStyle::LS_Auto being larger than FormatStyle::LS_Cpp11, which is brittle.
Below is a case getFormattingLangOpts is called with LS_Auto:
TEST_F(CleanUpReplacementsTest, InsertMultipleIncludesGoogleStyle) { ... Style = format::getGoogleStyle(format::FormatStyle::LanguageKind::LK_Cpp); EXPECT_EQ(Expected, apply(Code, Replaces));