Skip to content
Merged
Prev Previous commit
Next Next commit
In UpdateClassInfoWithDecl, ignore incomplete definition.
  • Loading branch information
pcanal committed Sep 6, 2019
commit 59ddae9df0a16245b4003db95146d076f3e82c7e
3 changes: 2 additions & 1 deletion core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6523,7 +6523,8 @@ void TCling::UpdateClassInfoWithDecl(const NamedDecl* ND)
td = tdDef;
ND = td;

if (llvm::isa<clang::FunctionDecl>(td->getDeclContext())) {
if (!td->isCompleteDefinition() || llvm::isa<clang::FunctionDecl>(td->getDeclContext())) {
// Ignore incomplete definition.
// Ignore declaration within a function.
return;
}
Expand Down