[PATCH] D69950: Reapply "Fix crash on switch conditions of non-integer types in templates"
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 13 00:32:25 PST 2020
smeenai added a comment.
Similar to the case @mstorsjo mentioned, this also causes the following code to fail now:
struct S {
unsigned size;
};
template <class T>
struct U {
S s;
unsigned size() { return s.size(); }
};
This is obviously invalid, and I personally prefer getting the error early instead of having to wait for the instantiation, but it is different from gcc and MSVC: https://godbolt.org/z/yoDDjS. I think the earlier diagnosis should be okay from a conformance point of view though (but I'm far from being well-versed with that).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69950/new/
https://reviews.llvm.org/D69950
More information about the cfe-commits
mailing list