diff options
author | Saar Raz <saar@raz.email> | 2019-10-15 11:48:58 +0000 |
---|---|---|
committer | Saar Raz <saar@raz.email> | 2019-10-15 11:48:58 +0000 |
commit | ec87b003823d63f3342cf648f55a134c1522e612 (patch) | |
tree | 1eaead2c265468357031c24d3778ff48ede93283 /clang/lib/AST/StmtPrinter.cpp | |
parent | 1ae2d9a2bdce054560104f428e92eaef736e5c7f (diff) | |
download | bcm5719-llvm-ec87b003823d63f3342cf648f55a134c1522e612.tar.gz bcm5719-llvm-ec87b003823d63f3342cf648f55a134c1522e612.zip |
[Concepts] Concept Specialization Expressions
Part of C++20 Concepts implementation effort. Added Concept Specialization Expressions that are created when a concept is referenced with arguments, and tests thereof.
llvm-svn: 374882
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index e392682af75..70fe484751c 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -2231,6 +2231,17 @@ void StmtPrinter::VisitCXXFoldExpr(CXXFoldExpr *E) { OS << ")"; } +void StmtPrinter::VisitConceptSpecializationExpr(ConceptSpecializationExpr *E) { + NestedNameSpecifierLoc NNS = E->getNestedNameSpecifierLoc(); + if (NNS) + NNS.getNestedNameSpecifier()->print(OS, Policy); + if (E->getTemplateKWLoc().isValid()) + OS << "template "; + OS << E->getFoundDecl()->getName(); + printTemplateArgumentList(OS, E->getTemplateArgsAsWritten()->arguments(), + Policy); +} + // C++ Coroutines TS void StmtPrinter::VisitCoroutineBodyStmt(CoroutineBodyStmt *S) { |