================
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 %s -debug-info-kind=standalone -emit-llvm -o - | FileCheck 
%s
+
+#define GLOBAL(num) global##num
+#define DECL_GLOBAL(x) int x
+#define SAME_ORDER(x, y) x; y
+#define SWAP_ORDER(x,y) y; x
+
+// CHECK: DIGlobalVariable(name: "global",{{.*}} line: [[@LINE+4]]
+// CHECK: DIGlobalVariable({{.*}}line: [[@LINE+6]],{{.*}} type: 
[[TYPEID:![0-9]+]]
+SAME_ORDER(
+  int
+    GLOBAL  // <- global
+      () = 42,
+  const char* s() {
+    return "1234567890";
+  }
+)
+// CHECK: DIGlobalVariable(name: "global3",{{.*}} line: [[@LINE+6]]
+// CHECK: DIGlobalVariable(name: "global2",{{.*}} line: [[@LINE+2]]
----------------
dwblaikie wrote:

Could these comments (including those elsewhere in the test) be moved closer 
(within the macro argument) to the relevant line - ideally immediately prior 
(so it's `@LINE+1`, or even in a trailing comment on the same line using 
`@LINE`)

https://github.com/llvm/llvm-project/pull/163190
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to