On 09/30/2011 11:28 AM, Jason Merrill wrote:
+linemap_location_before_p (struct line_maps *set,
+                          source_location  pre,
+                          source_location post)
+{
+  bool pre_from_macro_p, post_from_macro_p;
+
+  if (pre == post)
+    return false;
+
+  pre_from_macro_p =
+    linemap_location_from_macro_expansion_p (set, pre);
+  post_from_macro_p =
+    linemap_location_from_macro_expansion_p (set, post);
+
+  if (pre_from_macro_p != post_from_macro_p)
+    {
+      if (pre_from_macro_p)
+       pre = linemap_macro_loc_to_exp_point (set, pre, NULL);
+      else
+       post = linemap_macro_loc_to_exp_point (set, post, NULL);
+    }

What if the two locations are from different macros?

Jason

Reply via email to