| 1 | //===-- GtestModelHelpers.h -------------------------------------*- C++ -*-===// |
|---|---|
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file defines helpers for handling gtest constructs in dataflow models. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #ifndef CLANG_ANALYSIS_FLOWSENSITIVE_MODELS_GTESTMODELHELPERS_H |
| 14 | #define CLANG_ANALYSIS_FLOWSENSITIVE_MODELS_GTESTMODELHELPERS_H |
| 15 | |
| 16 | #include "clang/AST/Expr.h" |
| 17 | #include "clang/AST/ExprCXX.h" |
| 18 | #include "clang/ASTMatchers/ASTMatchers.h" |
| 19 | #include "clang/Analysis/FlowSensitive/DataflowEnvironment.h" |
| 20 | #include "clang/Analysis/FlowSensitive/StorageLocation.h" |
| 21 | #include <cassert> |
| 22 | |
| 23 | namespace clang { |
| 24 | namespace dataflow { |
| 25 | namespace gtest { |
| 26 | void transferAssertionResultExpectationOperatorBoolCall( |
| 27 | const CXXMemberCallExpr *Expr, Environment &Env, |
| 28 | llvm::function_ref<StorageLocation &(RecordStorageLocation &)> GetOk); |
| 29 | |
| 30 | clang::ast_matchers::StatementMatcher |
| 31 | isAssertionResultExpectationOperatorBoolCall(); |
| 32 | } // namespace gtest |
| 33 | } // namespace dataflow |
| 34 | } // namespace clang |
| 35 | |
| 36 | #endif // CLANG_ANALYSIS_FLOWSENSITIVE_MODELS_GTESTMODELHELPERS_H |
| 37 |