[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-12-17 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349349: [ASTImporter] Fix redecl chain of classes and class templates (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D53655?vs=175641=178450#toc Repository:

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-12-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @rsmith Please raise any objections until Dec 14 (or if this deadline is too strict). I'd like to commit this next week latest so it can get in still this year. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53655/new/

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-12-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @rsmith ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53655/new/ https://reviews.llvm.org/D53655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @aaron.ballman Thanks for your review. I have updated the patch to remove `containsInVector`. > This seems mostly reasonable to me, but @rsmith is more well-versed in this > area and may have further comments. You should give him a few days to chime > in before

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 175641. martong marked 2 inline comments as done. martong added a comment. - Remove containsInVector Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53655/new/ https://reviews.llvm.org/D53655 Files:

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-28 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 4 inline comments as done. martong added inline comments. Comment at: include/clang/AST/DeclContextInternals.h:125-129 + bool containsInVector(const NamedDecl *D) { +assert(getAsVector() && "Must have a vector at this point"); +DeclsTy = *getAsVector();

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This seems mostly reasonable to me, but @rsmith is more well-versed in this area and may have further comments. You should give him a few days to chime in before committing. Comment at:

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-27 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 175482. martong marked 5 inline comments as done. martong added a comment. - Address several minor review comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53655/new/ https://reviews.llvm.org/D53655 Files:

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-27 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 20 inline comments as done. martong added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:1169 +/// matches 'a'. +extern const internal::VariadicDynCastAllOfMatcher +indirectFieldDecl; aaron.ballman wrote: > Be sure to

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/DeclContextInternals.h:128 +DeclsTy = *getAsVector(); +DeclsTy::iterator I = std::find(Vec.begin(), Vec.end(), D); +return I != Vec.end(); a_sidorin wrote: > `auto I =

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-25 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added subscribers: aaron.ballman, rsmith. a_sidorin added a comment. Please note that changes in AST lib will require AST code owners' approval. @rsmith, @aaron.ballman could you please take a look? Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-25 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, The change looks mostly Ok but there are some comments inline. Comment at: include/clang/AST/DeclContextInternals.h:128 +DeclsTy = *getAsVector(); +DeclsTy::iterator I = std::find(Vec.begin(), Vec.end(), D); +return I !=

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. This will break LLDB, unless https://reviews.llvm.org/D54863 is applied. @shafik Could you please take a look on https://reviews.llvm.org/D54863 ? Repository: rC Clang https://reviews.llvm.org/D53655 ___ cfe-commits

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-23 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 175127. martong added a comment. - Use MostRecentDecl when setting PrevDecl Repository: rC Clang https://reviews.llvm.org/D53655 Files: include/clang/AST/DeclContextInternals.h include/clang/ASTMatchers/ASTMatchers.h lib/AST/ASTImporter.cpp

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske accepted this revision. balazske added a comment. This revision is now accepted and ready to land. Do not forget that there is a fix the to use getMostRecentDecl in ASTImporter.cpp line 2666 here. Repository: rC Clang https://reviews.llvm.org/D53655

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > I see that now everything is reverted, the "good" things too (change to > indirectFieldDecl and a line split)? Yes, you are completely right, sorry for this mess. I just have updated so the good things remain. Repository: rC Clang https://reviews.llvm.org/D53655

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-23 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 175091. martong marked an inline comment as done. martong added a comment. - Keep the good changes and use the name 'containsInVector' Repository: rC Clang https://reviews.llvm.org/D53655 Files: include/clang/AST/DeclContextInternals.h

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I see that now everything is reverted, the "good" things too (change to indirectFieldDecl and a line split)? Repository: rC Clang https://reviews.llvm.org/D53655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-22 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added inline comments. Comment at: lib/AST/DeclBase.cpp:1469 assert(Pos != Map->end() && "no lookup entry for decl"); -if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND) +// Remove the decl

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-22 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 175058. martong added a comment. - Revert "Minor style changes and rename a function" Repository: rC Clang https://reviews.llvm.org/D53655 Files: include/clang/AST/DeclContextInternals.h include/clang/ASTMatchers/ASTMatchers.h

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-22 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/AST/DeclBase.cpp:1469 assert(Pos != Map->end() && "no lookup entry for decl"); -if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND) +// Remove the decl only if it is contained. +if

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/DeclBase.cpp:1469 assert(Pos != Map->end() && "no lookup entry for decl"); -if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND) +// Remove the decl only if it is contained. +if

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-21 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 174893. martong marked 4 inline comments as done. martong added a comment. Herald added a reviewer: shafik. Herald added a subscriber: gamesh411. - Minor style changes and rename a function Repository: rC Clang https://reviews.llvm.org/D53655 Files:

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-11-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/DeclBase.cpp:1469 assert(Pos != Map->end() && "no lookup entry for decl"); -if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND) +// Remove the decl only if it is contained. +if

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:5054 +if (!ToTemplated->getPreviousDecl()) { + auto *PrevTemplated = FoundByLookup->getTemplatedDecl()->getMostRecentDecl(); + if (ToTemplated != PrevTemplated) This is a long

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-10-24 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I can't add anything meaningful to the conversation, but I spotted some nits, so here they are. Comment at: include/clang/ASTMatchers/ASTMatchers.h:1150 +/// \endcode +/// fieldDecl() +/// matches 'a'. Did you mean to write

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-10-24 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, balazske. Herald added subscribers: cfe-commits, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a reviewer: a.sidorin. The crux of the issue that is being fixed is that lookup could not find previous