[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 21 07:27:42 PDT 2022


erichkeane 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)) {
----------------
erichkeane wrote:
> erichkeane wrote:
> > mizvekov wrote:
> > > mizvekov wrote:
> > > > 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
> > > > ```
> > > By the way, disregard that repro, it needs another patch that is not in master.
> > > 
> > > The unchecked access still does look suspicious though.
> > Thanks for the comment!  I'll look into it.
> Huh... that must be leftover from some other attempt I made at that, the MLTAL is always set.  I'll do an NFC patch to remove it, but thanks for looking!
Woops... nvm... you're right, in an error condition we can get an errored one.  I'll add a check.  Thanks again!


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