[all-commits] [llvm/llvm-project] ab80d0: [clang][ASTImporter] fix variable inline of CXX17 ...

Qizhi Hu via All-commits all-commits at lists.llvm.org
Thu Apr 4 17:41:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab80d00438a04248f9a2f62546ea34c294d08f01
      https://github.com/llvm/llvm-project/commit/ab80d00438a04248f9a2f62546ea34c294d08f01
  Author: Qizhi Hu <836744285 at qq.com>
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
    M clang/lib/AST/ASTImporter.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  [clang][ASTImporter] fix variable inline of CXX17 (#87314)

Fix crash in the testcase from
https://github.com/llvm/llvm-project/issues/75114#issuecomment-1872595956
Forget to set inline of variable declaration would make
`isThisDeclarationADefinition` get incorrect result and didn't get
imported variable. This will lead to a new `VarTemplateDecl` being
created and call `setDescribedVarTemplate` again which produces the
crash.

Co-authored-by: huqizhi <836744285 at qq.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list