llvm-project/clang/unittests/AST
Serge Pavlov a67a4d2f3c Make output of -ast-print a valid C++ code.
Output generated by option -ast-print looks like C/C++ code, and it
really is for plain C. For C++ the produced output was not valid C++
code, but the differences were small. With this change the output
is fixed and can be compiled. Tests are changed so that output produced
by -ast-print is compiled again with the same flags and both outputs are
compared.

Option -ast-print is extensively used in clang tests but it itself
was tested poorly, existing tests only checked that compiler did not
crash. There are unit tests in file DeclPrinterTest.cpp, but they test
only terse output mode.

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

llvm-svn: 286439
2016-11-10 08:49:37 +00:00
..
ASTContextParentMapTest.cpp Prune away some unused using decls. NFC. 2016-06-08 15:34:36 +00:00
ASTImporterTest.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 10:39:27 +00:00
ASTTypeTraitsTest.cpp Make output of -ast-print a valid C++ code. 2016-11-10 08:49:37 +00:00
ASTVectorTest.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
CMakeLists.txt Recommit r274348 and r274349. The Windows failures should be fixed. 2016-07-08 08:33:56 +00:00
CommentLexer.cpp unique_ptrify SourceManager::createFileID 2014-08-29 07:59:55 +00:00
CommentParser.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
DeclPrinterTest.cpp Make output of -ast-print a valid C++ code. 2016-11-10 08:49:37 +00:00
DeclTest.cpp
EvaluateAsRValueTest.cpp Roll-back r250822. 2015-10-20 13:23:58 +00:00
ExternalASTSourceTest.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
MatchVerifier.h Adding new AST matchers for: addrLabelExpr, atomicExpr, binaryConditionalOperator, designatedInitExpr, designatorCountIs, hasSyntacticForm, implicitValueInitExpr, labelDecl, opaqueValueExpr, parenListExpr, predefinedExpr, requiresZeroInitialization, and stmtExpr. 2016-03-09 17:11:51 +00:00
NamedDeclPrinterTest.cpp Adjust printQualifiedName to handle unscoped enums in a way similar to anonymous namespaces. 2015-11-09 16:45:17 +00:00
PostOrderASTVisitor.cpp Recommit r274348 and r274349. The Windows failures should be fixed. 2016-07-08 08:33:56 +00:00
SourceLocationTest.cpp [Sema] Store a SourceRange for multi-token builtin types 2016-10-21 21:13:56 +00:00
StmtPrinterTest.cpp Rename AST node matchers to match the AST node names directly. Part of this rename also splits recordDecl() (which used to match CXXRecordDecl) into recordDecl() (that matches RecordDecl) and cxxRecordDecl (that matches CXXRecordDecl). Also adds isStruct(), isUnion(), and isClass() narrowing matchers for RecordDecl objects. 2015-09-17 13:30:52 +00:00