aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-10-18 18:51:48 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-10-18 18:51:48 +0000
commitce781e4010101fb16bf25027285d716de72485b6 (patch)
treec757c1a83d504e1f5b1a9adb3549f3fc54baf5f0
parentcd6c78386f304e4c9f0122eac7d86354de1bcaca (diff)
downloadllvm-ce781e4010101fb16bf25027285d716de72485b6.zip
llvm-ce781e4010101fb16bf25027285d716de72485b6.tar.gz
llvm-ce781e4010101fb16bf25027285d716de72485b6.tar.bz2
[refactor] Add a doc comment to the test function in the selection
unittest. As suggested by Haojian Wu! llvm-svn: 316105
-rw-r--r--clang/unittests/Tooling/ASTSelectionTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Tooling/ASTSelectionTest.cpp b/clang/unittests/Tooling/ASTSelectionTest.cpp
index 386ae336..79e89f9 100644
--- a/clang/unittests/Tooling/ASTSelectionTest.cpp
+++ b/clang/unittests/Tooling/ASTSelectionTest.cpp
@@ -59,6 +59,11 @@ public:
}
};
+/// This is a test utility function that computes the AST selection at the
+/// given location with an optional selection range.
+///
+/// A location roughly corresponds to a cursor location in an editor, while
+/// the optional range corresponds to the selection range in an editor.
void findSelectedASTNodesWithRange(
StringRef Source, FileLocation Location, Optional<FileRange> SelectionRange,
llvm::function_ref<void(SourceRange SelectionRange,