[clang] [clang] Avoid line number collisions in line directive tests (PR #234270)
Ken Matsui via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 3 15:56:44 PST 2026
================
@@ -19,64 +19,64 @@
#line 00 // expected-warning {{#line directive with zero argument is a GNU extension}}
#line 2147483648 // expected-warning {{C requires #line number to be less than 2147483648, allowed as extension}}
#line 42 // ok
-#line 42 'a' // expected-error {{invalid filename for #line directive}}
-#line 42 "foo/bar/baz.h" // ok
+#line 44 'a' // expected-error {{invalid filename for #line directive}}
+#line 46 "foo/bar/baz.h" // ok
// #line directives expand macros.
-#define A 42 "foo"
+#define A 54 "foo"
#line A
-# 42 // expected-warning {{this style of line directive is a GNU extension}}
-# 42 "foo" // expected-warning {{this style of line directive is a GNU extension}}
-# 42 "foo" 2 // expected-error {{invalid line marker flag '2': cannot pop empty include stack}}
+# 60 // expected-warning {{this style of line directive is a GNU extension}}
+# 62 "foo" // expected-warning {{this style of line directive is a GNU extension}}
+# 64 "foo" 2 // expected-error {{invalid line marker flag '2': cannot pop empty include stack}}
// The next two lines do not get diagnosed because they are considered to be
// within the system header, where diagnostics are suppressed.
----------------
ken-matsui wrote:
I think this comment is stale now
https://github.com/llvm/llvm-project/pull/234270
More information about the cfe-commits
mailing list