Add protection in case no file is associated to the decl
This commit is contained in:
parent
76d6fff7c9
commit
4dd0bb94ea
@ -150,6 +150,7 @@ namespace cling {
|
||||
}
|
||||
|
||||
void ForwardDeclPrinter::prettyPrintAttributes(Decl *D, std::string extra) {
|
||||
|
||||
if (D->getSourceRange().isInvalid())
|
||||
return;
|
||||
|
||||
@ -178,6 +179,9 @@ namespace cling {
|
||||
PLoc = m_SMgr.getPresumedLoc(PLoc.getIncludeLoc());
|
||||
}
|
||||
|
||||
if (PLocs.empty() /* declared in dictionary payload*/)
|
||||
return;
|
||||
|
||||
clang::SourceLocation includeLoc = m_SMgr.getSpellingLoc(PLocs[PLocs.size() - 1].getIncludeLoc());
|
||||
bool invalid = true;
|
||||
const char* includeText = m_SMgr.getCharacterData(includeLoc, &invalid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user