Bug 16345 - spurious warning when using header scoped anonymous namespace


The following entry has been marked as invalid:

I’m not sure the reason is adequate. Any thoughts?


Your code would violate the one definition rule if 'foo' is
instantiated with the same type in two different translation units, so
Clang should certainly issue a warning for it. However, we're not
issuing the correct warning -- there are circumstances where internal
linkage functions in header files make sense, although your code is
not such a case.