[clang] 173e674 - [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 00:21:19 PST 2024


Author: Owen Pan
Date: 2024-02-09T00:21:09-08:00
New Revision: 173e674ba55eb93e8af43f2eece7feffe9954b34

URL: https://github.com/llvm/llvm-project/commit/173e674ba55eb93e8af43f2eece7feffe9954b34
DIFF: https://github.com/llvm/llvm-project/commit/173e674ba55eb93e8af43f2eece7feffe9954b34.diff

LOG: [clang-format] Fix an out-of-bounds bug uncovered by 763139afc19d

Added: 
    

Modified: 
    clang/unittests/Format/QualifierFixerTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Format/QualifierFixerTest.cpp b/clang/unittests/Format/QualifierFixerTest.cpp
index 324366ca7f5e51..4e1768dc117273 100644
--- a/clang/unittests/Format/QualifierFixerTest.cpp
+++ b/clang/unittests/Format/QualifierFixerTest.cpp
@@ -1100,8 +1100,6 @@ 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]));
@@ -1113,8 +1111,6 @@ 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