Skip to content
Prev Previous commit
Next Next commit
[cxxmodules] Report if the module was resolved but invisible.
  • Loading branch information
vgvassilev committed Nov 28, 2017
commit 721424ac7c85925e81235c638da1aa8fb9997c39
11 changes: 9 additions & 2 deletions core/metacling/src/TClingCallbacks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,15 @@ void TClingCallbacks::InclusionDirective(clang::SourceLocation sLoc/*HashLoc*/,
llvm::StringRef /*RelativePath*/,
const clang::Module * Imported) {
// We found a module. Do not try to do anything else.
if (Imported)
return;
if (Imported) {
Sema &SemaR = m_Interpreter->getSema();
// FIXME: We should make the module visible at that point.
if (!SemaR.isModuleVisible(Imported))
ROOT::TMetaUtils::Info("TClingCallbacks::InclusionDirective",
"Module %s resolved but not visible!", Imported->Name.c_str());
else
return;
}

// Method called via Callbacks->InclusionDirective()
// in Preprocessor::HandleIncludeDirective(), invoked whenever an
Expand Down