[PATCH] D94067: [clang][ASTImporter] Fix a possible assertion failure `NeedsInjectedClassNameType(Decl)'.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 5 02:03:57 PST 2021


balazske added a comment.

Order of previous declarations may get confusable:
ClassTemplateDecl1 <-(Prev)- ClassTemplateDecl2 <-(Prev)- ClassTemplateDecl3

|  |  |  |
|

CXXRecorddDecl1 <--          CXXRecordDecl2 -----(Prev)-> CXXRecordDecl3 -

  |                                                      |
  --(Prev)------------------------------------------------

This is because record declarations are encountered in different order than the class templates.
And the import of template parameters is done in a incomplete state of the related record declaration.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94067/new/

https://reviews.llvm.org/D94067



More information about the cfe-commits mailing list