|
clang 23.0.0git
|
Namespaces | |
| namespace | ErrorMessages |
Classes | |
| class | AnalysisBase |
| Minimal common base for both analysis kinds. More... | |
| class | AnalysisDriver |
| Orchestrates whole-program analysis over an LUSummary. More... | |
| class | AnalysisName |
| Uniquely identifies a whole-program analysis and the AnalysisResult it produces. More... | |
| class | AnalysisRegistry |
| Unified registry for SummaryAnalysis and DerivedAnalysis implementations. More... | |
| class | AnalysisResult |
| Base class for whole-program analysis results. More... | |
| class | BuildNamespace |
| Represents a single namespace in the build process. More... | |
| struct | CallGraphSummary |
| Summary of direct call-graph edges for a single function entity. More... | |
| struct | Comparator |
| An EntityPointerLevel represents a level of the declared pointer/array type of an entity. More... | |
| class | DerivedAnalysis |
| Typed intermediate that concrete derived analyses inherit from. More... | |
| class | DerivedAnalysisBase |
| Type-erased base for derived analyses. More... | |
| class | EntityId |
| Lightweight opaque handle representing an entity in an EntityIdTable. More... | |
| class | EntityIdTable |
| Manages entity name interning and provides efficient EntityId handles. More... | |
| class | EntityLinkage |
| Represents the linkage properties of an entity in the program model. More... | |
| class | EntityLinker |
| class | EntityName |
| Uniquely identifies an entity in a program. More... | |
| class | EntitySummary |
| Base class for analysis-specific summary data. More... | |
| class | EntitySummaryEncoding |
| Represents EntitySummary data in its serialized, format-specific encoding. More... | |
| class | ErrorBuilder |
| Fluent API for constructing contextual errors. More... | |
| struct | FormatInfoEntry |
| struct | HasAnalysisName |
Type trait that checks whether T has a static analysisName() method returning AnalysisName. More... | |
| struct | HasAnalysisName< T, std::void_t< decltype(T::analysisName())> > |
| struct | HasSummaryName |
Type trait that checks whether T has a static summaryName() method returning SummaryName. More... | |
| struct | HasSummaryName< T, std::void_t< decltype(T::summaryName())> > |
| class | JSONEntitySummaryEncoding |
| class | JSONFormat |
| class | LUSummary |
| Represents a link unit (LU) summary containing merged entity summaries. More... | |
| class | LUSummaryConsumer |
| Consumes a LUSummary by dispatching its entity data to registered SummaryDataBuilders and returning the results in a SummaryDataStore. More... | |
| class | LUSummaryEncoding |
| Represents a link unit summary in its serialized encoding. More... | |
| class | NestedBuildNamespace |
| Represents a hierarchical sequence of build namespaces. More... | |
| class | SerializationFormat |
| Abstract base class for serialization formats. More... | |
| class | SummaryAnalysis |
| Typed intermediate that concrete summary analyses inherit from. More... | |
| class | SummaryAnalysisBase |
| Type-erased base for summary analyses. More... | |
| class | SummaryData |
| Base class for whole-program analysis data. More... | |
| class | SummaryDataBuilder |
| Typed intermediate template that concrete builders inherit from. More... | |
| class | SummaryDataBuilderBase |
| Abstract base class for all summary data builders. More... | |
| class | SummaryDataBuilderRegistry |
| Registry for SummaryDataBuilder implementations. More... | |
| class | SummaryDataStore |
| Owns a collection of SummaryData objects keyed by SummaryName. More... | |
| struct | SummaryFile |
| class | SummaryName |
| Uniquely identifies an analysis summary. More... | |
| class | TUSummary |
| Data extracted for a given translation unit and for a given set of analyses. More... | |
| class | TUSummaryBuilder |
| class | TUSummaryEncoding |
| Represents a translation unit summary in its serialized encoding. More... | |
| class | TUSummaryExtractor |
| class | TUSummaryExtractorFrontendAction |
Wraps the existing FrontendAction and injects the extractor ASTConsumers into the pipeline after the ASTConsumers of the wrapped action. More... | |
| class | UnsafeBufferUsageTUSummaryExtractor |
| class | WPASuite |
| Bundles the EntityIdTable (moved from the LUSummary) and the analysis results produced by one AnalysisDriver::run() call, keyed by AnalysisName. More... | |
Typedefs | |
| using | SerializationFormatRegistry = llvm::Registry<SerializationFormat> |
| template<typename Derived> | |
| using | DerivesFromEntitySummary |
| using | TUSummaryExtractorRegistry |
| using | Array = llvm::json::Array |
| using | Object = llvm::json::Object |
| using | Value = llvm::json::Value |
Enumerations | |
| enum class | BuildNamespaceKind : unsigned short { CompilationUnit , LinkUnit } |
| enum class | EntityLinkageType { None , Internal , External } |
Functions | |
| std::optional< EntityName > | getEntityName (const Decl *D) |
| Maps a declaration to an EntityName. | |
| std::optional< EntityName > | getEntityNameForReturn (const FunctionDecl *FD) |
| Maps return entity of a function to an EntityName. | |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, BuildNamespaceKind BNK) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const BuildNamespace &BN) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const NestedBuildNamespace &NBN) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const EntityId &Id) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, EntityLinkageType Linkage) |
| Writes a string representation of the linkage type to the stream. | |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const EntityLinkage &Linkage) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const EntityName &EN) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const SummaryName &SN) |
| bool | isFormatRegistered (llvm::StringRef FormatName) |
| Check if a SerializationFormat was registered with a given name. | |
| std::unique_ptr< SerializationFormat > | makeFormat (llvm::StringRef FormatName) |
| Try to instantiate a SerializationFormat with a given name. | |
| void | printAvailableFormats (llvm::raw_ostream &OS) |
| Print the list of available serialization formats. | |
| bool | isTUSummaryExtractorRegistered (llvm::StringRef SummaryName) |
| Check if a TUSummaryExtractor was registered with a given name. | |
| std::unique_ptr< ASTConsumer > | makeTUSummaryExtractor (llvm::StringRef SummaryName, TUSummaryBuilder &Builder) |
| Try to instantiate a TUSummaryExtractor with a given name. | |
| void | printAvailableTUSummaryExtractors (llvm::raw_ostream &OS) |
| Print the list of available TUSummaryExtractors. | |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const AnalysisName &AN) |
| llvm::StringRef | getToolName () |
| Returns the name of the running tool, as set by initTool(). | |
| void | fail (const char *Msg) |
| template<typename... Ts> | |
| void | fail (const char *Fmt, Ts &&...Args) |
| void | fail (llvm::Error Err) |
| void | loadPlugins (llvm::ArrayRef< std::string > Paths) |
| void | initTool (int argc, const char **argv, llvm::StringRef Version, llvm::cl::OptionCategory &Category, llvm::StringRef ToolHeading) |
| Sets ToolName, ToolVersion, and the version printer, hides unrelated command-line options, and parses arguments. | |
| llvm::StringRef | buildNamespaceKindToString (BuildNamespaceKind BNK) |
Returns the canonical string representation of BNK used for serialization and display (e.g. | |
| std::optional< BuildNamespaceKind > | buildNamespaceKindFromString (llvm::StringRef Str) |
| Parses a string produced by buildNamespaceKindToString(). | |
| llvm::StringRef | entityLinkageTypeToString (EntityLinkageType LT) |
Returns the canonical string representation of LT used for serialization and display (e.g. | |
| std::optional< EntityLinkageType > | entityLinkageTypeFromString (llvm::StringRef Str) |
| Parses a string produced by entityLinkageTypeToString(). | |
| llvm::Expected< Value > | readJSON (llvm::StringRef Path) |
| llvm::Error | writeJSON (Value &&V, llvm::StringRef Path) |
| SummaryName | summaryNameFromJSON (llvm::StringRef SummaryNameStr) |
| llvm::StringRef | summaryNameToJSON (const SummaryName &SN) |
| llvm::Expected< BuildNamespaceKind > | buildNamespaceKindFromJSON (llvm::StringRef BuildNamespaceKindStr) |
| llvm::StringRef | buildNamespaceKindToJSON (BuildNamespaceKind BNK) |
| llvm::Expected< EntityLinkageType > | entityLinkageTypeFromJSON (llvm::StringRef EntityLinkageTypeStr) |
| llvm::StringRef | entityLinkageTypeToJSON (EntityLinkageType LT) |
Variables | |
| template<typename T> | |
| constexpr bool | HasAnalysisName_v = HasAnalysisName<T>::value |
| constexpr const char * | JSONFormatFileExtension = ".json" |
| constexpr const char * | JSONEntityIdKey = "@" |
| An entity ID is encoded as the single-key object {"@": <index>}. | |
| static constexpr llvm::StringLiteral | ErrorSeparator = " + " |
| static constexpr llvm::StringLiteral | ContextSeparator = "\n" |
| using clang::ssaf::Array = llvm::json::Array |
Definition at line 36 of file JSONFormatImpl.h.
| using clang::ssaf::DerivesFromEntitySummary |
Definition at line 25 of file EntitySummary.h.
| using clang::ssaf::Object = llvm::json::Object |
Definition at line 37 of file JSONFormatImpl.h.
| using clang::ssaf::SerializationFormatRegistry = llvm::Registry<SerializationFormat> |
Definition at line 88 of file SerializationFormatRegistry.h.
Definition at line 51 of file ExtractorRegistry.h.
| using clang::ssaf::Value = llvm::json::Value |
Definition at line 38 of file JSONFormatImpl.h.
|
strong |
| Enumerator | |
|---|---|
| CompilationUnit | |
| LinkUnit | |
Definition at line 30 of file BuildNamespace.h.
|
strong |
| Enumerator | |
|---|---|
| None | local variables, function parameters |
| Internal | static functions/variables, anonymous namespace |
| External | globally visible across translation units |
Definition at line 17 of file EntityLinkage.h.
| llvm::Expected< BuildNamespaceKind > clang::ssaf::buildNamespaceKindFromJSON | ( | llvm::StringRef | BuildNamespaceKindStr | ) |
Definition at line 195 of file JSONFormatImpl.cpp.
References clang::ssaf::ErrorBuilder::build(), buildNamespaceKindFromString(), clang::ssaf::ErrorBuilder::create(), and clang::ssaf::ErrorMessages::InvalidBuildNamespaceKind.
|
inline |
Parses a string produced by buildNamespaceKindToString().
Returns std::nullopt if Str does not match any known BuildNamespaceKind value.
Definition at line 46 of file ModelStringConversions.h.
References CompilationUnit, and LinkUnit.
Referenced by buildNamespaceKindFromJSON().
| llvm::StringRef clang::ssaf::buildNamespaceKindToJSON | ( | BuildNamespaceKind | BNK | ) |
Definition at line 208 of file JSONFormatImpl.cpp.
References buildNamespaceKindToString().
|
inline |
Returns the canonical string representation of BNK used for serialization and display (e.g.
"CompilationUnit", "LinkUnit").
Definition at line 33 of file ModelStringConversions.h.
References CompilationUnit, and LinkUnit.
Referenced by buildNamespaceKindToJSON(), and operator<<().
| llvm::Expected< EntityLinkageType > clang::ssaf::entityLinkageTypeFromJSON | ( | llvm::StringRef | EntityLinkageTypeStr | ) |
Definition at line 352 of file JSONFormatImpl.cpp.
References clang::ssaf::ErrorBuilder::build(), clang::ssaf::ErrorBuilder::create(), entityLinkageTypeFromString(), and clang::ssaf::ErrorMessages::InvalidEntityLinkageType.
|
inline |
Parses a string produced by entityLinkageTypeToString().
Returns std::nullopt if Str does not match any known EntityLinkageType value.
Definition at line 75 of file ModelStringConversions.h.
References External, Internal, and None.
Referenced by entityLinkageTypeFromJSON().
| llvm::StringRef clang::ssaf::entityLinkageTypeToJSON | ( | EntityLinkageType | LT | ) |
Definition at line 364 of file JSONFormatImpl.cpp.
References entityLinkageTypeToString().
|
inline |
Returns the canonical string representation of LT used for serialization and display (e.g.
"None", "Internal", "External").
Definition at line 60 of file ModelStringConversions.h.
References External, Internal, and None.
Referenced by entityLinkageTypeToJSON(), and operator<<().
|
inline |
| void clang::ssaf::fail | ( | const char * | Msg | ) |
Definition at line 79 of file Utils.cpp.
References noreturn.
Referenced by fail(), fail(), clang::ssaf::SummaryFile::fromPath(), and loadPlugins().
| void clang::ssaf::fail | ( | llvm::Error | Err | ) |
| std::optional< EntityName > clang::ssaf::getEntityName | ( | const Decl * | D | ) |
Maps a declaration to an EntityName.
Supported declaration types for entity mapping:
Implicit declarations and compiler builtins are not mapped.
| D | The declaration to map. Must not be null. |
Definition at line 21 of file ASTEntityMapping.cpp.
References clang::cast(), clang::index::generateUSRForDecl(), clang::isa(), and clang::Decl::isImplicit().
Referenced by clang::ssaf::UnsafeBufferUsageTUSummaryExtractor::HandleTranslationUnit().
| std::optional< EntityName > clang::ssaf::getEntityNameForReturn | ( | const FunctionDecl * | FD | ) |
Maps return entity of a function to an EntityName.
The returned name uniquely identifies the return value of function
| FD. | |
| FD | The function declaration. Must not be null. |
Definition at line 62 of file ASTEntityMapping.cpp.
References clang::index::generateUSRForDecl(), clang::FunctionDecl::getBuiltinID(), and clang::Decl::isImplicit().
| llvm::StringRef clang::ssaf::getToolName | ( | ) |
Returns the name of the running tool, as set by initTool().
| void clang::ssaf::initTool | ( | int | argc, |
| const char ** | argv, | ||
| llvm::StringRef | Version, | ||
| llvm::cl::OptionCategory & | Category, | ||
| llvm::StringRef | ToolHeading ) |
| bool clang::ssaf::isFormatRegistered | ( | llvm::StringRef | FormatName | ) |
Check if a SerializationFormat was registered with a given name.
Definition at line 17 of file SerializationFormatRegistry.cpp.
References isFormatRegistered().
Referenced by isFormatRegistered(), and parseOutputFileFormatAndPathOrReportError().
| bool clang::ssaf::isTUSummaryExtractorRegistered | ( | llvm::StringRef | SummaryName | ) |
Check if a TUSummaryExtractor was registered with a given name.
Definition at line 20 of file ExtractorRegistry.cpp.
Referenced by makeTUSummaryExtractors(), and reportUnrecognizedExtractorNames().
| void clang::ssaf::loadPlugins | ( | llvm::ArrayRef< std::string > | Paths | ) |
Definition at line 89 of file Utils.cpp.
References fail(), and clang::ssaf::ErrorMessages::FailedToLoadPlugin.
| std::unique_ptr< SerializationFormat > clang::ssaf::makeFormat | ( | llvm::StringRef | FormatName | ) |
Try to instantiate a SerializationFormat with a given name.
This might return null if the construction of the desired SerializationFormat failed. It's a fatal error if there is no format registered with the name.
Definition at line 25 of file SerializationFormatRegistry.cpp.
| std::unique_ptr< ASTConsumer > clang::ssaf::makeTUSummaryExtractor | ( | llvm::StringRef | SummaryName, |
| TUSummaryBuilder & | Builder ) |
Try to instantiate a TUSummaryExtractor with a given name.
This might return null if the construction of the desired TUSummaryExtractor failed. It's a fatal error if there is no extractor registered with the name.
Definition at line 28 of file ExtractorRegistry.cpp.
Referenced by makeTUSummaryExtractors().
| llvm::raw_ostream & clang::ssaf::operator<< | ( | llvm::raw_ostream & | OS, |
| BuildNamespaceKind | BNK ) |
Definition at line 57 of file BuildNamespace.cpp.
References buildNamespaceKindToString().
| llvm::raw_ostream & clang::ssaf::operator<< | ( | llvm::raw_ostream & | OS, |
| const AnalysisName & | AN ) |
Definition at line 13 of file AnalysisName.cpp.
References clang::ssaf::AnalysisName::str().
| llvm::raw_ostream & clang::ssaf::operator<< | ( | llvm::raw_ostream & | OS, |
| const BuildNamespace & | BN ) |
Definition at line 61 of file BuildNamespace.cpp.
| llvm::raw_ostream & clang::ssaf::operator<< | ( | llvm::raw_ostream & | OS, |
| const EntityId & | Id ) |
Definition at line 13 of file EntityId.cpp.
| llvm::raw_ostream & clang::ssaf::operator<< | ( | llvm::raw_ostream & | OS, |
| const EntityLinkage & | Linkage ) |
Definition at line 28 of file EntityLinkage.cpp.
| llvm::raw_ostream & clang::ssaf::operator<< | ( | llvm::raw_ostream & | OS, |
| const EntityName & | EN ) |
Definition at line 36 of file EntityName.cpp.
| llvm::raw_ostream & clang::ssaf::operator<< | ( | llvm::raw_ostream & | OS, |
| const NestedBuildNamespace & | NBN ) |
Definition at line 65 of file BuildNamespace.cpp.
| llvm::raw_ostream & clang::ssaf::operator<< | ( | llvm::raw_ostream & | OS, |
| const SummaryName & | SN ) |
Definition at line 13 of file SummaryName.cpp.
References clang::ssaf::SummaryName::str().
| llvm::raw_ostream & clang::ssaf::operator<< | ( | llvm::raw_ostream & | OS, |
| EntityLinkageType | Linkage ) |
Writes a string representation of the linkage type to the stream.
Definition at line 23 of file EntityLinkage.cpp.
References entityLinkageTypeToString().
| void clang::ssaf::printAvailableFormats | ( | llvm::raw_ostream & | OS | ) |
Print the list of available serialization formats.
Definition at line 33 of file SerializationFormatRegistry.cpp.
Referenced by clang::driver::Driver::HandleImmediateArgs().
| void clang::ssaf::printAvailableTUSummaryExtractors | ( | llvm::raw_ostream & | OS | ) |
Print the list of available TUSummaryExtractors.
Definition at line 37 of file ExtractorRegistry.cpp.
Referenced by clang::driver::Driver::HandleImmediateArgs().
| llvm::Expected< Value > clang::ssaf::readJSON | ( | llvm::StringRef | Path | ) |
Definition at line 27 of file JSONFormatImpl.cpp.
References clang::ssaf::ErrorBuilder::build(), clang::ssaf::ErrorBuilder::create(), clang::ssaf::ErrorMessages::FailedToReadFile, clang::ssaf::ErrorMessages::FileIsDirectory, clang::ssaf::ErrorMessages::FileIsNotJSON, clang::ssaf::ErrorMessages::FileNotFound, and JSONFormatFileExtension.
Referenced by clang::ssaf::JSONFormat::readLUSummary(), clang::ssaf::JSONFormat::readLUSummaryEncoding(), clang::ssaf::JSONFormat::readTUSummary(), and clang::ssaf::JSONFormat::readTUSummaryEncoding().
| SummaryName clang::ssaf::summaryNameFromJSON | ( | llvm::StringRef | SummaryNameStr | ) |
Definition at line 138 of file JSONFormatImpl.cpp.
| llvm::StringRef clang::ssaf::summaryNameToJSON | ( | const SummaryName & | SN | ) |
Definition at line 142 of file JSONFormatImpl.cpp.
References clang::ssaf::SummaryName::str().
| llvm::Error clang::ssaf::writeJSON | ( | Value && | V, |
| llvm::StringRef | Path ) |
Definition at line 61 of file JSONFormatImpl.cpp.
References clang::ssaf::ErrorBuilder::build(), clang::ssaf::ErrorBuilder::create(), clang::ssaf::ErrorMessages::FailedToWriteFile, clang::ssaf::ErrorMessages::FileExists, clang::ssaf::ErrorMessages::FileIsNotJSON, JSONFormatFileExtension, clang::ssaf::ErrorMessages::ParentDirectoryNotFound, and V.
Referenced by clang::ssaf::JSONFormat::writeLUSummary(), clang::ssaf::JSONFormat::writeLUSummaryEncoding(), clang::ssaf::JSONFormat::writeTUSummary(), and clang::ssaf::JSONFormat::writeTUSummaryEncoding().
|
staticconstexpr |
Definition at line 17 of file ErrorBuilder.cpp.
Referenced by clang::ssaf::ErrorBuilder::build().
|
staticconstexpr |
Definition at line 16 of file ErrorBuilder.cpp.
Referenced by clang::ssaf::ErrorBuilder::wrap().
|
inlineconstexpr |
Definition at line 32 of file AnalysisTraits.h.
Referenced by clang::ssaf::WPASuite::contains(), and clang::ssaf::WPASuite::get().
|
inlineconstexpr |
An entity ID is encoded as the single-key object {"@": <index>}.
Definition at line 126 of file JSONFormatImpl.h.
|
inlineconstexpr |
Definition at line 44 of file JSONFormatImpl.h.
Referenced by readJSON(), and writeJSON().