Mammals are from Synapsids[0] and dinosaurs (and modern reptiles) are from Sauropsida[1] — with the commonality being that amphibians split off first [2]. We can draw disjoint clades, which we cannot do for birds and dinosaurs. Beyond that, you’re just talking about tetrapods in general [3]. Reptiliomorpha has multiple names, precisely due to this — eg, pan-amniota.