etienneb added a comment.

In http://reviews.llvm.org/D20714#444802, @Eugene.Zelenko wrote:

> Point of Include What You Use suggestions to rely on explicit dependencies, 
> not implicit ones.


It's true most of the time.
In some case,  splitting the header file is for maintainability and including 
the root is still the right coding-style to use.

I can't tell about what clang/llvm community will prefer. Both approaches make 
sense and it's matter of choice.

As an example, look to "ast.h"... there is no needs at all for the existence of 
that file if you only rely on your current rules.

  14 #ifndef LLVM_CLANG_AST_AST_H
  15 #define LLVM_CLANG_AST_AST_H
  16 
  17 // This header exports all AST interfaces.
  18 #include "clang/AST/ASTContext.h"
  19 #include "clang/AST/Decl.h"
  20 #include "clang/AST/DeclCXX.h"
  21 #include "clang/AST/DeclObjC.h"
  22 #include "clang/AST/DeclTemplate.h"
  23 #include "clang/AST/Expr.h"
  24 #include "clang/AST/ExprObjC.h"
  25 #include "clang/AST/StmtVisitor.h"
  26 #include "clang/AST/Type.h"
  27 
  28 #endif

On my side, having the include statement for every AST file is over-kill.


Repository:
  rL LLVM

http://reviews.llvm.org/D20714



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to