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

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 14 15:46:11 PDT 2023


shafik added inline comments.


================
Comment at: clang/lib/Sema/SemaCXXScopeSpec.cpp:134
                                          "specifier in SFINAE context?");
-            if (!hasReachableDefinition(PartialSpec))
+            if (PartialSpec->hasDefinition() &&
+                !hasReachableDefinition(PartialSpec))
----------------
So I see in another location we are basically checking `!isBeginDefined()` and in another place `hasCompleteDefinition()`. It is not clear to me if these are all basically checking the same thing or if we should figure out what is the right thing to check and do that everywhere. 


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