Handles expressions such as:
- std::is_const<T>()
- std::is_const<T>()();
- std::is_same(decltype(U()), V>::value;
Paths
| Differential D55552
[Sema] Better static assert diagnostics for expressions involving temporaries. ClosedPublic Authored by courbet on Dec 11 2018, 4:06 AM.
Details Summary Handles expressions such as:
Diff Detail
Event Timeline
courbet marked an inline comment as done. courbet added inline comments.
courbet marked 2 inline comments as done. Comment Actionsmove PrintQualifiedTypes to PrintingPolicy
courbet added inline comments. Comment Actions LGTM, but you should wait a few days before committing in case @Quuxplusone has comments. This revision is now accepted and ready to land.Dec 19 2018, 8:36 AM Comment Actions LGTM. Tiny style suggestions, which I won't mind if you ignore.
Comment Actions Thanks for the comments !
Closed by commit rL349729: [Sema] Better static assert diagnostics for expressions involving… (authored by courbet). · Explain WhyDec 20 2018, 1:08 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 178882 include/clang/AST/PrettyPrinter.h
include/clang/AST/Type.h
lib/AST/StmtPrinter.cpp
lib/AST/TypePrinter.cpp
lib/Sema/SemaTemplate.cpp
test/SemaCXX/static-assert-cxx17.cpp
test/SemaCXX/static-assert.cpp
|
Nit: could this function have been left in-line, and just changed split() to splitAccordingToPolicy(this, Policy)?
Even simpler, could splitAccordingToPolicy be made a member function of QualType, so that most of these diffs could be simply s/split()/splitAccordingToPolicy(Policy)/ without introducing any new temporary variables or anything? I.e.
But if that would make the code harder to read instead of easier, then don't mind me.