================ @@ -756,6 +756,14 @@ void CompilerInstance::createSema(TranslationUnitKind TUKind, TheSema->addExternalSource(ExternalSemaSrc.get()); ExternalSemaSrc->InitializeSema(*TheSema); } + + // If we're building a module and are supposed to load API notes, + // notify the API notes manager. + if (auto currentModule = getPreprocessor().getCurrentModule()) { ---------------- compnerd wrote:
Does `getCurrentModule()` return a pointer? The type is not clear, and this might be a copy. I think that explicitly spelling out the type would be helpful. https://github.com/llvm/llvm-project/pull/73120 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits