The weird thing about that question, other than the visual of a giant reptile sniffing at a bush, is that it is the flowers that are the questionable element.
The evidence suggests that some dinosaurs at least had an amazing sense of smell. Studies of Tyrannosaur brain shape show it had a large olfactory bulb, (that’s the bit used for making sense of scents) and more recent genetic studies based on modern birds indicate that therapods like T.Rex would have had a complicated nasal palette.
Flowers are something we’re a lot less sure of. The angiosperm (flowering plant) fossil record is kind of weird. Looking at the fossils it would seem that the earliest flowering plants arose in the Cretaceous period, around the same time as later dinosaurs, and all the major divisions of flowering plant then arose very quickly thereafter. Like Athena from the head of Zeus, they arrived fully formed and ready for war, quickly establishing themselves as the dominant form of plant life, a position they still hold today.
Now that’s quick in geological terms. We’re still talking a couple of million years, but it was fast enough that Charles Darwin called it “an abominable mystery”. fossils of potentially older flowers still attract a lot of debate and discussion.
There is also new genetic evidence that the lineage of flowering plants could date back , all the way back to the late Triassic. The same study separates out the rapid radiations seen in the fossil record as well. Having genetic dating and fossil records disagree with each other isn’t a particularly unusual thing. The gap here is particularly large.
Fossils are incredibly rare, and the population required to create significant numbers of fossils are very large. As a result, fossils tend to post-date the actual arrival of a species, occasionally quite significantly.
Genetic dating is based on a number of difficult to make estimates and assumptions about how long a generation is and rates of mutation. It can be very precise, but it’s hard to claim it’s very accurate.
What is interesting though is that the genetic date apparently coincides pretty closely with the evolution of a number of important insect families. Specifically Lepidoptera (butterflies and moths) and Hymenoptera (Wasps and Bees). These insect families are major pollinators for angiosperms. It’s not evidence that the early angiosperms were pollinated by these insects, at all, but co-existence is a fundamental first prerequisite towards cooperation.
Whenever the actual origination of angiosperms occurred though, we can safely say that the later dinosaurs such as T.Rex and Triceratops would have been able to sniff at the flowers, as both methods of estimating floral evolution claim eudicots were established at that time. Poor Diplodocus though is right in the middle, and may have missed out on the beauty of blooms.