Am Dienstag, 3. März 2026, 09:05:22 Mitteleuropäische Normalzeit schrieb Jakub Jelinek: > On Mon, Mar 02, 2026 at 09:38:41PM -0500, Jason Merrill wrote: > > Could we use DECL_SOURCE_LOCATION instead? > > Would that be reliable? I dont't think so. In adition to to Jakubs examples, what about those two cases:
class A {
enum {
#include "generated_entries.h"
}
}
class B {
enum class X {
#include "generated_entries.h"
}
}
Or, what is the source_location here?
struct S;
for (auto constexpr x : members_of(^^O)) {
define_aggregate(^^S, /* cloned member */);
}
> Also, unsure about location_t when decls come from different modules e.g.
> when merging the same class from multiple sources (if that is possible).
I am not sure about this, but i don't think this should work. This should be
IFNDR based on ODR rules (multiple definitions attached to different named
modules).
Thomas
signature.asc
Description: This is a digitally signed message part.
