diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-01 03:07:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-01 03:07:18 +0000 |
commit | 0a35bceb7768fc0be62cb644a4e31d8bfd9fb44a (patch) | |
tree | 4ae71942a6fa3da406572486143a0b314537367c /lib/Serialization/ASTReaderDecl.cpp | |
parent | 53b9441b5a81a24fa1f66f3f6416f1e36baa9c2f (diff) |
Implement libclang support for using directives (cursor + visitation +
suppressing USRs). Also, fix up the source location information for
using directives so that the declaration location refers to the
namespace name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index 512d4b5717..cb6f29a077 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -676,13 +676,12 @@ void ASTDeclReader::VisitUsingShadowDecl(UsingShadowDecl *D) { void ASTDeclReader::VisitUsingDirectiveDecl(UsingDirectiveDecl *D) { VisitNamedDecl(D); - D->setNamespaceKeyLocation(Reader.ReadSourceLocation(Record, Idx)); - D->setQualifierRange(Reader.ReadSourceRange(Record, Idx)); - D->setQualifier(Reader.ReadNestedNameSpecifier(Record, Idx)); - D->setIdentLocation(Reader.ReadSourceLocation(Record, Idx)); - D->setNominatedNamespace(cast<NamedDecl>(Reader.GetDecl(Record[Idx++]))); - D->setCommonAncestor(cast_or_null<DeclContext>( - Reader.GetDecl(Record[Idx++]))); + D->UsingLoc = Reader.ReadSourceLocation(Record, Idx); + D->NamespaceLoc = Reader.ReadSourceLocation(Record, Idx); + D->QualifierRange = Reader.ReadSourceRange(Record, Idx); + D->Qualifier = Reader.ReadNestedNameSpecifier(Record, Idx); + D->NominatedNamespace = cast<NamedDecl>(Reader.GetDecl(Record[Idx++])); + D->CommonAncestor = cast_or_null<DeclContext>(Reader.GetDecl(Record[Idx++])); } void ASTDeclReader::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) { |