Deathly Hallows, chapter 31, The Battle of Hogwarts:
Its ugly stone face made Harry think suddenly of the marble bust of Rowena Ravenclaw at Xenophilius’s house, wearing that mad headdress—and then of the statue in Ravenclaw Tower, with the stone diadem upon her white curls. . . .
And as he reached the end of the passage, the memory of a third stone effigy came back to him: that of an ugly old warlock, onto whose head Harry himself had placed a wig and a battered old tiara. The shock shot through Harry with the heat of firewhisky, and he nearly stumbled.
He knew, at last, where the Horcrux sat waiting for him. . . .
This is a reference to chapter 24 (Sectumsempra) of Half-Blood Prince, where Harry hid the Half-Blood Prince’s potions book in the Room of Requirement (in its guise as the Room of Hidden Things):
Would he be able to find this spot again amidst all this junk? Seizing the chipped bust of an ugly old warlock from on top of a nearby crate, he stood it on top of the cupboard where the book was now hidden, perched a dusty old wig and a tarnished tiara on the statue’s head to make it more distinctive
Harry realized that tiara he used to mark his hiding place is the lost diadem of Ravenclaw.