This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Add a comment on an identified bug on default arguments.
ClosedPublic

Authored by timshen on Aug 2 2017, 5:03 PM.

Details

Summary

The mis-compile is triggered by internal code, but I haven't reduced it to a small piece of code. Add a FIXME here, since a decent fix doesn't seem to be trivial.

The decent fix can be changing Decl::Init to PointerUnion<Stmt *, EvaluatedStmt *, ParamVarDecl *>, and make setUninstantiatedDefaultArg take a ParamVarDecl *, which contains the Expr * as the default argument. This way, getTemplateInstantiationArgs can take that ParamVarDecl and do the right thing.

Diff Detail

Repository
rL LLVM

Event Timeline

timshen created this revision.Aug 2 2017, 5:03 PM
rsmith accepted this revision.Aug 2 2017, 5:10 PM
This revision is now accepted and ready to land.Aug 2 2017, 5:10 PM
This revision was automatically updated to reflect the committed changes.