Skip to content

C++: a // line comment continued by backslash-newline leaks its next line into every keyword family #9439

Backlog

Description

@squid-protocol

Found by the SOP-002 gap-cell decoy suite (protocol SOP-002-v1, epic #8863). Locked in as xfail(strict=True); no engine change in that PR.

Construct: ISO C++ translation phase 2 splices a backslash-newline before comments are recognised, so the line after a trailing \ is still part of the // comment. Prism ends the comment at the first newline.

Snippet (leaks for closures, import, telemetry, and any other family):

// note \
#include <vector>

Expected: 0 import hits (the include is inside the comment). Actual: 1. Same for // note \ + auto f = [x](int y) { return x + y; }; (closures) and logger.info("x"); (telemetry).

Locked in tests/decoys/test_decoy_cpp.py::test_cpp_line_comment_continued_by_backslash_newline. Other C-family languages with the same rule (C, Objective-C) should be checked by their own SOP-002 batches.

Activity

  1. added
    bug
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions