Skip to content

Commit 521c997

Browse files
committed
A14-7-2: Just report base name
The source ___location is different between compiler testing and qltest, leading to spurious differences. This simplifies the query, reporting only the base name of the file but still reporting the link.
1 parent ae7461a commit 521c997

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp/autosar/src/rules/A14-7-2/TemplateSpecializationNotDeclaredInTheSameFile.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ where
5858
not spec.getFile() = spec.getPrimary().getFile() and
5959
not extraExclude(spec)
6060
select spec, "Specialization found in file $@ where primary template is outside that file.",
61-
spec.getFile(), spec.getFile().getRelativePath()
61+
spec.getFile(), spec.getFile().getBaseName()
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
| test.cpp:5:20:5:25 | s<int> | Specialization found in file $@ where primary template is outside that file. | test.cpp:0:0:0:0 | test.cpp | rules/A14-7-2/test.cpp |
2-
| test.cpp:7:18:7:24 | f | Specialization found in file $@ where primary template is outside that file. | test.cpp:0:0:0:0 | test.cpp | rules/A14-7-2/test.cpp |
3-
| test.cpp:13:19:13:28 | vector<s1, allocator<s1>> | Specialization found in file $@ where primary template is outside that file. | test.cpp:0:0:0:0 | test.cpp | rules/A14-7-2/test.cpp |
1+
| test.cpp:5:20:5:25 | s<int> | Specialization found in file $@ where primary template is outside that file. | test.cpp:0:0:0:0 | test.cpp | test.cpp |
2+
| test.cpp:7:18:7:24 | f | Specialization found in file $@ where primary template is outside that file. | test.cpp:0:0:0:0 | test.cpp | test.cpp |
3+
| test.cpp:13:19:13:28 | vector<s1, allocator<s1>> | Specialization found in file $@ where primary template is outside that file. | test.cpp:0:0:0:0 | test.cpp | test.cpp |

0 commit comments

Comments
 (0)