================
@@ -15532,6 +15532,12 @@ static void processForLoadTimeCommentVar(Sema &S, 
VarDecl *VD) {
     Reason = diag::LoadTimeCommentVarReason::TemplateSpecialization;
   else if (VD->isStaticDataMember())
     Reason = diag::LoadTimeCommentVarReason::StaticDataMember;
+  else if (VD->isInline())
+    // An inline variable is defined in every translation unit that sees it,
+    // and a module importer re-emits it using the decision made when the
+    // module was built, so the result would depend on option consistency
+    // across compilations.
----------------
hubert-reinterpretcast wrote:

The more important point is that, regardless of modules, an `inline` variable 
does not have a strong relationship to any particular translation unit. This 
weak binding is especially noticeable in the context of header units.

https://github.com/llvm/llvm-project/pull/187986
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to