#include "clang/Tooling/Refactoring/Extract/SourceExtraction.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtObjC.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include <optional>
usingnamespaceclang;
namespace {
bool isSemicolonAtLocation(SourceLocation TokenLoc, const SourceManager &SM,
const LangOptions &LangOpts) { … }
bool isSemicolonRequiredAfter(const Stmt *S) { … }
bool areOnSameLine(SourceLocation Loc1, SourceLocation Loc2,
const SourceManager &SM) { … }
}
namespace clang {
namespace tooling {
ExtractionSemicolonPolicy
ExtractionSemicolonPolicy::compute(const Stmt *S, SourceRange &ExtractedRange,
const SourceManager &SM,
const LangOptions &LangOpts) { … }
}
}