diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-09-05 01:34:33 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-09-05 01:34:33 +0000 |
commit | df042e6c2bf06b2d9ed53c52469599ac1bd93a3f (patch) | |
tree | 2aa6d45304f3160de3954f85907c1ea047ccfba4 /lib/Sema/SemaDecl.cpp | |
parent | 3a9a3e112ac02f8a261293cbe605db2e5d8732d3 (diff) |
Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.
The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index b45611ca59..53327e497e 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1765,14 +1765,12 @@ Sema::DeclTy *Sema::ActOnTag(Scope *S, unsigned TagType, TagKind TK, // We use 'dyn_cast' instead of 'cast' because PrevDecl might not // be a CXXRecordDecl* if we had a redefinition error. In this case, // the dyn_cast will return a NULL pointer. - New = CXXRecordDecl::Create(Context, Kind, CurContext, Loc, Name, - dyn_cast_or_null<CXXRecordDecl>(PrevDecl)); + New = CXXRecordDecl::Create(Context, Kind, CurContext, Loc, Name); else // We use 'dyn_cast' instead of 'cast' because PrevDecl might not // be a RecordDecl* if we had a redefinition error. In this case, // the dyn_cast will return a NULL pointer. - New = RecordDecl::Create(Context, Kind, CurContext, Loc, Name, - dyn_cast_or_null<RecordDecl>(PrevDecl)); + New = RecordDecl::Create(Context, Kind, CurContext, Loc, Name); } // If this has an identifier, add it to the scope stack. |