Run astyle. Fix some Doxygen issues

This commit is contained in:
Alexander Mai 2017-05-06 11:57:02 +02:00
parent 3e11eb9dca
commit c1cdcc158f
11 changed files with 24 additions and 26 deletions

View File

@ -62,7 +62,8 @@ bool isSameExpression(bool cpp, bool macro, const Token *tok1, const Token *tok2
* @param cpp c++ file
* @param cond1 condition1
* @param cond2 condition2
* @param constFunctions constFunctions
* @param library files data
* @param pure
*/
bool isOppositeCond(bool isNot, bool cpp, const Token * const cond1, const Token * const cond2, const Library& library, bool pure);

View File

@ -45,8 +45,6 @@ static bool checkNullpointerFunctionCallPlausibility(const Function* func, unsig
* @param tok first token
* @param var variables that the function read / write.
* @param library --library files data
* @param value 0 => invalid with null pointers as parameter.
* 1-.. => only invalid with uninitialized data.
*/
void CheckNullPointer::parseFunctionCall(const Token &tok, std::list<const Token *> &var, const Library *library)
{

View File

@ -848,7 +848,7 @@ bool MathLib::isFloatHex(const std::string& str)
bool MathLib::isValidIntegerSuffix(const std::string& str)
{
return isValidIntegerSuffix(str.begin(), str.end());
return isValidIntegerSuffix(str.begin(), str.end());
}
bool MathLib::isValidIntegerSuffix(std::string::const_iterator it, std::string::const_iterator end)

View File

@ -89,8 +89,8 @@ public:
static bool isOct(const std::string& str);
static bool isBin(const std::string& str);
static std::string getSuffix(const std::string& value);
static bool isValidIntegerSuffix(const std::string& str);
static std::string getSuffix(const std::string& value);
static bool isValidIntegerSuffix(const std::string& str);
static bool isValidIntegerSuffix(std::string::const_iterator it, std::string::const_iterator end);
static std::string add(const std::string & first, const std::string & second);

View File

@ -138,7 +138,7 @@ public:
/**
* @brief Check if the file extension indicates that it's a C/C++ source file.
* Check if the file has source file extension: *.c;*.cpp;*.cxx;*.c++;*.cc;*.txx
* @param filename filename to check. path info is optional
* @param path filename to check. path info is optional
* @param extra extra file extensions
* @return true if the file extension indicates it should be checked
*/
@ -153,7 +153,7 @@ public:
/**
* @brief Identify language based on file extension.
* @param extensionInLowerCase filename to check. path info is optional
* @param path filename to check. path info is optional
* @return true if extension is meant for C++ files
*/
static bool isCPP(const std::string &path);

View File

@ -174,7 +174,7 @@ public:
/**
* @brief Returns true if given id is in the list of
* enabled extra checks (--enable)
* @param check group to be enabled
* @param group group to be enabled
* @return true if the check is enabled.
*/
bool isEnabled(EnabledGroup group) const {

View File

@ -1085,7 +1085,7 @@ public:
/**
* @brief find a variable type if it's a user defined type
* @param start scope to start looking in
* @param type token containing variable type
* @param typeTok token containing variable type
* @return pointer to type if found or NULL if not found
*/
const Type *findVariableType(const Scope *start, const Token *typeTok) const;

View File

@ -435,7 +435,7 @@ public:
* string, return value is 0. If needle was not found, return
* value is -1.
*
* @param needle Current token
* @param tok Current token (needle)
* @param haystack e.g. "one|two" or "|one|two"
* @param varid optional varid of token
* @return 1 if needle is found from the haystack

View File

@ -95,7 +95,6 @@ public:
*
* @param FileName The filename
* @param configuration E.g. "A" for code where "#ifdef A" is true
* @param noSymbolDB_AST Disable creation of SymbolDatabase and AST
* @return false if source code contains syntax errors
*/
bool tokenize(std::istream &code,

View File

@ -129,15 +129,15 @@ void TokenList::addtoken(std::string str, const unsigned int lineno, const unsig
}
// Replace hexadecimal value with decimal
const bool isHex = MathLib::isIntHex(str) ;
const bool isHex = MathLib::isIntHex(str) ;
if (isHex || MathLib::isOct(str) || MathLib::isBin(str)) {
// TODO: It would be better if TokenList didn't simplify hexadecimal numbers
std::string suffix;
if (isHex &&
str.size() == (2 + _settings->int_bit / 4) &&
(str[2] >= '8') && // includes A-F and a-f
MathLib::getSuffix(str).empty()
)
MathLib::getSuffix(str).empty()
)
suffix = "U";
str = MathLib::value(str).str() + suffix;
}

View File

@ -51,7 +51,7 @@ private:
TEST_CASE(tokenize11);
TEST_CASE(tokenize13); // bailout if the code contains "@" - that is not handled well.
TEST_CASE(tokenize14); // tokenize "0X10" => 16
TEST_CASE(tokenizeHexWithSuffix); // tokenize 0xFFFFFFul
TEST_CASE(tokenizeHexWithSuffix); // tokenize 0xFFFFFFul
TEST_CASE(tokenize15); // tokenize ".123"
TEST_CASE(tokenize17); // #2759
TEST_CASE(tokenize18); // tokenize "(X&&Y)" into "( X && Y )" instead of "( X & & Y )"
@ -680,17 +680,17 @@ private:
ASSERT_EQUALS("; 292 ;", tokenizeAndStringify(";0444;"));
}
// Ticket #8050
void tokenizeHexWithSuffix() {
ASSERT_EQUALS("; 16777215 ;", tokenizeAndStringify(";0xFFFFFF;"));
ASSERT_EQUALS("; 16777215U ;", tokenizeAndStringify(";0xFFFFFFu;"));
ASSERT_EQUALS("; 16777215UL ;", tokenizeAndStringify(";0xFFFFFFul;"));
// Ticket #8050
void tokenizeHexWithSuffix() {
ASSERT_EQUALS("; 16777215 ;", tokenizeAndStringify(";0xFFFFFF;"));
ASSERT_EQUALS("; 16777215U ;", tokenizeAndStringify(";0xFFFFFFu;"));
ASSERT_EQUALS("; 16777215UL ;", tokenizeAndStringify(";0xFFFFFFul;"));
// Number of digits decides about internal representation...
ASSERT_EQUALS("; 4294967295U ;", tokenizeAndStringify(";0xFFFFFFFF;"));
ASSERT_EQUALS("; 4294967295U ;", tokenizeAndStringify(";0xFFFFFFFFu;"));
ASSERT_EQUALS("; 4294967295UL ;", tokenizeAndStringify(";0xFFFFFFFFul;"));
}
// Number of digits decides about internal representation...
ASSERT_EQUALS("; 4294967295U ;", tokenizeAndStringify(";0xFFFFFFFF;"));
ASSERT_EQUALS("; 4294967295U ;", tokenizeAndStringify(";0xFFFFFFFFu;"));
ASSERT_EQUALS("; 4294967295UL ;", tokenizeAndStringify(";0xFFFFFFFFul;"));
}
// Ticket #2429: 0.125
void tokenize15() {