Skip to content

Commit 5cd2804

Browse files
committed
[clang-format] Move QualifierFixerTest::LangOpts to IsQualifierType test
This should fix buildbot failures in: https://lab.llvm.org/buildbot/#/builders/5/builds/43303 https://lab.llvm.org/buildbot/#/builders/168/builds/20347
1 parent 4f12766 commit 5cd2804

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/unittests/Format/QualifierFixerTest.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,11 @@ namespace {
2727
EXPECT_EQ(VALUE, Style.FIELD) << "Unexpected value after parsing!"
2828

2929
class QualifierFixerTest : public FormatTestBase {
30-
public:
31-
QualifierFixerTest() : LangOpts(getFormattingLangOpts()) {}
32-
3330
protected:
3431
TokenList annotate(llvm::StringRef Code,
3532
const FormatStyle &Style = getLLVMStyle()) {
3633
return TestLexer(Allocator, Buffers, Style).annotate(Code);
3734
}
38-
LangOptions LangOpts;
3935
llvm::SpecificBumpPtrAllocator<FormatToken> Allocator;
4036
std::vector<std::unique_ptr<llvm::MemoryBuffer>> Buffers;
4137
};
@@ -1059,6 +1055,8 @@ TEST_F(QualifierFixerTest, IsQualifierType) {
10591055
ConfiguredTokens.push_back(tok::kw_constexpr);
10601056
ConfiguredTokens.push_back(tok::kw_friend);
10611057

1058+
LangOptions LangOpts{getFormattingLangOpts()};
1059+
10621060
auto Tokens = annotate(
10631061
"const static inline auto restrict int double long constexpr friend");
10641062
ASSERT_EQ(Tokens.size(), 11u) << Tokens;

0 commit comments

Comments
 (0)