[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 19 20:30:59 PDT 2018
EricWF updated this revision to Diff 143224.
EricWF added a comment.
Updating this with the latest work. This adds the semantics for checking and generating default comparison operators.
The overload resolution bits are still a mess, and I'll clean those up shortly. Also there are not sufficient tests yet, those will also come shortly.
I also need to go through the wording for defaulted functions again, to ensure the `constexpr` and `noexcept` deduction is correct, as well
as the diagnostics for deleted comparisons.
One oddity introduced here is that defaulted comparisons are evaluated using the "Special Member" matchinary, even though they're
not technically special members, or even members. However, it seemed like the appropriate place to implement them. I'll probably rename
most `FooSpecialMember` functions to `FooDefaultedMember` to clear up any confusion.
https://reviews.llvm.org/D45680
Files:
include/clang/AST/ComparisonCategories.h
include/clang/AST/Decl.h
include/clang/AST/ExprCXX.h
include/clang/AST/RecursiveASTVisitor.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/StmtNodes.td
include/clang/Sema/Overload.h
include/clang/Sema/Sema.h
include/clang/Serialization/ASTBitCodes.h
lib/AST/ComparisonCategories.cpp
lib/AST/Decl.cpp
lib/AST/Expr.cpp
lib/AST/ExprClassification.cpp
lib/AST/ExprConstant.cpp
lib/AST/ItaniumMangle.cpp
lib/AST/StmtPrinter.cpp
lib/AST/StmtProfile.cpp
lib/CodeGen/CGExprScalar.cpp
lib/Sema/SemaCUDA.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExceptionSpec.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaLookup.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Sema/TreeTransform.h
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
test/CodeGenCXX/cxx2a-compare.cpp
test/SemaCXX/compare-cxx2a.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45680.143224.patch
Type: text/x-patch
Size: 147590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180420/1df8d3c8/attachment-0001.bin>
More information about the cfe-commits
mailing list