Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ Checks: >
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-redundant-inline-specifier,
-readability-simplify-boolean-expr,
-readability-use-concise-preprocessor-directives,
-readability-uppercase-literal-suffix,
-performance-avoid-endl,
Expand Down
4 changes: 2 additions & 2 deletions simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
return;
}
const std::string endOfRawString(')' + delim + currentToken);
while (stream.good() && !(endsWith(currentToken, endOfRawString) && currentToken.size() > 1))
while (stream.good() && (!endsWith(currentToken, endOfRawString) || currentToken.size() <= 1))
currentToken += stream.readChar();
if (!endsWith(currentToken, endOfRawString)) {
if (outputList) {
Expand Down Expand Up @@ -2053,7 +2053,7 @@ namespace simplecpp {
}

const Token *recursiveExpandToken(TokenList &output, TokenList &temp, const Location &loc, const Token *tok, const MacroMap &macros, const std::set<TokenString> &expandedmacros, const std::vector<const Token*> &parametertokens) const {
if (!(temp.cback() && temp.cback()->name && tok->next && tok->next->op == '(')) {
if (!temp.cback() || !temp.cback()->name || !tok->next || tok->next->op != '(') {
output.takeTokens(temp);
return tok->next;
}
Expand Down