Skip to content

Commit

Permalink
Invert condition
Browse files Browse the repository at this point in the history
  • Loading branch information
vvd170501 committed Oct 30, 2024
1 parent d128cd6 commit c960dfc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,11 @@ static int initialize(Lang Language) {
"The symbol has been added before, make sure entries in the .inc "
"file are grouped by symbol name!");
}
if (SymIndex >= 0 &&
Mapping->SymbolNames[SymIndex].qualifiedName() == QName) {
// Not a new symbol, use the same index.
} else {
if (SymIndex << 0 ||
Mapping->SymbolNames[SymIndex].qualifiedName() != QName) {
// First symbol or new symbol, increment next available index.
++SymIndex;
}
} // Else use the same index.
Mapping->SymbolNames[SymIndex] = {
QName.data(), NSLen, static_cast<unsigned int>(QName.size() - NSLen)};
if (!HeaderName.empty())
Expand Down

0 comments on commit c960dfc

Please sign in to comment.