#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Parse/ParseAST.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaDiagnostic.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Testing/Annotations/Annotations.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <cstddef>
#include <string>
namespace {
usingnamespaceclang;
usingnamespaceclang::tooling;
AllOf;
Contains;
Each;
UnorderedElementsAre;
const char TestCCName[] = …;
struct CompletionContext { … };
struct CompletedFunctionDecl { … };
MATCHER_P(named, name, "") { … }
MATCHER_P(isStatic, value, "") { … }
MATCHER_P(canBeCall, value, "") { … }
class SaveCompletedFunctions : public CodeCompleteConsumer { … };
class VisitedContextFinder : public CodeCompleteConsumer { … };
class CodeCompleteAction : public SyntaxOnlyAction { … };
ParsedSourceLocation offsetToPosition(llvm::StringRef Code, size_t Offset) { … }
CompletionContext runCompletion(StringRef Code, size_t Offset) { … }
CompletionContext runCodeCompleteOnCode(StringRef AnnotatedCode) { … }
std::vector<std::string>
collectPreferredTypes(StringRef AnnotatedCode,
std::string *PtrDiffType = nullptr) { … }
std::vector<CompletedFunctionDecl>
CollectCompletedFunctions(StringRef Code, std::size_t Point) { … }
TEST(SemaCodeCompleteTest, FunctionCanBeCall) { … }
TEST(SemaCodeCompleteTest, VisitedNSForValidQualifiedId) { … }
TEST(SemaCodeCompleteTest, VisitedNSForInvalidQualifiedId) { … }
TEST(SemaCodeCompleteTest, VisitedNSWithoutQualifier) { … }
TEST(PreferredTypeTest, BinaryExpr) { … }
TEST(PreferredTypeTest, Members) { … }
TEST(PreferredTypeTest, Conditions) { … }
TEST(PreferredTypeTest, InitAndAssignment) { … }
TEST(PreferredTypeTest, UnaryExprs) { … }
TEST(PreferredTypeTest, ParenExpr) { … }
TEST(PreferredTypeTest, FunctionArguments) { … }
TEST(PreferredTypeTest, NoCrashOnInvalidTypes) { … }
}