Cppcheck
|
File name and line number. More...
#include <errorlogger.h>
Public Member Functions | |
FileLocation () | |
FileLocation (const std::string &file, int line, int column) | |
FileLocation (const std::string &file, const std::string &info, int line, int column) | |
FileLocation (const Token *tok, const TokenList *tokenList) | |
FileLocation (const Token *tok, const std::string &info, const TokenList *tokenList) | |
std::string | getfile (bool convert=true) const |
Return the filename. More... | |
std::string | getOrigFile (bool convert=true) const |
Filename with the whole path (no –rp) More... | |
void | setfile (const std::string &file) |
Set the filename. More... | |
std::string | stringify () const |
std::string | getinfo () const |
void | setinfo (const std::string &i) |
Public Attributes | |
unsigned int | fileIndex |
int | line |
unsigned int | column |
Private Attributes | |
std::string | mOrigFileName |
std::string | mFileName |
std::string | mInfo |
File name and line number.
Internally paths are stored with / separator. When getting the filename it is by default converted to native separators.
Definition at line 156 of file errorlogger.h.
|
inline |
Definition at line 158 of file errorlogger.h.
|
inline |
Definition at line 162 of file errorlogger.h.
|
inline |
Definition at line 166 of file errorlogger.h.
ErrorLogger::ErrorMessage::FileLocation::FileLocation | ( | const Token * | tok, |
const TokenList * | tokenList | ||
) |
Definition at line 645 of file errorlogger.cpp.
ErrorLogger::ErrorMessage::FileLocation::FileLocation | ( | const Token * | tok, |
const std::string & | info, | ||
const TokenList * | tokenList | ||
) |
Definition at line 650 of file errorlogger.cpp.
std::string ErrorLogger::ErrorMessage::FileLocation::getfile | ( | bool | convert = true | ) | const |
Return the filename.
convert | If true convert path to native separators. |
Definition at line 655 of file errorlogger.cpp.
References mFileName, and Path::toNativeSeparators().
Referenced by CppCheck::checkFile(), and reportClangErrors().
|
inline |
Definition at line 202 of file errorlogger.h.
std::string ErrorLogger::ErrorMessage::FileLocation::getOrigFile | ( | bool | convert = true | ) | const |
Filename with the whole path (no –rp)
convert | If true convert path to native separators. |
Definition at line 662 of file errorlogger.cpp.
References mOrigFileName, and Path::toNativeSeparators().
void ErrorLogger::ErrorMessage::FileLocation::setfile | ( | const std::string & | file | ) |
Set the filename.
file | Filename to set. |
Definition at line 669 of file errorlogger.cpp.
References Path::fromNativeSeparators(), mFileName, and Path::simplifyPath().
Referenced by CppCheck::checkFile(), ErrorLogger::ErrorMessage::deserialize(), CppCheck::executeRules(), CTU::getFileInfo(), CTU::FileInfo::FunctionCall::loadFromXml(), Preprocessor::missingInclude(), CppCheck::purgedConfigurationMessage(), reportClangErrors(), CppCheck::tooManyConfigsError(), and CheckUnusedFunctions::unusedFunctionError().
|
inline |
Definition at line 205 of file errorlogger.h.
Referenced by ErrorLogger::ErrorMessage::deserialize(), CTU::FileInfo::getErrorPath(), CTU::getFileInfo(), and CTU::FileInfo::FunctionCall::loadFromXml().
std::string ErrorLogger::ErrorMessage::FileLocation::stringify | ( | ) | const |
Definition at line 676 of file errorlogger.cpp.
References line, mFileName, Suppressions::Suppression::NO_LINE, and Path::toNativeSeparators().
Referenced by TokenList::fileLine().
unsigned int ErrorLogger::ErrorMessage::FileLocation::column |
Definition at line 200 of file errorlogger.h.
Referenced by CTU::getFileInfo(), CTU::FileInfo::FunctionCall::loadFromXml(), plistLoc(), and reportClangErrors().
unsigned int ErrorLogger::ErrorMessage::FileLocation::fileIndex |
Definition at line 198 of file errorlogger.h.
Referenced by plistLoc().
int ErrorLogger::ErrorMessage::FileLocation::line |
Definition at line 199 of file errorlogger.h.
Referenced by CppCheck::executeRules(), CTU::getFileInfo(), CTU::FileInfo::FunctionCall::loadFromXml(), Preprocessor::missingInclude(), plistLoc(), reportClangErrors(), stringify(), and CheckUnusedFunctions::unusedFunctionError().
|
private |
Definition at line 211 of file errorlogger.h.
Referenced by getfile(), setfile(), and stringify().
|
private |
Definition at line 212 of file errorlogger.h.
|
private |
Definition at line 210 of file errorlogger.h.
Referenced by getOrigFile().