May 04, 2023
https://issues.dlang.org/show_bug.cgi?id=23883

          Issue ID: 23883
           Summary: `#line` is off by one and off by two if a line comment
                    follows
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: qs.il.paperinik@gmail.com

```d
#line 3 "a.d"
```
and
```d
#line 3 "a.d" //
```
behave differently:

In the first case, the #line is line 2, in the second case, the #line is line 1.

I created https://github.com/dlang/dlang.org/pull/3601 to document the current behavior in the non-comment case.

--