diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-03 17:57:40 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-03 17:57:40 +0000 |
commit | 20df8e7bfeea219713ac4af85442d200b0d8a69c (patch) | |
tree | f1099452994bbc68c632fcbba912ffd6c25fbf60 /lib/Serialization/ASTReaderDecl.cpp | |
parent | 3a1a8749cf6239f29e834f18a4e08638126678d9 (diff) |
In the latest episode of "Deserializing bugs caused by accessors" the series reached a thrilling climax when
FunctionDecl::setPure crashed a poor user's code.
Remove the use of this accessor when deserializing, along with several other in the neighborhood. Fixes rdar://8759653.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index f2183ea695..40f3ab7e1b 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -385,17 +385,17 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) { // after everything else is read. FD->SClass = (StorageClass)Record[Idx++]; - FD->setStorageClassAsWritten((StorageClass)Record[Idx++]); + FD->SClassAsWritten = (StorageClass)Record[Idx++]; FD->IsInline = Record[Idx++]; FD->IsInlineSpecified = Record[Idx++]; - FD->setVirtualAsWritten(Record[Idx++]); - FD->setPure(Record[Idx++]); - FD->setHasInheritedPrototype(Record[Idx++]); - FD->setHasWrittenPrototype(Record[Idx++]); - FD->setDeleted(Record[Idx++]); - FD->setTrivial(Record[Idx++]); - FD->setHasImplicitReturnZero(Record[Idx++]); - FD->setLocEnd(ReadSourceLocation(Record, Idx)); + FD->IsVirtualAsWritten = Record[Idx++]; + FD->IsPure = Record[Idx++]; + FD->HasInheritedPrototype = Record[Idx++]; + FD->HasWrittenPrototype = Record[Idx++]; + FD->IsDeleted = Record[Idx++]; + FD->IsTrivial = Record[Idx++]; + FD->HasImplicitReturnZero = Record[Idx++]; + FD->EndRangeLoc = ReadSourceLocation(Record, Idx); // Read in the parameters. unsigned NumParams = Record[Idx++]; |