mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-14 02:46:08 +00:00

Summary: Introduces a separate target for comment manipulation. Currently, comment manipulation is in BreakableComment.cpp. Towards implementing comment reflowing, we want to factor out the comment-related functionality, so it can be reused. Start simple by just moving out getLineCommentIndentPrefix. Patch by Krasimir Georgiev! Reviewers: djasper Subscribers: klimek, beanz, mgorny, modocache Differential Revision: https://reviews.llvm.org/D25725 llvm-svn: 284573
34 lines
987 B
C++
34 lines
987 B
C++
//===--- Comments.cpp - Comment manipulation -----------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// \brief Declares comment manipulation functionality.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_CLANG_LIB_FORMAT_COMMENTS_H
|
|
#define LLVM_CLANG_LIB_FORMAT_COMMENTS_H
|
|
|
|
#include "clang/Basic/LLVM.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
namespace clang {
|
|
namespace format {
|
|
|
|
/// \brief Returns the comment prefix of the line comment \p Comment.
|
|
///
|
|
/// The comment prefix consists of a leading known prefix, like "//" or "///",
|
|
/// together with the following whitespace.
|
|
StringRef getLineCommentIndentPrefix(StringRef Comment);
|
|
|
|
} // namespace format
|
|
} // namespace clang
|
|
|
|
#endif
|