[clang] 245d772 - Revert "[clang-format] Fix an out-of-bounds bug uncovered by 763139afc19d"
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 9 02:00:54 PST 2024
Author: Owen Pan
Date: 2024-02-09T01:53:47-08:00
New Revision: 245d7727d51548c3d5d867b69b1f9b1efff2502e
URL: https://github.com/llvm/llvm-project/commit/245d7727d51548c3d5d867b69b1f9b1efff2502e
DIFF: https://github.com/llvm/llvm-project/commit/245d7727d51548c3d5d867b69b1f9b1efff2502e.diff
LOG: Revert "[clang-format] Fix an out-of-bounds bug uncovered by 763139afc19d"
This reverts commit 173e674ba55eb93e8af43f2eece7feffe9954b34.
Actually, NotTokens[5] in QualifierFixerTest.cpp is not out of bounds.
Added:
Modified:
clang/unittests/Format/QualifierFixerTest.cpp
Removed:
################################################################################
diff --git a/clang/unittests/Format/QualifierFixerTest.cpp b/clang/unittests/Format/QualifierFixerTest.cpp
index 4e1768dc117273..324366ca7f5e51 100644
--- a/clang/unittests/Format/QualifierFixerTest.cpp
+++ b/clang/unittests/Format/QualifierFixerTest.cpp
@@ -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]));
@@ -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) {
More information about the cfe-commits
mailing list