[PATCH] D132831: [clang][Interp] Handle SubstNonTypeTemplateParmExprs

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 00:39:20 PDT 2022


tbaeder marked 3 inline comments as done.
tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:273
+    const SubstNonTypeTemplateParmExpr *E) {
+  return this->visit(E->getReplacement());
+}
----------------
tbaeder wrote:
> tahonermann wrote:
> > erichkeane wrote:
> > > tbaeder wrote:
> > > > erichkeane wrote:
> > > > > Is there nothing special that has to happen when these are reference parameters?  Can you at least add a test for that?
> > > > Umm, I don't really do references yet (I haven't tested them at all and I don't think they are implemented).
> > > Hmm... that is unfortunate.  We really should be doing references ASAP, as they are going to be a pretty critical/oft-needed during testing kinda thing.  I'd at least want a commented-out test that you can re-enable ASAP.
> > Are not-yet-implemented features consistently implemented such that constant evaluation will fail with a (possibly unhelpful) diagnostic? As in https://godbolt.org/z/8vvdca9Ma? If so, can tests be added ahead of time with annotations for expected errors (essentially false positives to be addressed later)?
> Some are always (like unhandled AST node), some are not.
An example for this with a reference type is in https://reviews.llvm.org/D132997


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132831



More information about the cfe-commits mailing list