summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-02 11:55:32 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-02 11:55:32 +0000
commit2c2167ac3d3154c740289d41e7a4c5709df931ce (patch)
treeebd5b3f660c823cc77c66e62b5b086fb877035cf /clang/lib/AST/ASTContext.cpp
parente929095f4ad199818b649bd301b41564c1a03521 (diff)
downloadbcm5719-llvm-2c2167ac3d3154c740289d41e7a4c5709df931ce.tar.gz
bcm5719-llvm-2c2167ac3d3154c740289d41e7a4c5709df931ce.zip
Fully read/write CXXRecordDecl for PCH.
llvm-svn: 107475
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 604cf2b5cfd..ca83964b3ec 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1741,8 +1741,7 @@ QualType ASTContext::getInjectedClassNameType(CXXRecordDecl *Decl,
assert(NeedsInjectedClassNameType(Decl));
if (Decl->TypeForDecl) {
assert(isa<InjectedClassNameType>(Decl->TypeForDecl));
- } else if (CXXRecordDecl *PrevDecl
- = cast_or_null<CXXRecordDecl>(Decl->getPreviousDeclaration())) {
+ } else if (CXXRecordDecl *PrevDecl = Decl->getPreviousDeclaration()) {
assert(PrevDecl->TypeForDecl && "previous declaration has no type");
Decl->TypeForDecl = PrevDecl->TypeForDecl;
assert(isa<InjectedClassNameType>(Decl->TypeForDecl));
OpenPOWER on IntegriCloud