diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-04-19 22:54:31 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-04-19 22:54:31 +0000 |
| commit | c4df407604b8798dfc56b2692d25b13a11fda0db (patch) | |
| tree | 59242265f2be854097d23a39ccf0f62a83524eb7 /clang/lib/Sema/SemaDeclCXX.cpp | |
| parent | 8cccc542f643abcd73a44f9bdbb5ea11e970d883 (diff) | |
| download | bcm5719-llvm-c4df407604b8798dfc56b2692d25b13a11fda0db.tar.gz bcm5719-llvm-c4df407604b8798dfc56b2692d25b13a11fda0db.zip | |
Keep track of the actual storage specifier written on a variable or
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.
llvm-svn: 101826
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index c6fd53ca613..c8a3a8ab33b 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -2385,6 +2385,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(Scope *S, ClassDecl->getLocation(), /*IdentifierInfo=*/0, ArgType, /*TInfo=*/0, + VarDecl::None, VarDecl::None, 0); CopyConstructor->setParams(&FromParam, 1); if (S) @@ -2464,7 +2465,9 @@ void Sema::AddImplicitlyDeclaredMembersToClass(Scope *S, /*FIXME:*/false, false, 0, 0, FunctionType::ExtInfo()), - /*TInfo=*/0, /*isStatic=*/false, /*isInline=*/true); + /*TInfo=*/0, /*isStatic=*/false, + /*StorageClassAsWritten=*/FunctionDecl::None, + /*isInline=*/true); CopyAssignment->setAccess(AS_public); CopyAssignment->setImplicit(); CopyAssignment->setTrivial(ClassDecl->hasTrivialCopyAssignment()); @@ -2475,6 +2478,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(Scope *S, ClassDecl->getLocation(), /*IdentifierInfo=*/0, ArgType, /*TInfo=*/0, + VarDecl::None, VarDecl::None, 0); CopyAssignment->setParams(&FromParam, 1); @@ -4787,7 +4791,8 @@ VarDecl *Sema::BuildExceptionDeclaration(Scope *S, QualType ExDeclType, Invalid = true; VarDecl *ExDecl = VarDecl::Create(Context, CurContext, Loc, - Name, ExDeclType, TInfo, VarDecl::None); + Name, ExDeclType, TInfo, VarDecl::None, + VarDecl::None); if (!Invalid) { if (const RecordType *RecordTy = ExDeclType->getAs<RecordType>()) { |

