Fixes #50794. Reopening an inline namespace without the inline keyword yields a warning:
inline namespace abc {} namespace abc {} namespace abc {}
<source>:2:11: warning: inline namespace reopened as a non-inline namespace [-Winline-namespace-reopened-noninline] namespace abc {} ^ inline <source>:1:18: note: previous definition is here inline namespace abc {} ^ <source>:3:11: warning: inline namespace reopened as a non-inline namespace [-Winline-namespace-reopened-noninline] namespace abc {} ^ inline <source>:2:11: note: previous definition is here namespace abc {} ^
But you'll notice that the second "previous definition is here" is actually not helpful, because this previous definition isn't explicitly marked inline. I think that the note should point to the first definition instead, which must always have the inline if the namespace is supposed to be an inline namespace.
There are no circumstances under which getFirstDecl() should return null, so I think this can be simplified.