[PATCH] D136886: [clang] [ASTImporter] RFC: Correct importer to not duplicate sugared types

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 28 09:12:03 PDT 2022


balazske added a comment.

`ASTImporterLookupTable` do not contain an entry for `__va_list_tag`, I do not know why it is missing. If it is added "manually" the crash disappears. Following code was used to add VaListTagDecl:

  ASTImporterLookupTable::ASTImporterLookupTable(TranslationUnitDecl &TU) {
    Builder B(*this);
    B.TraverseDecl(&TU);
    // Add __va_list_tag to the table, it is not visited by the builder.
    if (NamedDecl *D = dyn_cast_or_null<NamedDecl>(TU.getASTContext().getVaListTagDecl()))
      add(&TU, D);
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136886



More information about the cfe-commits mailing list