[llvm-branch-commits] [cfe-branch] r123633 - /cfe/branches/Apple/whitney/lib/Serialization/ASTReaderDecl.cpp

Daniel Dunbar daniel at zuster.org
Mon Jan 17 07:44:24 PST 2011


Author: ddunbar
Date: Mon Jan 17 09:44:24 2011
New Revision: 123633

URL: http://llvm.org/viewvc/llvm-project?rev=123633&view=rev
Log:
Merge r122756:
--
Author: Argyrios Kyrtzidis <akyrtzi at gmail.com>
Date:   Mon Jan 3 17:57:40 2011 +0000

    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.

Modified:
    cfe/branches/Apple/whitney/lib/Serialization/ASTReaderDecl.cpp

Modified: cfe/branches/Apple/whitney/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Serialization/ASTReaderDecl.cpp?rev=123633&r1=123632&r2=123633&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Serialization/ASTReaderDecl.cpp Mon Jan 17 09:44:24 2011
@@ -383,17 +383,17 @@
   // 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++];





More information about the llvm-branch-commits mailing list