[cfe-commits] r96788 - /cfe/trunk/lib/AST/ASTImporter.cpp
Douglas Gregor
dgregor at apple.com
Mon Feb 22 09:42:47 PST 2010
Author: dgregor
Date: Mon Feb 22 11:42:47 2010
New Revision: 96788
URL: http://llvm.org/viewvc/llvm-project?rev=96788&view=rev
Log:
Set access specifiers on imported declarations.
Modified:
cfe/trunk/lib/AST/ASTImporter.cpp
Modified: cfe/trunk/lib/AST/ASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=96788&r1=96787&r2=96788&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTImporter.cpp (original)
+++ cfe/trunk/lib/AST/ASTImporter.cpp Mon Feb 22 11:42:47 2010
@@ -1522,6 +1522,7 @@
TypedefDecl *ToTypedef = TypedefDecl::Create(Importer.getToContext(), DC,
Loc, Name.getAsIdentifierInfo(),
TInfo);
+ ToTypedef->setAccess(D->getAccess());
ToTypedef->setLexicalDeclContext(LexicalDC);
Importer.Imported(D, ToTypedef);
LexicalDC->addDecl(ToTypedef);
@@ -1581,6 +1582,7 @@
Name.getAsIdentifierInfo(),
Importer.Import(D->getTagKeywordLoc()),
0);
+ D2->setAccess(D->getAccess());
D2->setLexicalDeclContext(LexicalDC);
Importer.Imported(D, D2);
LexicalDC->addDecl(D2);
@@ -1691,6 +1693,7 @@
Name.getAsIdentifierInfo(),
Importer.Import(D->getTagKeywordLoc()));
D2 = D2CXX;
+ D2->setAccess(D->getAccess());
if (D->isDefinition()) {
// Add base classes.
@@ -1779,6 +1782,7 @@
= EnumConstantDecl::Create(Importer.getToContext(), cast<EnumDecl>(DC), Loc,
Name.getAsIdentifierInfo(), T,
Init, D->getInitVal());
+ ToEnumerator->setAccess(D->getAccess());
ToEnumerator->setLexicalDeclContext(LexicalDC);
Importer.Imported(D, ToEnumerator);
LexicalDC->addDecl(ToEnumerator);
@@ -1886,6 +1890,7 @@
D->isInlineSpecified(),
D->hasWrittenPrototype());
}
+ ToFunction->setAccess(D->getAccess());
ToFunction->setLexicalDeclContext(LexicalDC);
Importer.Imported(D, ToFunction);
LexicalDC->addDecl(ToFunction);
@@ -1939,6 +1944,7 @@
FieldDecl *ToField = FieldDecl::Create(Importer.getToContext(), DC,
Loc, Name.getAsIdentifierInfo(),
T, TInfo, BitWidth, D->isMutable());
+ ToField->setAccess(D->getAccess());
ToField->setLexicalDeclContext(LexicalDC);
Importer.Imported(D, ToField);
LexicalDC->addDecl(ToField);
@@ -2094,6 +2100,7 @@
VarDecl *ToVar = VarDecl::Create(Importer.getToContext(), DC, Loc,
Name.getAsIdentifierInfo(), T, TInfo,
D->getStorageClass());
+ ToVar->setAccess(D->getAccess());
ToVar->setLexicalDeclContext(LexicalDC);
Importer.Imported(D, ToVar);
LexicalDC->addDecl(ToVar);
More information about the cfe-commits
mailing list