[cfe-dev] [PATCH] Function redeclaration and PR2360
Ted Kremenek
kremenek at apple.com
Tue May 27 09:33:47 PDT 2008
That sounds fine to me. We will still need a global map when doing
things like inter-procedural analysis or analysis across translation
units, but having all DeclRefExprs refer to the first FunctionDecl
seems like a nice simplification. I agree with Doug's email that
clients interested in source information can just walk the chain of
Decls.
On May 27, 2008, at 9:17 AM, Argiris Kirtzidis wrote:
> Do you guys disagree with the suggestion here ? : http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html
> I was going to implement that one. The result will be that
> DeclRefExprs that refer to the same function will always refer to
> the same FunctionDecl as well.
>
>
> -Argiris
>
>
> Ted Kremenek wrote:
>>
>> On May 27, 2008, at 8:55 AM, Eli Friedman wrote:
>>
>>> On Tue, May 27, 2008 at 8:44 AM, Ted Kremenek <kremenek at apple.com>
>>> wrote:
>>>> One caveat: if a client inspects two separate DeclRefExprs, each
>>>> one
>>>> referring to a different FunctionDecl for the same function, is
>>>> there a
>>>> good, standard way to compare if they refer to the same function?
>>>
>>> I think we'd need some sort of map for global names to implement
>>> this;
>>> two completely unrelated FunctionDecls can refer to the same
>>> function
>>> if they're in disjoint scopes.
>>>
>>> -Eli
>>
>> Yes, that makes sense.
>>
More information about the cfe-dev
mailing list