daltenty accepted this revision. daltenty added a comment. This revision is now accepted and ready to land.
LGTM. Doing the inner computation while observing visibility seems like the right thing to do in this case. ================ Comment at: clang/lib/AST/Decl.cpp:1355 + !Context.getLangOpts().VisibilityInlinesHiddenStaticLocalVar; + LVComputationKind nestedComputation = + mayBeVisible ---------------- Just adding my own note of explanation, since this stuff can be a little hard to follow. This inner linkage query needs to observe visibility in order to get a consistent result, even if the calling query (i.e. `getLinkageInternal` in this case) has passed in a LVComputationKind indicating we don't need to for the LocalDecl. If we don't, we may get results inconsistent with the cached value for the enclosing FunctionDecl, hence the assert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128223/new/ https://reviews.llvm.org/D128223 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits