Skip to content

Commit 1289736

Browse files
committed
fix: resolve bar.pcm false positive + remove continue-on-error from mcpp test
clang-scan-deps on Windows false-positives on `import bar;` inside R"(...)" raw string literals in test_modgraph.cpp. Convert to regular string concatenation to avoid the scanner seeing it. Remove continue-on-error from mcpp test — it should now pass. Tag test 02 back to fresh-sandbox pending cp_bmi investigation.
1 parent d51a973 commit 1289736

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

.github/workflows/ci-windows.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ jobs:
9595
echo "MCPP_SELF=$MCPP_SELF" >> "$GITHUB_ENV"
9696
9797
- name: Unit + integration tests via mcpp test
98-
continue-on-error: true
9998
shell: bash
10099
run: |
101100
export MCPP_VENDORED_XLINGS=$(cygpath -w "$USERPROFILE/.xlings/subos/default/bin/xlings.exe")

tests/e2e/02_new_build_run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# requires:
2+
# requires: fresh-sandbox
33
# Single-module hello world: mcpp new → build → run
44
set -e
55

tests/unit/test_modgraph.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ void write(const std::filesystem::path& p, std::string_view content) {
2727

2828
TEST(Scanner, ProvidesAndRequires) {
2929
auto dir = make_tempdir("mcpp-scanner");
30-
write(dir / "src" / "foo.cppm", R"(export module foo;
31-
import std;
32-
import bar;
33-
export int answer();
34-
)");
30+
// NOTE: avoid raw string literal for module source — clang-scan-deps
31+
// on Windows may false-positive on `import bar;` inside R"(...)".
32+
write(dir / "src" / "foo.cppm",
33+
"export module foo;\n"
34+
"import std;\n"
35+
"import bar;\n"
36+
"export int answer();\n");
3537

3638
auto u = scan_file(dir / "src" / "foo.cppm", "pkg");
3739
ASSERT_TRUE(u.has_value()) << u.error().format();

0 commit comments

Comments
 (0)