llvm-project/clang/unittests/Tooling
Scott Linder c0830f5577 [Support] Teach YAMLIO about polymorphic types
Add support for "polymorphic" types to YAMLIO.

PolymorphicTraits can dynamically switch between other traits (Scalar, Map, or
Sequence). When inputting, the PolymorphicTraits type is told which type to
become, and when outputting the PolymorphicTraits type is asked which type it
currently is.

Also add support for TaggedScalarTraits to allow dynamically differentiating
between multiple scalar types using YAML tags.

Serialize empty maps as "{}" and empty sequences as "[]", so that types
are preserved when round-tripping PolymorphicTraits. This change has
equivalent semantics, but may break e.g. tests which compare output
verbatim.

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

llvm-svn: 346884
2018-11-14 19:39:59 +00:00
..
RecursiveASTVisitorTests [AST] Allow limiting the scope of common AST traversals (getParents, RAV). 2018-11-14 10:33:30 +00:00
ASTSelectionTest.cpp [refactor][selection] canonicalize decl ref callee to the call expr 2017-11-14 23:10:50 +00:00
CMakeLists.txt [AST] Allow limiting the scope of common AST traversals (getParents, RAV). 2018-11-14 10:33:30 +00:00
CastExprTest.cpp Make CastExpr::getSubExprAsWritten look through implicit temporary under CK_ConstructorConversion 2017-06-27 08:19:09 +00:00
CommentHandlerTest.cpp Revert "[Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>" 2018-02-27 15:54:55 +00:00
CompilationDatabaseTest.cpp [Tooling] Improve handling of CL-style options 2018-09-09 12:06:35 +00:00
DiagnosticsYamlTest.cpp [Support] Teach YAMLIO about polymorphic types 2018-11-14 19:39:59 +00:00
ExecutionTest.cpp [Tooling] Add "-filter" option to AllTUsExecution 2018-11-05 13:42:05 +00:00
FixItTest.cpp [tooling] FixItHint Tooling refactoring 2016-05-11 14:31:39 +00:00
HeaderIncludesTest.cpp Reland "Move #include manipulation code to new lib/Tooling/Inclusions." 2018-06-04 09:04:12 +00:00
LexicallyOrderedRecursiveASTVisitorTest.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
LookupTest.cpp Fully qualify the renamed symbol if the shortened name is ambiguous. 2018-08-03 09:16:07 +00:00
QualTypeNamesTest.cpp Allow modifying the PrintingPolicy for fully qualified names. 2018-05-04 20:12:39 +00:00
RecursiveASTVisitorTestDeclVisitor.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
RecursiveASTVisitorTestPostOrderVisitor.cpp Refactor RecursiveASTVisitor test for post-order traversal 2018-01-24 09:40:16 +00:00
RecursiveASTVisitorTestTypeLocVisitor.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
RefactoringActionRulesTest.cpp [Support] Teach YAMLIO about polymorphic types 2018-11-14 19:39:59 +00:00
RefactoringCallbacksTest.cpp Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks 2017-05-10 07:48:45 +00:00
RefactoringTest.cpp Lift VFS from clang to llvm (NFC) 2018-10-10 13:27:25 +00:00
ReplacementTest.h clang-format: Separate out a language kind for ObjC. 2016-12-12 12:42:29 +00:00
ReplacementsYamlTest.cpp Make YAML quote forward slashes. 2018-10-12 16:31:20 +00:00
RewriterTest.cpp Implement tooling::Replacements as a class. 2016-08-01 10:16:37 +00:00
RewriterTestContext.h Lift VFS from clang to llvm (NFC) 2018-10-10 13:27:25 +00:00
TestVisitor.h Revert "[Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>" 2018-02-27 15:54:55 +00:00
ToolingTest.cpp Lift VFS from clang to llvm (NFC) 2018-10-10 13:27:25 +00:00