alexfh added inline comments.
================
Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:24
@@ +23,3 @@
+ .bind("name-decl"),
+ this);
+}
----------------
We're looking at the problem from different angles. My view is that a
reasonable file naming convention (which at least makes interface header files,
textual headers and main files distinguishable) is a widespread enough
practice, and the benefits it brings outweigh the costs of enforcing it.
However, the opposite point of view also has its right to exist, so we need a
solution that fits both ;)
> Perhaps another solution to this is use isInMainFile() ||
> usesHeaderFileExtension().
You probably meant `!isInMainFile() || usesHeaderFileExtension()`. I guess,
that will work for us. We could also make the list of header file extensions
(or a regular expression pattern for header files) configurable, so that the
`usesHeaderFileExtension()` part could be disabled, if needed.
http://reviews.llvm.org/D15710
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits