From 302cb3bc3d7220e09f5dced64ddfdda33b9c49f9 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Fri, 29 Nov 2019 09:48:00 +0100 Subject: [Syntax] Add a comment explaining the pointer keys in std::map. NFC --- clang/lib/Tooling/Syntax/BuildTree.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Tooling/Syntax/BuildTree.cpp') diff --git a/clang/lib/Tooling/Syntax/BuildTree.cpp b/clang/lib/Tooling/Syntax/BuildTree.cpp index b36b8e00f7c..22cdb89b7bf 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 Trees; -- cgit v1.2.3