Skip to content

Conversation

@vitalybuka
Copy link
Collaborator

The difference from Version 2 is that file path will be matched
twice: as is and after removing leading "./".

Created using spr 1.3.7
@llvmbot
Copy link
Member

llvmbot commented Nov 10, 2025

@llvm/pr-subscribers-llvm-support

Author: Vitaly Buka (vitalybuka)

Changes

The difference from Version 2 is that file path will be matched
twice: as is and after removing leading "./".


Full diff: https://github.com/llvm/llvm-project/pull/167283.diff

2 Files Affected:

  • (modified) llvm/lib/Support/SpecialCaseList.cpp (+1-1)
  • (modified) llvm/unittests/Support/SpecialCaseListTest.cpp (+3-3)
diff --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp
index 393f0a411eb55..b7263850dbe48 100644
--- a/llvm/lib/Support/SpecialCaseList.cpp
+++ b/llvm/lib/Support/SpecialCaseList.cpp
@@ -397,7 +397,7 @@ SpecialCaseList::addSection(StringRef SectionStr, unsigned FileNo,
 
 bool SpecialCaseList::parse(unsigned FileIdx, const MemoryBuffer *MB,
                             std::string &Error) {
-  unsigned long long Version = 2;
+  unsigned long long Version = 3;
 
   StringRef Header = MB->getBuffer();
   if (Header.consume_front("#!special-case-list-v"))
diff --git a/llvm/unittests/Support/SpecialCaseListTest.cpp b/llvm/unittests/Support/SpecialCaseListTest.cpp
index 1e725d5c32790..674074b009f21 100644
--- a/llvm/unittests/Support/SpecialCaseListTest.cpp
+++ b/llvm/unittests/Support/SpecialCaseListTest.cpp
@@ -314,9 +314,9 @@ TEST_F(SpecialCaseListTest, DotSlash) {
                          "[not]\n"
                          "fun:foo\n"
                          "src:bar\n";
-  std::unique_ptr<SpecialCaseList> SCL2 = makeSpecialCaseList(IgnoreList);
-  std::unique_ptr<SpecialCaseList> SCL3 =
-      makeSpecialCaseList(IgnoreList, /*Version=*/3);
+  std::unique_ptr<SpecialCaseList> SCL2 = makeSpecialCaseList(IgnoreList,
+                                                              /*Version=*/2);
+  std::unique_ptr<SpecialCaseList> SCL3 = makeSpecialCaseList(IgnoreList);
   std::unique_ptr<SpecialCaseList> SCL4 = makeSpecialCaseList(IgnoreList,
                                                               /*Version=*/4);
 

vitalybuka added a commit to vitalybuka/llvm-project that referenced this pull request Nov 10, 2025
The difference from Version 2 is that file path will be matched
twice: as is and after removing leading "./".

Pull Request: llvm#167283
Created using spr 1.3.7
Created using spr 1.3.7
vitalybuka added a commit to vitalybuka/llvm-project that referenced this pull request Nov 12, 2025
The difference from Version 2 is that file path will be matched
twice: as is and after removing leading "./".

Pull Request: llvm#167283
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants