[PATCH] D148330: [clang] Do not crash on undefined template partial specialization

Mariya Podchishchaeva via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 14 06:21:37 PDT 2023


Fznamznon added inline comments.


================
Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:134
                                          "specifier in SFINAE context?");
             if (!hasReachableDefinition(PartialSpec))
               diagnoseMissingImport(SS.getLastQualifierNameLoc(), PartialSpec,
----------------
erichkeane wrote:
> I would expect 'hasReachableDefinition' to check boht reachable AND definition :) 
> 
> That said, I doubt the 'missing import' error is an appropriate one here.
> I would expect 'hasReachableDefinition' to check boht reachable AND definition :)

Well, it is implemented in a way that it actually expects definition to be present. In some other places where 'hasReachableDefinition' is called there is also a check that definition exists prior the call.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148330/new/

https://reviews.llvm.org/D148330



More information about the cfe-commits mailing list