We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 030b120 commit 376b61aCopy full SHA for 376b61a
lib/tokenize.cpp
@@ -2016,7 +2016,7 @@ void Tokenizer::simplifyTypedefCpp()
2016
const bool isPointerTypeCall = !inOperator && Token::Match(tok2, "%name% ( )") && !pointers.empty();
2017
2018
// start substituting at the typedef name by replacing it with the type
2019
- const Token * const location = tok2;
+ const Token* location = tok2;
2020
for (Token* tok3 = typeStart; tok3 && (tok3->str() != ";"); tok3 = tok3->next())
2021
tok3->isSimplifiedTypedef(true);
2022
if (isPointerTypeCall) {
@@ -2081,6 +2081,7 @@ void Tokenizer::simplifyTypedefCpp()
2081
if (constTok && !functionPtr) {
2082
tok2 = simplifyTypedefInsertToken(tok2, "const", location);
2083
constTok->deleteThis();
2084
+ location = constTok;
2085
}
2086
2087
0 commit comments