mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
3cd2a1606f
* add correct GCC verno to ICG for llvm >= 10 Co-authored-by: Jacqueline Deans <jndeans@jslal0520121056.jsc.nasa.gov> Co-authored-by: Deans <jdeans289@gmail.com>
34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
|
|
#ifndef UTILITIES_HH
|
|
#define UTILITIES_HH
|
|
|
|
#include "clang/Frontend/CompilerInstance.h"
|
|
#include "clang/Basic/FileManager.h"
|
|
#include "clang/Basic/SourceLocation.h"
|
|
#include "HeaderSearchDirs.hh"
|
|
|
|
enum Color {
|
|
ERROR = 31,
|
|
WARNING = 33,
|
|
INFO = 34,
|
|
SKIP = 95
|
|
};
|
|
|
|
std::string sanitize(const std::string&) ;
|
|
std::string trim( const std::string& str, const std::string& whitespace = " \t\n\r" ) ;
|
|
bool isInUserCode( clang::CompilerInstance & ci , clang::SourceLocation sl , HeaderSearchDirs & hsd ) ;
|
|
bool isInUserOrTrickCode( clang::CompilerInstance & ci , clang::SourceLocation sl , HeaderSearchDirs & hsd ) ;
|
|
std::string getFileName( clang::CompilerInstance & ci , clang::SourceLocation sl , HeaderSearchDirs & hsd ) ;
|
|
char * almostRealPath( const std::string& in_path ) ;
|
|
char * almostRealPath( const char * in_path ) ;
|
|
|
|
std::string color(const Color& color, const std::string& text);
|
|
std::string bold(const std::string& text);
|
|
std::string underline(const std::string& text);
|
|
std::string underline(const std::string& text, unsigned length);
|
|
std::string quote(const std::string& text);
|
|
std::string & replace_special_chars( std::string & str);
|
|
int gccVersionToIntOrDefault(const char* verno, int def);
|
|
|
|
#endif
|