|
clang 22.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 79 of file TestAST.cpp.
References clang::CompilerInvocation::CreateFromArgs(), clang::Extra, clang::getCC1ArgsForTesting(), and clang::getFilenameForTesting().
Referenced by operator=(), TestAST(), and TestAST().
|
inline |
| clang::TestAST::TestAST | ( | TestAST && | M | ) |
Definition at line 169 of file TestAST.cpp.
References TestAST().
| clang::TestAST::~TestAST | ( | ) |
Definition at line 171 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 161 of file TestAST.cpp.
References TestAST().
|
inline |
|
inline |