[cfe-commits] r122756 - /cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
Douglas Gregor
dgregor at apple.com
Mon Jan 3 10:53:23 PST 2011
On Jan 3, 2011, at 10:50 AM, Argyrios Kyrtzidis wrote:
> On Jan 3, 2011, at 10:17 AM, Douglas Gregor wrote:
>
>>
>> On Jan 3, 2011, at 9:57 AM, Argyrios Kyrtzidis wrote:
>>
>>> Author: akirtzidis
>>> Date: Mon Jan 3 11:57:40 2011
>>> New Revision: 122756
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=122756&view=rev
>>> Log:
>>> 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.
>>
>> Can the mutators die, too?
>
> setPure is needed to call CXXRecordDecl::markedVirtualFunctionPure and update the CXXRecord's DefinitionData.
> Could we have some other scheme for the DefinitionData info without mutating CXXRecord ?
I can't think of any other scheme that isn't the moral equivalent of mutating CXXRecord. We want to maintain this bit in DefinitionData.
I'd like to get the ASTs to a world where the only mutators left are those that are actually required either by the language (e.g., adding something to a DeclContext) or for performance reasons (e.g., caching the "is this class abstract?" bit).
- Doug
More information about the cfe-commits
mailing list