From c37a357c13b399b79fb1ef197738f60cae472dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Sun, 12 Apr 2020 15:42:45 +0900 Subject: include what you use. This reverts commit 443389effc37308ce1a3c3a840082a344fc6af56. This reverts commit d94960f22ec2de3a3855305cb51343806d2b46c7. Inclusion of header files must be explicit. Every file shall directly include what is necessary. https://github.com/include-what-you-use/include-what-you-use says: > When every file includes what it uses, then it is possible to edit any > file and remove unused headers, without fear of accidentally breaking > the upwards dependencies of that file. It also becomes easy to > automatically track and update dependencies in the source code. Though we don't use iwyu itself, the principle quoted above is a good thing that we can agree. Now that include guards were added to every and all of the headers inside of our project this changeset does not increase compile time, at least on my machine. --- include/ruby/3/has/cpp_attribute.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/ruby/3/has/cpp_attribute.h') diff --git a/include/ruby/3/has/cpp_attribute.h b/include/ruby/3/has/cpp_attribute.h index 42209c0955..941f7ddca3 100644 --- a/include/ruby/3/has/cpp_attribute.h +++ b/include/ruby/3/has/cpp_attribute.h @@ -21,6 +21,8 @@ * @brief Defines #RUBY3_HAS_CPP_ATTRIBUTE. */ #include "ruby/3/compiler_is.h" +#include "ruby/3/compiler_since.h" +#include "ruby/3/token_paste.h" /** @cond INTERNAL_MACRO */ #if defined(__has_cpp_attribute) -- cgit v1.2.3