teak-llvm/clang/lib/AST/CMakeLists.txt
Eric Fiselier 0683c0e68d [C++2a] Implement operator<=> CodeGen and ExprConstant
Summary:
This patch tackles long hanging fruit for the builtin operator<=> expressions. It is currently needs some cleanup before landing, but I want to get some initial feedback.

The main changes are:

* Lookup, build, and store the required standard library types and expressions in `ASTContext`. By storing them in ASTContext we don't need to store (and duplicate) the required expressions in the BinaryOperator AST nodes. 

* Implement [expr.spaceship] checking, including diagnosing narrowing conversions. 

* Implement `ExprConstant` for builtin spaceship operators.

* Implement builitin operator<=> support in `CodeGenAgg`. Initially I emitted the required comparisons using `ScalarExprEmitter::VisitBinaryOperator`, but this caused the operand expressions to be emitted once for every required cmp.

* Implement [builtin.over] with modifications to support the intent of P0946R0. See the note on `BuiltinOperatorOverloadBuilder::addThreeWayArithmeticOverloads` for more information about the workaround.




Reviewers: rsmith, aaron.ballman, majnemer, rnk, compnerd, rjmccall

Reviewed By: rjmccall

Subscribers: rjmccall, rsmith, aaron.ballman, junbuml, mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D45476

llvm-svn: 331677
2018-05-07 21:07:10 +00:00

78 lines
1.3 KiB
CMake

set(LLVM_LINK_COMPONENTS
BinaryFormat
Support
)
add_clang_library(clangAST
APValue.cpp
ASTConsumer.cpp
ASTContext.cpp
ASTDiagnostic.cpp
ASTDumper.cpp
ASTImporter.cpp
ASTStructuralEquivalence.cpp
ASTTypeTraits.cpp
AttrImpl.cpp
CXXInheritance.cpp
Comment.cpp
CommentBriefParser.cpp
CommentCommandTraits.cpp
CommentLexer.cpp
CommentParser.cpp
CommentSema.cpp
ComparisonCategories.cpp
DataCollection.cpp
Decl.cpp
DeclarationName.cpp
DeclBase.cpp
DeclCXX.cpp
DeclFriend.cpp
DeclGroup.cpp
DeclObjC.cpp
DeclOpenMP.cpp
DeclPrinter.cpp
DeclTemplate.cpp
Expr.cpp
ExprClassification.cpp
ExprConstant.cpp
ExprCXX.cpp
ExprObjC.cpp
ExternalASTMerger.cpp
ExternalASTSource.cpp
InheritViz.cpp
ItaniumCXXABI.cpp
ItaniumMangle.cpp
Mangle.cpp
MicrosoftCXXABI.cpp
MicrosoftMangle.cpp
NestedNameSpecifier.cpp
NSAPI.cpp
ODRHash.cpp
OpenMPClause.cpp
ParentMap.cpp
QualTypeNames.cpp
RawCommentList.cpp
RecordLayout.cpp
RecordLayoutBuilder.cpp
SelectorLocationsKind.cpp
Stmt.cpp
StmtCXX.cpp
StmtIterator.cpp
StmtObjC.cpp
StmtOpenMP.cpp
StmtPrinter.cpp
StmtProfile.cpp
StmtViz.cpp
TemplateBase.cpp
TemplateName.cpp
Type.cpp
TypeLoc.cpp
TypePrinter.cpp
VTableBuilder.cpp
VTTBuilder.cpp
LINK_LIBS
clangBasic
clangLex
)