#include "CheckerRegistration.h"
#include "Reusables.h"
#include "clang/AST/ExprCXX.h"
#include "clang/Analysis/PathDiagnostic.h"
#include "clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
#include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h"
#include "clang/Tooling/Tooling.h"
#include "gtest/gtest.h"
#include <type_traits>
namespace clang {
namespace ento {
namespace {
class ResultMap { … };
template <typename MatchedExprT>
class CallDescriptionConsumer : public ExprEngineConsumer { … };
template <typename MatchedExprT = CallExpr>
class CallDescriptionAction : public ASTFrontendAction { … };
TEST(CallDescription, SimpleNameMatching) { … }
TEST(CallDescription, RequiredArguments) { … }
TEST(CallDescription, LackOfRequiredArguments) { … }
constexpr StringRef MockStdStringHeader = …;
TEST(CallDescription, QualifiedNames) { … }
TEST(CallDescription, MatchConstructor) { … }
TEST(CallDescription, MatchConversionOperator) { … }
TEST(CallDescription, RejectOverQualifiedNames) { … }
TEST(CallDescription, DontSkipNonInlineNamespaces) { … }
TEST(CallDescription, SkipTopInlineNamespaces) { … }
TEST(CallDescription, SkipAnonimousNamespaces) { … }
TEST(CallDescription, AliasNames) { … }
TEST(CallDescription, AliasSingleNamespace) { … }
TEST(CallDescription, AliasMultipleNamespaces) { … }
TEST(CallDescription, NegativeMatchQualifiedNames) { … }
TEST(CallDescription, MatchBuiltins) { … }
class CallDescChecker
: public Checker<check::PreCall, check::PreStmt<CallExpr>> { … };
void addCallDescChecker(AnalysisASTConsumer &AnalysisConsumer,
AnalyzerOptions &AnOpts) { … }
TEST(CallDescription, CheckCallExprMatching) { … }
}
}
}