Skip to content

Commit

Permalink
Revert "[clang-format] Fix an out-of-bounds bug uncovered by 763139a"
Browse files Browse the repository at this point in the history
This reverts commit 173e674.

Actually, NotTokens[5] in QualifierFixerTest.cpp is not out of bounds.
  • Loading branch information
owenca committed Feb 9, 2024
1 parent 5609bd8 commit 245d772
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/unittests/Format/QualifierFixerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,8 @@ TEST_F(QualifierFixerTest, IsQualifierType) {
NotTokens[3], ConfiguredTokens));
EXPECT_FALSE(LeftRightQualifierAlignmentFixer::isConfiguredQualifierOrType(
NotTokens[4], ConfiguredTokens));
EXPECT_FALSE(LeftRightQualifierAlignmentFixer::isConfiguredQualifierOrType(
NotTokens[5], ConfiguredTokens));

EXPECT_FALSE(
LeftRightQualifierAlignmentFixer::isQualifierOrType(NotTokens[0]));
Expand All @@ -1111,6 +1113,8 @@ TEST_F(QualifierFixerTest, IsQualifierType) {
LeftRightQualifierAlignmentFixer::isQualifierOrType(NotTokens[3]));
EXPECT_FALSE(
LeftRightQualifierAlignmentFixer::isQualifierOrType(NotTokens[4]));
EXPECT_FALSE(
LeftRightQualifierAlignmentFixer::isQualifierOrType(NotTokens[5]));
}

TEST_F(QualifierFixerTest, IsMacro) {
Expand Down

0 comments on commit 245d772

Please sign in to comment.