aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/CXCursor.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-01 19:52:22 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-01 19:52:22 +0000
commit7e24256c95afb64b4d5abf201a0f9f0527cb4cf3 (patch)
tree1756abde87154fc918dbe4d6839c0ffdbf206a62 /tools/libclang/CXCursor.cpp
parent98c9d1fa3776204a94c013f1dc25f62d75c00573 (diff)
Implement libclang support for using declarations. Clang actually uses
three different kinds of AST nodes to represent using declarations: UsingDecl, UnresolvedUsingValueDecl, and UnresolvedUsingTypenameDecl. These three are collapsed into a single cursor kind for using declarations, since libclang clients don't need the distinction. Several related changes here: - Cursor visitation of the three AST nodes for using declarations - Proper source-range computation for these AST nodes - Using declarations have no USRs, since they don't actually declare any entities. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CXCursor.cpp')
-rw-r--r--tools/libclang/CXCursor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp
index 75806ffa8d..506033e766 100644
--- a/tools/libclang/CXCursor.cpp
+++ b/tools/libclang/CXCursor.cpp
@@ -71,6 +71,11 @@ static CXCursorKind GetCursorKind(Decl *D) {
return CXCursor_ClassTemplatePartialSpecialization;
case Decl::UsingDirective: return CXCursor_UsingDirective;
+ case Decl::Using:
+ case Decl::UnresolvedUsingValue:
+ case Decl::UnresolvedUsingTypename:
+ return CXCursor_UsingDeclaration;
+
default:
if (TagDecl *TD = dyn_cast<TagDecl>(D)) {
switch (TD->getTagKind()) {