[PATCH] D44670: [CXX] Templates specialization visibility can be wrong

Steven Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 18 10:30:56 PDT 2018


steven_wu added inline comments.


================
Comment at: lib/AST/Decl.cpp:1078
+    for (const auto *RD :
+         spec->getSpecializedTemplate()->getTemplatedDecl()->redecls()) {
+      auto Vis = getVisibilityOf(RD, kind);
----------------
doug.gregor wrote:
> Do we want to look at *all* redeclarations, or only those declarations that precede the declaration that we found? The latter seems more correct, but IIRC visibility has often been able to "look forward" to declarations that come later in the translation unit.
I agree the latter is more correct. Update the patch. 


Repository:
  rC Clang

https://reviews.llvm.org/D44670





More information about the cfe-commits mailing list