[PATCH] D74639: Add linkage check to ASTNodeImporter::hasSameVisibilityContext and rename to hasSameVisibilityContextAndLinkage

2020-02-20 Thread Shafik Yaghmour via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbf3f427ba239: [ASTImporter] Add linkage check to ASTNodeImporter::hasSameVisibilityContext… (authored by shafik). Herald added a project: clang. Changed prior to commit:

[PATCH] D74639: Add linkage check to ASTNodeImporter::hasSameVisibilityContext and rename to hasSameVisibilityContextAndLinkage

2020-02-17 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! Comment at: clang/lib/AST/ASTImporter.cpp:989 !Found->hasExternalFormalLinkage(); } balazske wrote: > This would be equivalent but

[PATCH] D74639: Add linkage check to ASTNodeImporter::hasSameVisibilityContext and rename to hasSameVisibilityContextAndLinkage

2020-02-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:989 !Found->hasExternalFormalLinkage(); } This would be equivalent but more clear code (formatting is probably not correct here): ``` if (Found->getLinkageInternal() !=

[PATCH] D74639: Add linkage check to ASTNodeImporter::hasSameVisibilityContext and rename to hasSameVisibilityContextAndLinkage

2020-02-14 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. I would love to have a minimal test case for this but every approach I tried has failed, so I would appreciate if there are ideas here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74639/new/ https://reviews.llvm.org/D74639

[PATCH] D74639: Add linkage check to ASTNodeImporter::hasSameVisibilityContext and rename to hasSameVisibilityContextAndLinkage

2020-02-14 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: martong, teemperor, balazske, a_sidorin. Herald added a subscriber: rnkovacs. This fixed is based on the assert in `LinkageComputer::getLVForDecl(…)` which assumes that all the decls in a redecl chain have the same linkage. This change was