[all-commits] [llvm/llvm-project] c5d83c: [clang][ASTImporter] Fix a bug when importing CXXD...

Balázs Kéri via All-commits all-commits at lists.llvm.org
Mon Mar 28 01:55:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c5d83cdca457fd024a3f76c5e2ba649462ecde67
      https://github.com/llvm/llvm-project/commit/c5d83cdca457fd024a3f76c5e2ba649462ecde67
  Author: Balázs Kéri <1.int32 at gmail.com>
  Date:   2022-03-28 (Mon, 28 Mar 2022)

  Changed paths:
    M clang/lib/AST/ASTImporter.cpp
    A clang/test/Analysis/Inputs/ctu-cxxdefaultinitexpr-import.cpp
    A clang/test/Analysis/Inputs/ctu-cxxdefaultinitexpr-import.cpp.externalDefMap.ast-dump.txt
    A clang/test/Analysis/ctu-cxxdefaultinitexpr.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  [clang][ASTImporter] Fix a bug when importing CXXDefaultInitExpr.

The "in-class initializer" expression should be set in the field of a
default initialization expression before this expression node is created.
The `CXXDefaultInitExpr` objects are created after the AST is loaded and
at import not present in the "To" AST. And the in-class initializers of
the used fields can be missing too, these must be set at import.

This fixes a github issue #54061.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D120824




More information about the All-commits mailing list