aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2019-11-29 09:48:00 +0100
committerIlya Biryukov <ibiryukov@google.com>2019-11-29 09:49:24 +0100
commit302cb3bc3d7220e09f5dced64ddfdda33b9c49f9 (patch)
tree4153a9f61ceb32af97b2fbc18905753fa4f151aa
parentdef65bb4f5bc87588fa6f849225397c21dcefb2b (diff)
downloadllvm-302cb3bc3d7220e09f5dced64ddfdda33b9c49f9.zip
llvm-302cb3bc3d7220e09f5dced64ddfdda33b9c49f9.tar.gz
llvm-302cb3bc3d7220e09f5dced64ddfdda33b9c49f9.tar.bz2
[Syntax] Add a comment explaining the pointer keys in std::map<Token*, ...>. NFC
-rw-r--r--clang/lib/Tooling/Syntax/BuildTree.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Tooling/Syntax/BuildTree.cpp b/clang/lib/Tooling/Syntax/BuildTree.cpp
index b36b8e0..22cdb89 100644
--- a/clang/lib/Tooling/Syntax/BuildTree.cpp
+++ b/clang/lib/Tooling/Syntax/BuildTree.cpp
@@ -209,6 +209,8 @@ private:
};
/// Maps from the start token to a subtree starting at that token.
+ /// Keys in the map are pointers into the array of expanded tokens, so
+ /// pointer order corresponds to the order of preprocessor tokens.
/// FIXME: storing the end tokens is redundant.
/// FIXME: the key of a map is redundant, it is also stored in NodeForRange.
std::map<const syntax::Token *, NodeAndRole> Trees;