Skip to content

Commit e1c8d76

Browse files
committed
handle using namespace std
1 parent 04fda78 commit e1c8d76

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/tokenize.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10361,6 +10361,8 @@ void Tokenizer::simplifyNamespaceStd()
1036110361
mSettings.library.podtype("std::" + tok->str()) ||
1036210362
isStdContainerOrIterator(tok, mSettings))
1036310363
insert = true;
10364+
else if (Token::simpleMatch(tok, "aligned_storage"))
10365+
insert = true;
1036410366

1036510367
if (insert) {
1036610368
tok->previous()->insertToken("std");
@@ -11186,10 +11188,10 @@ void Tokenizer::simplifyAlignedStorage()
1118611188
return;
1118711189

1118811190
for (Token *tok = list.front(); tok; tok = tok->next()) {
11189-
if (!Token::simpleMatch(tok, "aligned_storage <"))
11191+
if (!Token::simpleMatch(tok, "std :: aligned_storage <"))
1119011192
continue;
1119111193

11192-
tok = tok->next();
11194+
tok = tok->tokAt(3);
1119311195
const Token *end = tok->link();
1119411196
tok = tok->next();
1119511197

0 commit comments

Comments
 (0)