]> granicus.if.org Git - clang/commit
[c++20] P0515R3: Parsing support and basic AST construction for operator <=>.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 14 Dec 2017 15:16:18 +0000 (15:16 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 14 Dec 2017 15:16:18 +0000 (15:16 +0000)
commit96881be75c9092dabbb19ccae56e64af7ad29e90
treec9b12abbcccd5cf6d47b291289fbf7ba338cbdff
parentf19939b529be1bdd8adce0ff0e648ab3ae0faa6a
[c++20] P0515R3: Parsing support and basic AST construction for operator <=>.

Adding the new enumerator forced a bunch more changes into this patch than I
would have liked. The -Wtautological-compare warning was extended to properly
check the new comparison operator, clang-format needed updating because it uses
precedence levels as weights for determining where to break lines (and several
operators increased their precedence levels with this change), thread-safety
analysis needed changes to build its own IL properly for the new operator.

All "real" semantic checking for this operator has been deferred to a future
patch. For now, we use the relational comparison rules and arbitrarily give
the builtin form of the operator a return type of 'void'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320707 91177308-0d34-0410-b5e6-96231b3b80d8
33 files changed:
include/clang/AST/Expr.h
include/clang/AST/OperationKinds.def
include/clang/AST/RecursiveASTVisitor.h
include/clang/AST/StmtVisitor.h
include/clang/Analysis/Analyses/ThreadSafetyTIL.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/OperatorPrecedence.h
lib/AST/Expr.cpp
lib/AST/ExprConstant.cpp
lib/Analysis/ThreadSafetyCommon.cpp
lib/Analysis/ThreadSafetyTIL.cpp
lib/Basic/OperatorPrecedence.cpp
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CGStmtOpenMP.cpp
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cpp
lib/Parse/ParseExpr.cpp
lib/Sema/SemaChecking.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaOpenMP.cpp
lib/Sema/SemaStmt.cpp
lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
lib/StaticAnalyzer/Core/RangedConstraintManager.cpp
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
test/CodeGenCXX/cxx2a-three-way-comparison.cpp
test/Parser/cxx2a-spaceship.cpp [new file with mode: 0644]
test/SemaCXX/compare-cxx2a.cpp [new file with mode: 0644]
test/SemaCXX/constant-expression-cxx2a.cpp [new file with mode: 0644]
test/SemaTemplate/cxx1z-fold-expressions.cpp
unittests/Format/FormatTest.cpp