Files
llvm-project/clang/lib/Tooling/Syntax/TokenBufferTokenManager.cpp
Kazu Hirata d5d697f359 [clang] Remove redundant declarations (NFC) (#166711)
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.
2025-11-06 06:51:41 -08:00

24 lines
844 B
C++

//===- TokenBufferTokenManager.cpp ----------------------------------------===//
//
// 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/Tooling/Syntax/TokenBufferTokenManager.h"
namespace clang {
namespace syntax {
std::pair<FileID, ArrayRef<syntax::Token>>
syntax::TokenBufferTokenManager::lexBuffer(
std::unique_ptr<llvm::MemoryBuffer> Input) {
auto FID = SM.createFileID(std::move(Input));
auto It = ExtraTokens.try_emplace(FID, tokenize(FID, SM, LangOpts));
assert(It.second && "duplicate FileID");
return {FID, It.first->second};
}
} // namespace syntax
} // namespace clang