llvm/clang/unittests/Basic/SourceManagerTest.cpp

//===- unittests/Basic/SourceManagerTest.cpp ------ SourceManager tests ---===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/ModuleLoader.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Process.h"
#include "gtest/gtest.h"
#include <cstddef>

usingnamespaceclang;

namespace clang {
class SourceManagerTestHelper {};
} // namespace clang

namespace {

// The test fixture.
class SourceManagerTest : public ::testing::Test {};

TEST_F(SourceManagerTest, isInMemoryBuffersNoSourceLocationInfo) {}

TEST_F(SourceManagerTest, isInSystemHeader) {}

TEST_F(SourceManagerTest, isBeforeInTranslationUnit) {}

TEST_F(SourceManagerTest, isBeforeInTranslationUnitWithTokenSplit) {}

TEST_F(SourceManagerTest, getColumnNumber) {}

TEST_F(SourceManagerTest, locationPrintTest) {}

TEST_F(SourceManagerTest, getInvalidBOM) {}

// Regression test - there was an out of bound access for buffers not terminated by zero.
TEST_F(SourceManagerTest, getLineNumber) {}

struct FakeExternalSLocEntrySource : ExternalSLocEntrySource {};

TEST_F(SourceManagerTest, loadedSLocEntryIsInTheSameTranslationUnit) {}

#if defined(LLVM_ON_UNIX)

// A single SourceManager instance is sometimes reused across multiple
// compilations. This test makes sure we're resetting caches built for tracking
// include locations that are based on FileIDs, to make sure we don't report
// wrong include locations when FileIDs coincide between two different runs.
TEST_F(SourceManagerTest, ResetsIncludeLocMap) {}

TEST_F(SourceManagerTest, getMacroArgExpandedLocation) {}

namespace {

struct MacroAction {};

class MacroTracker : public PPCallbacks {};

}

TEST_F(SourceManagerTest, isBeforeInTranslationUnitWithMacroInInclude) {}

TEST_F(SourceManagerTest, isMainFile) {}

#endif

} // anonymous namespace