[PATCH] D85898: [SyntaxTree] Clean `#includes` in `TreeTestBase.h`

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 13 05:51:19 PDT 2020


gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/unittests/Tooling/Syntax/TreeTestBase.h:14
 #include "clang/AST/ASTConsumer.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/Stmt.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Frontend/CompilerInstance.h"
----------------
eduucaldas wrote:
> We can either remove this or
> ```
> #include "llvm/ADT/ArrayRef.h"
> #include "llvm/ADT/StringRef.h"
> #include "llvm/Support/Casting.h"
> #include "llvm/Support/Error.h"
> ```
> 
> I imagine that we'd rather leave the direct includes, in this case should we remove `clang/Basic/LLVM.h`?
> 
clang/Basic/LLVM.h only adds "using" declarations, it does not define the types themselves. So we need to keep both clang/Basic/LLVM.h and ArrayRef.h.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85898/new/

https://reviews.llvm.org/D85898



More information about the cfe-commits mailing list