[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 21 01:19:03 PDT 2018


EricWF updated this revision to Diff 143433.
EricWF added a comment.
Herald added a subscriber: mgorny.

- Better integrate defaulted comparison with other special members; this buys correct access, constexpr, and except specification checking.

However it's not clear if this is the best approach. Lookups for defaulted comparison can't be cached like other special members, because the lookup can change after the class definition. It is clear, however, that using the existing machinery would be too expensive if not for cached lookup results, because the checks for constexpr, deletion, and noexcept all depend on the results for lookup being cached.


https://reviews.llvm.org/D45680

Files:
  include/clang/AST/ASTContext.h
  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/ASTContext.cpp
  lib/AST/CMakeLists.txt
  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/CGExprAgg.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/Inputs/std-compare.h
  test/CodeGenCXX/cxx2a-compare.cpp
  test/PCH/Inputs/std-compare.h
  test/PCH/cxx2a-compare.cpp
  test/SemaCXX/Inputs/std-compare.h
  test/SemaCXX/compare-cxx2a.cpp
  test/SemaCXX/constant-expression-cxx2a.cpp
  test/SemaCXX/std-compare-cxx2a.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45680.143433.patch
Type: text/x-patch
Size: 340746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180421/f74ca9f7/attachment-0001.bin>


More information about the cfe-commits mailing list