[all-commits] [llvm/llvm-project] 5b99aa: [ASTImporter] Fix 'isVirtual()' assert failure whi...
Ding Fei via All-commits
all-commits at lists.llvm.org
Tue Jul 18 01:34:29 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5b99aa57f74e1432691f366d26a2ec21907a7a70
https://github.com/llvm/llvm-project/commit/5b99aa57f74e1432691f366d26a2ec21907a7a70
Author: dingfei <fding at feysh.com>
Date: 2023-07-18 (Tue, 18 Jul 2023)
Changed paths:
M clang/lib/AST/ASTImporter.cpp
M clang/unittests/AST/ASTImporterTest.cpp
Log Message:
-----------
[ASTImporter] Fix 'isVirtual()' assert failure while import overridden methods
CXXMethodDecl::isVirtual() count the number of overridden methods.
This assertion is not true before overridden methods are fully loaded.
The body of this CXXMethodDecl can introduce deps on a derived class
which contains a method overriding this method, causing the assertion failure.
ImportOverriddenMethods() is moved before body loading to fix this issue.
Testcase is contributed by Balázs Kéri (balazske)
Differential Revision: https://reviews.llvm.org/D154701
More information about the All-commits
mailing list