Skip to content

Commit

Permalink
[Tooling] Avoid StandardLibrary.h including Decl. NFC
Browse files Browse the repository at this point in the history
So you can use the enum in a header without pulling in half the AST.
  • Loading branch information
sam-mccall committed Oct 25, 2022
1 parent dce5bb9 commit d03ee70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clang/include/clang/Tooling/Inclusions/StandardLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
#ifndef LLVM_CLANG_TOOLING_INCLUSIONS_STANDARDLIBRARY_H
#define LLVM_CLANG_TOOLING_INCLUSIONS_STANDARDLIBRARY_H

#include "clang/AST/Decl.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/raw_ostream.h"
#include <string>

namespace clang {
class Decl;
class NamespaceDecl;
class DeclContext;
namespace tooling {
namespace stdlib {

Expand Down
1 change: 1 addition & 0 deletions clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//

#include "clang/Tooling/Inclusions/StandardLibrary.h"
#include "clang/AST/Decl.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
Expand Down

0 comments on commit d03ee70

Please sign in to comment.