We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53f7b5f commit daa62dfCopy full SHA for daa62df
1 file changed
lib/tokenize.cpp
@@ -9761,10 +9761,19 @@ void Tokenizer::simplifyCPPAttribute()
9761
Token* atok = nullptr;
9762
if (Token::Match(tok->previous(), "%name%"))
9763
atok = tok->previous();
9764
- else {
+ else if (Token::simpleMatch(tok->previous(), "]")) {
9765
+ atok = tok;
9766
+ while (atok && Token::simpleMatch(atok->previous(), "]")) {
9767
+ atok = atok->linkAt(-1);
9768
+ atok = atok ? atok->previous() : nullptr;
9769
+ }
9770
+ if (!Token::Match(atok, "%name%"))
9771
+ atok = nullptr;
9772
+ } else {
9773
atok = tok;
9774
while (isCPPAttribute(atok) || isAlignAttribute(atok))
9775
atok = skipCPPOrAlignAttribute(atok)->next();
9776
+ atok = atok ? getVariableTokenAfterAttributes(atok) : atok;
9777
}
9778
if (atok) {
9779
std::string a;
0 commit comments