#include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Analysis/AnalysisDeclContext.h" #include "clang/Frontend/ASTUnit.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" #include "clang/Tooling/Tooling.h" #include "gtest/gtest.h" #include <memory> usingnamespaceclang; usingnamespaceento; usingnamespaceast_matchers; class IsCLibraryFunctionTest : public testing::Test { … }; TEST_F(IsCLibraryFunctionTest, AcceptsGlobal) { … } TEST_F(IsCLibraryFunctionTest, AcceptsExternCGlobal) { … } TEST_F(IsCLibraryFunctionTest, RejectsNoInlineNoExternalLinkage) { … } TEST_F(IsCLibraryFunctionTest, RejectsAnonymousNamespace) { … } TEST_F(IsCLibraryFunctionTest, AcceptsStdNamespace) { … } TEST_F(IsCLibraryFunctionTest, RejectsOtherNamespaces) { … } TEST_F(IsCLibraryFunctionTest, RejectsClassStatic) { … } TEST_F(IsCLibraryFunctionTest, RejectsClassMember) { … }