clang 20.0.0git
|
The result of parsing a file specified by TestInputs. More...
#include "clang/Testing/TestAST.h"
Public Member Functions | |
TestAST (const TestInputs &) | |
Constructing a TestAST parses the virtual file. | |
TestAST (StringRef Code) | |
TestAST (TestAST &&M) | |
TestAST & | operator= (TestAST &&) |
~TestAST () | |
ASTContext & | context () |
Provides access to the AST context and other parts of Clang. | |
Sema & | sema () |
SourceManager & | sourceManager () |
FileManager & | fileManager () |
Preprocessor & | preprocessor () |
FrontendAction & | action () |
llvm::ArrayRef< StoredDiagnostic > | diagnostics () |
Returns diagnostics emitted during parsing. | |
The result of parsing a file specified by TestInputs.
The ASTContext, Sema etc are valid as long as this object is alive.
clang::TestAST::TestAST | ( | const TestInputs & | In | ) |
Constructing a TestAST parses the virtual file.
To keep tests terse, critical errors (e.g. invalid flags) are reported as unit test failures with ADD_FAILURE() and produce an empty ASTContext, Sema etc. This frees the test code from handling these explicitly.
Definition at line 77 of file TestAST.cpp.
References clang::CompilerInvocation::CreateFromArgs(), Filename, clang::getCC1ArgsForTesting(), and clang::getFilenameForTesting().
clang::TestAST::TestAST | ( | TestAST && | M | ) |
Definition at line 167 of file TestAST.cpp.
clang::TestAST::~TestAST | ( | ) |
Definition at line 169 of file TestAST.cpp.
|
inline |
|
inline |
|
inline |
Returns diagnostics emitted during parsing.
(By default, errors cause test failures, see TestInputs::ErrorOK).
|
inline |
Definition at line 159 of file TestAST.cpp.
|
inline |
|
inline |