Skip to content

Commit d03ee70

Browse files
committed
[Tooling] Avoid StandardLibrary.h including Decl. NFC
So you can use the enum in a header without pulling in half the AST.
1 parent dce5bb9 commit d03ee70

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

clang/include/clang/Tooling/Inclusions/StandardLibrary.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@
1515
#ifndef LLVM_CLANG_TOOLING_INCLUSIONS_STANDARDLIBRARY_H
1616
#define LLVM_CLANG_TOOLING_INCLUSIONS_STANDARDLIBRARY_H
1717

18-
#include "clang/AST/Decl.h"
18+
#include "llvm/ADT/DenseMap.h"
1919
#include "llvm/ADT/Optional.h"
2020
#include "llvm/ADT/StringRef.h"
2121
#include "llvm/Support/raw_ostream.h"
2222
#include <string>
2323

2424
namespace clang {
25+
class Decl;
26+
class NamespaceDecl;
27+
class DeclContext;
2528
namespace tooling {
2629
namespace stdlib {
2730

clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "clang/Tooling/Inclusions/StandardLibrary.h"
10+
#include "clang/AST/Decl.h"
1011
#include "llvm/ADT/Optional.h"
1112
#include "llvm/ADT/StringRef.h"
1213
#include "llvm/Support/Casting.h"

0 commit comments

Comments
 (0)