[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 13:32:34 PDT 2022


mizvekov added inline comments.


================
Comment at: clang/lib/Sema/SemaConcept.cpp:513-534
+  llvm::Optional<MultiLevelTemplateArgumentList> MLTAL =
+      SetupConstraintCheckingTemplateArgumentsAndScope(
+          const_cast<FunctionDecl *>(FD), {}, Scope);
+
   Qualifiers ThisQuals;
   CXXRecordDecl *Record = nullptr;
   if (auto *Method = dyn_cast<CXXMethodDecl>(FD)) {
----------------
Unchecked access to MLTAL (Optional).

Following reduction reproduces a crash here: `-cc1 -std=c++20 -fsyntax-only -ferror-limit 19`.
```
template a b < ;
template c e ag < ;
ah) ;
am = ;
template <class... ap> class aq {
  aq(ap...; __attribute__) auto aj() requires(am)
}
f() {                  [;                  aq d;                  d.aj
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126907



More information about the cfe-commits mailing list