aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Tooling/Syntax/BuildTree.cpp
diff options
context:
space:
mode:
authorEduardo Caldas <ecaldas@google.com>2020-08-28 09:23:13 +0000
committerEduardo Caldas <ecaldas@google.com>2020-08-28 12:19:38 +0000
commita1461953f4efe574e3fdecfbae68bd18707748fb (patch)
tree935e6eb3ff8be2b1143d159f035359619c868d3e /clang/lib/Tooling/Syntax/BuildTree.cpp
parent38bc0060e60fef5395c23b8b75163e5bdee23af6 (diff)
downloadllvm-a1461953f4efe574e3fdecfbae68bd18707748fb.zip
llvm-a1461953f4efe574e3fdecfbae68bd18707748fb.tar.gz
llvm-a1461953f4efe574e3fdecfbae68bd18707748fb.tar.bz2
[SyntaxTree] Add coverage for declarators and init-declarators
Diffstat (limited to 'clang/lib/Tooling/Syntax/BuildTree.cpp')
-rw-r--r--clang/lib/Tooling/Syntax/BuildTree.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Tooling/Syntax/BuildTree.cpp b/clang/lib/Tooling/Syntax/BuildTree.cpp
index 2e9e744..a9f3264 100644
--- a/clang/lib/Tooling/Syntax/BuildTree.cpp
+++ b/clang/lib/Tooling/Syntax/BuildTree.cpp
@@ -200,6 +200,7 @@ static syntax::NodeKind getOperatorNodeKind(const CXXOperatorCallExpr &E) {
/// Get the start of the qualified name. In the examples below it gives the
/// location of the `^`:
/// `int ^a;`
+/// `int *^a;`
/// `int ^a::S::f(){}`
static SourceLocation getQualifiedNameStart(NamedDecl *D) {
assert((isa<DeclaratorDecl, TypedefNameDecl>(D)) &&
@@ -242,7 +243,7 @@ static SourceRange getInitializerRange(Decl *D) {
/// `int a[1][2][3];` -> range of `a[1][2][3]`,
/// `int *a = nullptr` -> range of `*a = nullptr`.
/// `int S::f(){}` -> range of `S::f()`.
-/// FIXME: \p Name must be a source range, e.g. for `operator+`.
+/// FIXME: \p Name must be a source range.
static SourceRange getDeclaratorRange(const SourceManager &SM, TypeLoc T,
SourceLocation Name,
SourceRange Initializer) {