aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-01 00:08:19 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-01 00:08:19 +0000
commit8ea5b9d832455247a15925398fb663d299d33238 (patch)
tree4eb0813d0bc22badf9b31bae0c99092e41598479 /lib/Serialization/ASTWriterDecl.cpp
parent0b6542cbc120f6db0bb8f593e050dae8a09a7281 (diff)
Improve location information in the representation of namespace
aliases. Previously, the location of the alias was at the "namespace" keyword. Now, it's on the identifier being declared (as is the custom for Clang), and we keep a separate source location for the "namespace" keyword. Also, added a getSourceRange() member function to NamespaceAliasDecl to correctly compute the source range. Finally, removed a bunch of setters from NamespaceAliasDecl and gave ASTReaderDecl friendship so that it could set the corresponding fields directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--lib/Serialization/ASTWriterDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Serialization/ASTWriterDecl.cpp b/lib/Serialization/ASTWriterDecl.cpp
index 413f544f4c..9ac12fb56e 100644
--- a/lib/Serialization/ASTWriterDecl.cpp
+++ b/lib/Serialization/ASTWriterDecl.cpp
@@ -614,7 +614,7 @@ void ASTDeclWriter::VisitNamespaceDecl(NamespaceDecl *D) {
void ASTDeclWriter::VisitNamespaceAliasDecl(NamespaceAliasDecl *D) {
VisitNamedDecl(D);
- Writer.AddSourceLocation(D->getAliasLoc(), Record);
+ Writer.AddSourceLocation(D->getNamespaceLoc(), Record);
Writer.AddSourceRange(D->getQualifierRange(), Record);
Writer.AddNestedNameSpecifier(D->getQualifier(), Record);
Writer.AddSourceLocation(D->getTargetNameLoc(), Record);