Add error message in case the decl is not a class or does not have definition

git-svn-id: http://root.cern.ch/svn/root/trunk@47870 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
Philippe Canal
2012-12-06 05:15:07 +00:00
parent 498f1d913b
commit 6bc1db9883

View File

@ -531,7 +531,12 @@ void ClassPrinter::DisplayClass(const std::string& className)const
if (const CXXRecordDecl* const classDecl = dyn_cast<CXXRecordDecl>(decl)) {
if (classDecl->hasDefinition())
DisplayClassDecl(classDecl);
}
else
fOut.Print(("The class " + className +
" does not have any definition available\n").c_str());
} else
fOut.Print(("A " + std::string(decl->getDeclKindName()) + " declaration"
" was found for " + className + "\n").c_str());
} else
fOut.Print(("Class " + className + " not found\n").c_str());
}