diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-01-27 22:06:42 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-01-27 22:06:42 +0000 |
| commit | 6f8fc217eaa12bf657be1c6468ed9938d10168b3 (patch) | |
| tree | a1fd89b864d9b93e2ad68fe1dcf7afee2e3c8d76 /clang/lib/Tooling/Syntax | |
| parent | 77fc4c146f0870ffb09c1afb823ccbe742c5e6ff (diff) | |
Diffstat (limited to 'clang/lib/Tooling/Syntax')
| -rw-r--r-- | clang/lib/Tooling/Syntax/Tree.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Tooling/Syntax/Tree.cpp b/clang/lib/Tooling/Syntax/Tree.cpp index c813865e95cd..981bac508f73 100644 --- a/clang/lib/Tooling/Syntax/Tree.cpp +++ b/clang/lib/Tooling/Syntax/Tree.cpp @@ -9,6 +9,7 @@ #include "clang/Basic/TokenKinds.h" #include "clang/Tooling/Syntax/Nodes.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/BitVector.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Casting.h" #include <cassert> @@ -202,7 +203,7 @@ static void dumpLeaf(raw_ostream &OS, const syntax::Leaf *L, } static void dumpNode(raw_ostream &OS, const syntax::Node *N, - const SourceManager &SM, std::vector<bool> IndentMask) { + const SourceManager &SM, llvm::BitVector IndentMask) { auto DumpExtraInfo = [&OS](const syntax::Node *N) { if (N->getRole() != syntax::NodeRole::Unknown) OS << " " << N->getRole(); @@ -228,8 +229,8 @@ static void dumpNode(raw_ostream &OS, const syntax::Node *N, OS << "\n"; for (const syntax::Node &It : T->getChildren()) { - for (bool Filled : IndentMask) { - if (Filled) + for (unsigned Idx = 0; Idx < IndentMask.size(); ++Idx) { + if (IndentMask[Idx]) OS << "| "; else OS << " "; |
