diff --git a/clang/unittests/Format/QualifierFixerTest.cpp b/clang/unittests/Format/QualifierFixerTest.cpp index ada47549fd0b37..5463bfbb65ca68 100644 --- a/clang/unittests/Format/QualifierFixerTest.cpp +++ b/clang/unittests/Format/QualifierFixerTest.cpp @@ -27,15 +27,11 @@ namespace { EXPECT_EQ(VALUE, Style.FIELD) << "Unexpected value after parsing!" class QualifierFixerTest : public FormatTestBase { -public: - QualifierFixerTest() : LangOpts(getFormattingLangOpts()) {} - protected: TokenList annotate(llvm::StringRef Code, const FormatStyle &Style = getLLVMStyle()) { return TestLexer(Allocator, Buffers, Style).annotate(Code); } - LangOptions LangOpts; llvm::SpecificBumpPtrAllocator Allocator; std::vector> Buffers; }; @@ -1059,6 +1055,8 @@ TEST_F(QualifierFixerTest, IsQualifierType) { ConfiguredTokens.push_back(tok::kw_constexpr); ConfiguredTokens.push_back(tok::kw_friend); + LangOptions LangOpts{getFormattingLangOpts()}; + auto Tokens = annotate( "const static inline auto restrict int double long constexpr friend"); ASSERT_EQ(Tokens.size(), 11u) << Tokens;