BuildCache
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
bcache::ccc_analyzer_wrapper_t Class Reference

This is a wrapper for the scan-build ccc-analyzer (a Clang-based static analyzer). More...

#include <ccc_analyzer_wrapper.hpp>

Inheritance diagram for bcache::ccc_analyzer_wrapper_t:
bcache::gcc_wrapper_t bcache::program_wrapper_t

Public Member Functions

 ccc_analyzer_wrapper_t (const file::exe_path_t &exe_path, const string_list_t &args)
 
bool can_handle_command () override
 Check if this class implements a wrapper for the given command. More...
 
- Public Member Functions inherited from bcache::gcc_wrapper_t
 gcc_wrapper_t (const file::exe_path_t &exe_path, const string_list_t &args)
 
bool can_handle_command () override
 Check if this class implements a wrapper for the given command. More...
 
- Public Member Functions inherited from bcache::program_wrapper_t
bool handle_command (int &return_code)
 Try to wrap a program command. More...
 

Private Member Functions

std::map< std::string, expected_file_tget_build_files () override
 Get the paths to the files that are to be generated by the command. More...
 
std::map< std::string, std::string > get_relevant_env_vars () override
 Get relevant environment variables for hashing. More...
 
sys::run_result_t run_for_miss () override
 Run the actual command (when there is a cache miss). More...
 

Private Attributes

std::string m_report_paths [MAX_NUM_REPORTS]
 
file::tmp_file_t m_tmp_report_dir
 

Static Private Attributes

static const int MAX_NUM_REPORTS = 10
 

Additional Inherited Members

- Protected Member Functions inherited from bcache::gcc_wrapper_t
string_list_t get_capabilities () override
 Generate a list of supported capabilites. More...
 
std::map< std::string, expected_file_tget_build_files () override
 Get the paths to the files that are to be generated by the command. More...
 
std::string get_program_id () override
 Get a string that uniquely identifies the program. More...
 
string_list_t get_relevant_arguments () override
 Get relevant command line arguments for hashing. More...
 
std::map< std::string, std::string > get_relevant_env_vars () override
 Get relevant environment variables for hashing. More...
 
string_list_t get_input_files () override
 Get the paths to the input files for the command. More...
 
std::string preprocess_source () override
 Generate the preprocessed source text. More...
 
string_list_t get_implicit_input_files () override
 Get a list of paths to implicit input files. More...
 
- Protected Member Functions inherited from bcache::program_wrapper_t
 program_wrapper_t (const file::exe_path_t &exe_path, const string_list_t &args)
 
- Protected Attributes inherited from bcache::gcc_wrapper_t
string_list_t m_resolved_args
 
- Protected Attributes inherited from bcache::program_wrapper_t
const file::exe_path_tm_exe_path
 
const string_list_tm_args
 
capabilities_t m_active_capabilities
 Active capabilities. More...
 

Detailed Description

This is a wrapper for the scan-build ccc-analyzer (a Clang-based static analyzer).

The analyzer runs GCC/Clang under the hood, so we inherit from the GCC wrapper.

Member Function Documentation

◆ can_handle_command()

bool bcache::ccc_analyzer_wrapper_t::can_handle_command ( )
overridevirtual

Check if this class implements a wrapper for the given command.

Returns
true if this wrapper can handle the command.

Implements bcache::program_wrapper_t.

◆ get_build_files()

std::map< std::string, expected_file_t > bcache::ccc_analyzer_wrapper_t::get_build_files ( )
overrideprivatevirtual

Get the paths to the files that are to be generated by the command.

Returns
the files that are expected to be generated by this command.
Exceptions
runtime_errorif the request could not be completed.

Reimplemented from bcache::program_wrapper_t.

◆ get_relevant_env_vars()

std::map< std::string, std::string > bcache::ccc_analyzer_wrapper_t::get_relevant_env_vars ( )
overrideprivatevirtual

Get relevant environment variables for hashing.

Returns
relevant environment variables and their values.
Exceptions
runtime_errorif the request could not be completed.
Note
The purpose of this function is to create a list of environment variables that may affect program output.

Reimplemented from bcache::program_wrapper_t.

◆ run_for_miss()

sys::run_result_t bcache::ccc_analyzer_wrapper_t::run_for_miss ( )
overrideprivatevirtual

Run the actual command (when there is a cache miss).

Returns
the run result for the child process.

Reimplemented from bcache::program_wrapper_t.


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