[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-14 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc50959431928: [ASTImporter] Import default expression of param before creating the param. (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 214531. balazske added a comment. Rename of variables and reformat. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65577/new/ https://reviews.llvm.org/D65577 Files: clang/include/clang/AST/ASTImporter.h

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/Inputs/ctu-other.cpp:135 + +struct DefParmContext { + static const int I; balazske wrote: > martong wrote: > > shafik wrote: > > > martong wrote: > > > > Perhaps we could write `Default` instead of

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Yes importing the parameters should be doable after the create of the function. I am not sure if it fixes this problem, the parameter that has the default expression can still be encountered without the default expression set in it. Repository: rG LLVM Github

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-08 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/test/Analysis/Inputs/ctu-other.cpp:135 + +struct DefParmContext { + static const int I; martong wrote: > shafik wrote: > > martong wrote: > > > Perhaps we could write

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-08 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Would it be an alternative solution if we imported the function parameters after we created the FunctionDecl? I guess it would be. Maybe that would result in a smaller change, what do you think? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-06 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. Still looks good to me, other than some style nits. Comment at: clang/lib/AST/ASTImporter.cpp:3829 +Error ASTNodeImporter::ImportDefaultArgOfParmVarDecl(const ParmVarDecl *FromParam, ParmVarDecl *ToParam) { +

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 213563. balazske added a comment. Small but important fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65577/new/ https://reviews.llvm.org/D65577 Files: clang/include/clang/AST/ASTImporter.h

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 213551. balazske added a comment. A new kind of solution, the previous does not work always. Still no test for this new problem case (circular dependency between a ParmVarDecl and function of it and a CXXDefaultArgExpr that references to the function

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3859 ToTypeSourceInfo, D->getStorageClass(), /*DefaultArg*/ nullptr)) return ToParm;

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-01 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3859 ToTypeSourceInfo, D->getStorageClass(), /*DefaultArg*/ nullptr)) return ToParm; This should be `DefaultArg` now?

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-01 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM, though I have some comments. Comment at: clang/test/Analysis/Inputs/ctu-other.cpp:135 + +struct DefParmContext { + static const int I; Perhaps we

[PATCH] D65577: [ASTImporter] Import default expression of param before creating the param.

2019-08-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. The default expression of a parameter variable should be