hokein marked an inline comment as done.
hokein added inline comments.
================
Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:131-135
+ if (FD->getTemplateSpecializationKind() != TSK_Undeclared)
+ diag(FD->getLocation(), "this is a full function template specilization "
+ "which behaves as a regular function, so the ODR
"
+ "still applies",
+ DiagnosticIDs::Note);
----------------
alexfh wrote:
> Notes are useful for pointing at related but different locations (e.g. point
> to the declaration of an entity when the diagnostic is issued at a reference
> to the entity).
>
> Here I would suggest just issuing a different message (e.g. `diag(...,
> "%select{function|full function template specialization}0 %1 defined in a
> header file ....") << (FD->getTemplateSpecializationKind() != TSK_Undeclared)
> << FD << ...;`) or if it seems more helpful, add a note pointing to the
> template being specialized.
SG. Didn't know `%select` before, thanks for pointing it out.
https://reviews.llvm.org/D29928
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits