[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

Mikhail Ramalho via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 24 12:27:22 PDT 2018


>
> Why wasn't there a file for function parameter? Function parameters *are*
> declared in some file, or am I missing something?
>
>
They are declared in some file defined by the line markers; the file are
not registered in the SourceManager as actual files, so getting the
FileEntry will always fail, that's why I changed it to get the PresumedLoc.

More general question is: how do we want USRs for function parameters to
> work, specifically should USR of the same param of different declarations
> be the same or different?
>

That's a good point, this patch will generated different names for the same
function param if a function is first defined then declared somewhere else.

I guess it should follow the USR generation pattern for FunctionDecls, what
do you think?

-- 

Mikhail Ramalho.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180424/d82a0949/attachment.html>


More information about the cfe-commits mailing list