Files
TheRock/compiler/amd-llvm/clang-tools-extra/unittests/clang-doc/ClangDocTest.h
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

80 lines
3.1 KiB
C++

//===-- clang-doc/ClangDocTest.h ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANG_DOC_CLANGDOCTEST_H
#define LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANG_DOC_CLANGDOCTEST_H
#include "ClangDocTest.h"
#include "Representation.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "gtest/gtest.h"
namespace clang {
namespace doc {
using EmittedInfoList = std::vector<Info *>;
static const SymbolID EmptySID = SymbolID();
static const SymbolID NonEmptySID =
SymbolID{{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}};
NamespaceInfo *InfoAsNamespace(Info *I);
RecordInfo *InfoAsRecord(Info *I);
FunctionInfo *InfoAsFunction(Info *I);
EnumInfo *InfoAsEnum(Info *I);
TypedefInfo *InfoAsTypedef(Info *I);
void CheckCommentInfo(ArrayRef<CommentInfo> Expected,
ArrayRef<CommentInfo> Actual);
void CheckCommentInfo(const DocList<CommentInfo> &Expected,
const DocList<CommentInfo> &Actual);
void CheckReference(const Reference &Expected, const Reference &Actual);
void CheckTypeInfo(const TypeInfo *Expected, const TypeInfo *Actual);
void CheckFieldTypeInfo(const FieldTypeInfo *Expected,
const FieldTypeInfo *Actual);
void CheckMemberTypeInfo(const MemberTypeInfo *Expected,
const MemberTypeInfo *Actual);
// This function explicitly does not check USRs, as that may change and it would
// be better to not rely on its implementation.
void CheckBaseInfo(const Info *Expected, const Info *Actual);
void CheckSymbolInfo(const SymbolInfo *Expected, const SymbolInfo *Actual);
void CheckFunctionInfo(const FunctionInfo *Expected,
const FunctionInfo *Actual);
void CheckEnumInfo(const EnumInfo *Expected, const EnumInfo *Actual);
void CheckTypedefInfo(const TypedefInfo *Expected, const TypedefInfo *Actual);
void CheckNamespaceInfo(const NamespaceInfo *Expected,
const NamespaceInfo *Actual);
void CheckRecordInfo(const RecordInfo *Expected, const RecordInfo *Actual);
void CheckBaseRecordInfo(const BaseRecordInfo *Expected,
const BaseRecordInfo *Actual);
void CheckIndex(const Index &Expected, const Index &Actual);
class ClangDocContextTest : public ::testing::Test {
protected:
ClangDocContextTest();
~ClangDocContextTest() override;
ClangDocContext
getClangDocContext(std::vector<std::string> UserStylesheets = {},
StringRef RepositoryUrl = "",
StringRef RepositoryLinePrefix = "", StringRef Base = "");
DiagnosticOptions DiagOpts;
llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID;
DiagnosticsEngine Diags;
};
} // namespace doc
} // namespace clang
#endif // LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANG_DOC_CLANGDOCTEST_H