CBMC
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. More...
 
static bool is_dot_i_file (const std::string &path)
 ANSI-C preprocessing. More...
 
bool c_preprocess_codewarrior (const std::string &, std::ostream &, message_handlert &)
 ANSI-C preprocessing. More...
 
bool c_preprocess_arm (const std::string &file, std::ostream &outstream, message_handlert &message_handler)
 ANSI-C preprocessing. More...
 
bool c_preprocess_gcc_clang (const std::string &file, std::ostream &outstream, message_handlert &message_handler, configt::ansi_ct::preprocessort preprocessor)
 ANSI-C preprocessing. More...
 
bool c_preprocess_none (const std::string &file, std::ostream &outstream, message_handlert &message_handler)
 ANSI-C preprocessing. More...
 
bool c_preprocess_visual_studio (const std::string &file, std::ostream &outstream, message_handlert &message_handler)
 ANSI-C preprocessing. More...
 
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 More...
 
bool test_c_preprocessor (message_handlert &message_handler)
 

Variables

const char c_test_program []
 tests ANSI-C preprocessing More...
 

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 644 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 363 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 431 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 715 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()

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

Definition at line 142 of file c_preprocess.cpp.

◆ error_parse_line()

static 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()

static 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 327 of file c_preprocess.cpp.

◆ test_c_preprocessor()

bool test_c_preprocessor ( message_handlert message_handler)

Definition at line 751 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 746 of file c_preprocess.cpp.