clang 23.0.0git
clang::ssaf::FormatFile Struct Reference

#include "clang/ScalableStaticAnalysisFramework/Tool/Utils.h"

Static Public Member Functions

static FormatFile fromInputPath (llvm::StringRef Path)
 Validates an input path and returns a FormatFile.
static FormatFile fromOutputPath (llvm::StringRef Path)
 Validates an output path and returns a FormatFile.

Public Attributes

std::string Path
SerializationFormatFormat = nullptr

Detailed Description

Definition at line 69 of file Utils.h.

Member Function Documentation

◆ fromInputPath()

clang::ssaf::FormatFile clang::ssaf::FormatFile::fromInputPath ( llvm::StringRef Path)
static

Validates an input path and returns a FormatFile.

Checks that the path exists and is a regular file, then resolves the serialization format from the file extension. Read permission is not checked here because llvm::sys::fs::AccessMode does not support Read; read errors are caught when the file is opened during deserialization.

Calls fail() and exits on any validation error.

Definition at line 168 of file Utils.cpp.

References clang::ssaf::fail(), and Path.

◆ fromOutputPath()

clang::ssaf::FormatFile clang::ssaf::FormatFile::fromOutputPath ( llvm::StringRef Path)
static

Validates an output path and returns a FormatFile.

Checks that the output file does not already exist, that the parent directory exists and is writable, then resolves the serialization format from the file extension.

Calls fail() and exits on any validation error.

Definition at line 183 of file Utils.cpp.

References clang::ssaf::fail(), and Path.

Member Data Documentation

◆ Format

SerializationFormat* clang::ssaf::FormatFile::Format = nullptr

Definition at line 71 of file Utils.h.

◆ Path

std::string clang::ssaf::FormatFile::Path

Definition at line 70 of file Utils.h.

Referenced by fromInputPath(), and fromOutputPath().


The documentation for this struct was generated from the following files: