summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CXCursor.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-09 21:42:20 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-09 21:42:20 +0000
commitf3af3113822378576ec9501243df7469b9b3b23c (patch)
treecace468e163bf34862b2ff0bc534d566a6d5d984 /clang/tools/libclang/CXCursor.h
parent7ce46869586141f3087a6b6460dfe8773d02c17a (diff)
downloadbcm5719-llvm-f3af3113822378576ec9501243df7469b9b3b23c.tar.gz
bcm5719-llvm-f3af3113822378576ec9501243df7469b9b3b23c.zip
Teach libclang to walk the base and member initializers of a
constructor, in source order. Also introduces a new reference kind for class members, which is used here (for member initializers) and will also be used for designated initializers and offsetof. llvm-svn: 113545
Diffstat (limited to 'clang/tools/libclang/CXCursor.h')
-rw-r--r--clang/tools/libclang/CXCursor.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/tools/libclang/CXCursor.h b/clang/tools/libclang/CXCursor.h
index a5f111edc1d..eff71f398a3 100644
--- a/clang/tools/libclang/CXCursor.h
+++ b/clang/tools/libclang/CXCursor.h
@@ -26,6 +26,7 @@ class Attr;
class CXXBaseSpecifier;
class Decl;
class Expr;
+class FieldDecl;
class MacroDefinition;
class MacroInstantiation;
class NamedDecl;
@@ -93,6 +94,14 @@ CXCursor MakeCursorNamespaceRef(NamedDecl *NS, SourceLocation Loc, ASTUnit *TU);
/// it references and the location where the reference occurred.
std::pair<NamedDecl *, SourceLocation> getCursorNamespaceRef(CXCursor C);
+/// \brief Create a reference to a field at the given location.
+CXCursor MakeCursorMemberRef(FieldDecl *Field, SourceLocation Loc,
+ ASTUnit *TU);
+
+/// \brief Unpack a MemberRef cursor into the field it references and the
+/// location where the reference occurred.
+std::pair<FieldDecl *, SourceLocation> getCursorMemberRef(CXCursor C);
+
/// \brief Create a CXX base specifier cursor.
CXCursor MakeCursorCXXBaseSpecifier(CXXBaseSpecifier *B, ASTUnit *TU);
OpenPOWER on IntegriCloud