[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] LangOptions of ASTUnit::LoadFromPCHFile() goes out	of
From:       Argyrios Kyrtzidis <kyrtzidis () apple ! com>
Date:       2009-07-22 23:16:28
Message-ID: 3F7FB09B-7884-46DB-8909-4AA9F3053698 () apple ! com
[Download RAW message or body]

On Jul 21, 2009, at 12:02 AM, Argyrios Kyrtzidis wrote:

> On Jul 20, 2009, at 11:24 PM, Zhongxing Xu wrote:
>
>> The LangOptions LangInfo is a local variable of
>> ASTUnit::LoadFromPCHFile(). When it goes out of scope, it is still
>> referenced by the preprocessor (ASTUnit.cpp:126). I think the
>> preprocessor should refer to the LangOptions of ASTContext, which  
>> owns
>> one copy of LangOptions.
>
> Good catch!
>
> But a related question is why does the Preprocessor keep a reference
> instead of a copy ?
> Seems unintuitive; should we change Preprocessor to keep a copy like
> ASTContext ?

Changed Preprocessor to keep a copy of LangOptions.

Thanks for reporting the issue Zhongxing.

-Argiris
_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic