This is an archive of the discontinued LLVM Phabricator instance.

Fix __uuidof handling on non-type template parameter in C++17
ClosedPublic

Authored by tzik on May 14 2018, 2:23 AM.

Details

Reviewers
rsmith
thakis
Summary

Clang used to pass the base lvalue of a non-type template parameter
to the template instantiation phase when the base part is __uuidof
and it's running in C++17 mode.
However, that drops its LValuePath, and unintentionally transforms
&__uuidof(...) to __uuidof(...).

This CL fixes that by passing whole expr. Fixes PR24986.

Diff Detail

Repository
rC Clang

Event Timeline

tzik created this revision.May 14 2018, 2:23 AM
tzik added a comment.May 15 2018, 11:52 PM

rsmith: Could you PTAL to this?

thakis accepted this revision.May 16 2018, 4:56 AM

lgtm, but:

test/SemaCXX/PR24986.cpp
12

Maybe this test could be in test/SemaCXX/ms-uuid.cpp instead?

This revision is now accepted and ready to land.May 16 2018, 4:56 AM
tzik updated this revision to Diff 147238.May 16 2018, 9:47 PM
tzik marked an inline comment as done.
tzik added inline comments.
test/SemaCXX/PR24986.cpp
12

OK, moved there.

thakis closed this revision.May 17 2018, 8:31 AM

r332614, thanks!