Skip to content

Commit 82dd7e0

Browse files
committed
fixed #14249 - XML suppression parsing did not simplify the file name
1 parent b929737 commit 82dd7e0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/suppressions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ std::string SuppressionList::parseXmlFile(const char *filename)
129129
if (std::strcmp(name, "id") == 0)
130130
s.errorId = text;
131131
else if (std::strcmp(name, "fileName") == 0)
132-
s.fileName = text;
132+
s.fileName = Path::simplifyPath(text);
133133
else if (std::strcmp(name, "lineNumber") == 0)
134134
s.lineNumber = strToInt<int>(text);
135135
else if (std::strcmp(name, "symbolName") == 0)

test/cli/other_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3847,6 +3847,7 @@ def test_unmatched_file(tmp_path):
38473847
'lib/test.c:-1:0: information: Unmatched suppression: error [unmatchedSuppression]',
38483848
'lib/test.c:-1:0: information: Unmatched suppression: error2 [unmatchedSuppression]',
38493849
'lib/test.c:-1:0: information: Unmatched suppression: error3 [unmatchedSuppression]',
3850+
'lib/test.c:-1:0: information: Unmatched suppression: error4 [unmatchedSuppression]',
38503851
'lib/test.c:-1:0: information: Unmatched suppression: error5 [unmatchedSuppression]',
38513852
'lib/test.c:-1:0: information: Unmatched suppression: error6 [unmatchedSuppression]'
38523853
]

0 commit comments

Comments
 (0)