diff options
| author | Ted Kremenek <kremenek@apple.com> | 2007-11-16 18:11:10 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2007-11-16 18:11:10 +0000 |
| commit | 50d7f6f620e5805d1453888b2240a44861d4076a (patch) | |
| tree | 8f76439f6e050e7f299227985f225fbf5b51f92b /clang/AST/DeclSerialization.cpp | |
| parent | 48d52848d75fc5a2c174156d6d38a247723854a5 (diff) | |
| download | bcm5719-llvm-50d7f6f620e5805d1453888b2240a44861d4076a.tar.gz bcm5719-llvm-50d7f6f620e5805d1453888b2240a44861d4076a.zip | |
Fixed bug in the serialization of FunctionDecls. We would incorrectly
query for the number of parameters for FunctionDecls that had type
FunctionTypeNoProto.
llvm-svn: 44191
Diffstat (limited to 'clang/AST/DeclSerialization.cpp')
| -rw-r--r-- | clang/AST/DeclSerialization.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/AST/DeclSerialization.cpp b/clang/AST/DeclSerialization.cpp index 4f80ca1bb4a..16654bbe665 100644 --- a/clang/AST/DeclSerialization.cpp +++ b/clang/AST/DeclSerialization.cpp @@ -335,14 +335,14 @@ FunctionDecl* FunctionDecl::CreateImpl(Deserializer& D) { decl->ValueDecl::ReadInRec(D); D.ReadPtr(decl->DeclChain); - - decl->ParamInfo = decl->getNumParams() - ? new ParmVarDecl*[decl->getNumParams()] - : NULL; - + Decl* next_declarator; bool hasParamDecls = D.ReadBool(); + + decl->ParamInfo = hasParamDecls + ? new ParmVarDecl*[decl->getNumParams()] + : NULL; if (hasParamDecls) D.BatchReadOwnedPtrs(decl->getNumParams(), |

