From a9aa29cf0b171e0046111e99c555250e45b39a3b Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 1 Sep 2010 19:52:22 +0000 Subject: 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. llvm-svn: 112730 --- clang/tools/libclang/CIndexUSRs.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'clang/tools/libclang/CIndexUSRs.cpp') diff --git a/clang/tools/libclang/CIndexUSRs.cpp b/clang/tools/libclang/CIndexUSRs.cpp index a60d1d3e189..8f3dacfad21 100644 --- a/clang/tools/libclang/CIndexUSRs.cpp +++ b/clang/tools/libclang/CIndexUSRs.cpp @@ -86,6 +86,15 @@ public: void VisitUsingDirectiveDecl(UsingDirectiveDecl *D) { IgnoreResults = true; } + void VisitUsingDecl(UsingDecl *D) { + IgnoreResults = true; + } + void VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) { + IgnoreResults = true; + } + void VisitUnresolvedUsingTypenameDecl(UnresolvedUsingTypenameDecl *D) { + IgnoreResults = true; + } /// Generate the string component containing the location of the /// declaration. -- cgit v1.2.3