cprover
Loading...
Searching...
No Matches
c_preprocess.cpp File Reference
#include "c_preprocess.h"
#include <util/c_types.h>
#include <util/config.h>
#include <util/message.h>
#include <util/prefix.h>
#include <util/run.h>
#include <util/suffix.h>
#include <util/tempfile.h>
#include <util/unicode.h>
#include <fstream>
Include dependency graph for c_preprocess.cpp:

Go to the source code of this file.

Functions

static void error_parse_line (const std::string &line, bool warning_only, messaget &message)
static void error_parse (std::istream &errors, bool warning_only, messaget &message)
bool c_preprocess (std::istream &instream, std::ostream &outstream, message_handlert &message_handler)
 ANSI-C preprocessing.
static bool is_dot_i_file (const std::string &path)
 ANSI-C preprocessing.
bool c_preprocess_codewarrior (const std::string &, std::ostream &, message_handlert &)
 ANSI-C preprocessing.
bool c_preprocess_arm (const std::string &file, std::ostream &outstream, message_handlert &message_handler)
 ANSI-C preprocessing.
bool c_preprocess_gcc_clang (const std::string &file, std::ostream &outstream, message_handlert &message_handler, configt::ansi_ct::preprocessort preprocessor)
 ANSI-C preprocessing.
bool c_preprocess_none (const std::string &file, std::ostream &outstream, message_handlert &message_handler)
 ANSI-C preprocessing.
bool c_preprocess_visual_studio (const std::string &file, std::ostream &outstream, message_handlert &message_handler)
 ANSI-C preprocessing.
bool c_preprocess (const std::string &path, std::ostream &outstream, message_handlert &message_handler)
void postprocess_codewarrior (std::istream &instream, std::ostream &outstream)
 post-processing specifically for CodeWarrior
bool test_c_preprocessor (message_handlert &message_handler)

Variables

const char c_test_program []
 tests ANSI-C preprocessing

Function Documentation

◆ c_preprocess() [1/2]

bool c_preprocess ( const std::string & path,
std::ostream & outstream,
message_handlert & message_handler )

Definition at line 200 of file c_preprocess.cpp.

◆ c_preprocess() [2/2]

bool c_preprocess ( std::istream & instream,
std::ostream & outstream,
message_handlert & message_handler )

ANSI-C preprocessing.

Definition at line 154 of file c_preprocess.cpp.

◆ c_preprocess_arm()

bool c_preprocess_arm ( const std::string & file,
std::ostream & outstream,
message_handlert & message_handler )

ANSI-C preprocessing.

Definition at line 660 of file c_preprocess.cpp.

◆ c_preprocess_codewarrior()

bool c_preprocess_codewarrior ( const std::string & file,
std::ostream & outstream,
message_handlert & message_handler )

ANSI-C preprocessing.

Definition at line 361 of file c_preprocess.cpp.

◆ c_preprocess_gcc_clang()

bool c_preprocess_gcc_clang ( const std::string & file,
std::ostream & outstream,
message_handlert & message_handler,
configt::ansi_ct::preprocessort preprocessor )

ANSI-C preprocessing.

Definition at line 429 of file c_preprocess.cpp.

◆ c_preprocess_none()

bool c_preprocess_none ( const std::string & file,
std::ostream & outstream,
message_handlert & message_handler )

ANSI-C preprocessing.

Definition at line 744 of file c_preprocess.cpp.

◆ c_preprocess_visual_studio()

bool c_preprocess_visual_studio ( const std::string & file,
std::ostream & outstream,
message_handlert & message_handler )

ANSI-C preprocessing.

Definition at line 235 of file c_preprocess.cpp.

◆ error_parse()

void error_parse ( std::istream & errors,
bool warning_only,
messaget & message )
static

Definition at line 142 of file c_preprocess.cpp.

◆ error_parse_line()

void error_parse_line ( const std::string & line,
bool warning_only,
messaget & message )
static

Definition at line 22 of file c_preprocess.cpp.

◆ is_dot_i_file()

bool is_dot_i_file ( const std::string & path)
static

ANSI-C preprocessing.

Definition at line 180 of file c_preprocess.cpp.

◆ postprocess_codewarrior()

void postprocess_codewarrior ( std::istream & instream,
std::ostream & outstream )

post-processing specifically for CodeWarrior

Definition at line 325 of file c_preprocess.cpp.

◆ test_c_preprocessor()

bool test_c_preprocessor ( message_handlert & message_handler)

Definition at line 780 of file c_preprocess.cpp.

Variable Documentation

◆ c_test_program

const char c_test_program[]
Initial value:
=
"#include <stdlib.h>\n"
"\n"
"int main() { }\n"

tests ANSI-C preprocessing

Definition at line 775 of file c_preprocess.cpp.