llvm/clang/include/clang/Frontend/CommandLineSourceLoc.h


//===--- CommandLineSourceLoc.h - Parsing for source locations-*- C++ -*---===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// Command line parsing for source locations.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_FRONTEND_COMMANDLINESOURCELOC_H
#define LLVM_CLANG_FRONTEND_COMMANDLINESOURCELOC_H

#include "clang/Basic/LLVM.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>

namespace clang {

/// A source location that has been parsed on the command line.
struct ParsedSourceLocation {};

/// A source range that has been parsed on the command line.
struct ParsedSourceRange {};
}

namespace llvm {
  namespace cl {
    /// Command-line option parser that parses source locations.
    ///
    /// Source locations are of the form filename:line:column.
    template<>
    class parser<clang::ParsedSourceLocation> final
      : public basic_parser<clang::ParsedSourceLocation> {};

    bool
    parser<clang::ParsedSourceLocation>::
    parse(Option &O, StringRef ArgName, StringRef ArgValue,
          clang::ParsedSourceLocation &Val) {}
  }
}

#endif