We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e509e87 commit 9159179Copy full SHA for 9159179
clang/lib/Format/MacroExpander.cpp
@@ -191,9 +191,10 @@ MacroExpander::expand(FormatToken *ID,
191
auto expandArgument = [&](FormatToken *Tok) -> bool {
192
// If the current token references a parameter, expand the corresponding
193
// argument.
194
- if (Tok->isNot(tok::identifier) || ExpandedArgs.contains(Tok->TokenText))
+ if (Tok->isNot(tok::identifier))
195
+ return false;
196
+ if (!ExpandedArgs.insert(Tok->TokenText).second)
197
return false;
- ExpandedArgs.insert(Tok->TokenText);
198
auto I = Def.ArgMap.find(Tok->TokenText);
199
if (I == Def.ArgMap.end())
200
0 commit comments