[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 22 07:43:21 PST 2023


================
@@ -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


More information about the cfe-commits mailing list