[clang] [clang] Avoid line number collisions in line directive tests (PR #234270)

Eugene Velesevich via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 29 05:14:16 PDT 2026


================
@@ -3,45 +3,45 @@
 
----------------
TabbySqui wrote:

I just think that to change everything is a more reliable way. I mean it's difficult to manually track collisions since line-directive line numbers ain't even necessary to be the same to collide:
```c++
#line 2

#error // everything's fine here
#line 3
// expected-error {{}}
```

I want to guarantee the every physical line has an unique virtual line number to make diag collisions impossible.

https://github.com/llvm/llvm-project/pull/234270


More information about the cfe-commits mailing list