martong added a comment. > So the problem is that there are references to ParmVarDecl from inside > function body and at import of ParmVarDecl always a new one is created even > if there is an already existing (in the existing function prototype)?
Yes. During the import of the body we import a `DeclRefExpr` which refers to a `ParmVarDecl` but not the existing one, thus a new is created. > Maybe it works in VisitParmVarDecl to search for already existing ParmVarDecl > (not already imported) and return if found. Yes it would worth to try, indeed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56936/new/ https://reviews.llvm.org/D56936 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits