This is an archive of the discontinued LLVM Phabricator instance.

Suggest missing 'template' for dependent member templates
Needs RevisionPublic

Authored by nikola on Dec 14 2015, 2:49 PM.

Details

Reviewers
rsmith
Summary

Current diagnostic says "expected expression" or "reference to non-static member function must be called". This should fix PR13566 and PR18995

Diff Detail

Event Timeline

nikola updated this revision to Diff 42781.Dec 14 2015, 2:49 PM
nikola retitled this revision from to Suggest missing 'template' for dependent member templates.
nikola updated this object.
nikola added a reviewer: rsmith.
nikola added a subscriber: cfe-commits.

Would anyone be kind enough to review this?

rsmith requested changes to this revision.Apr 15 2016, 3:04 PM
rsmith edited edge metadata.
rsmith added inline comments.
lib/Parse/ParseTemplate.cpp
1233–1240

This looks wrong: it will parse anything that could be a template argument list as a template argument list. In ambiguous cases, we must parse as a < operator.

test/SemaTemplate/dependent-template-recover.cpp
14–15

I think you will incorrectly treat

(*t).f2<0>(0);

... as a dependent template name. Instead, it's required to be parsed as

((*t.f2) < 0) > 0;
35

This diagnostic is incorrect.

This revision now requires changes to proceed.Apr 15 2016, 3:04 PM