Skip to content

Commit 4f7b5e6

Browse files
committed
Fix a tablegen pattern that results in a warning; NFC
We were generating `1 || 1` which caused some issues for -Werror builds
1 parent ddea4fe commit 4f7b5e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/utils/TableGen/ClangAttrEmitter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3739,7 +3739,8 @@ static void GenerateHasAttrSpellingStringSwitch(
37393739
: '(' + itostr(Version) + ')';
37403740

37413741
if (Scope.empty() || Scope == Spelling.nameSpace()) {
3742-
if (TestStringMap.contains(Spelling.name()))
3742+
if (TestStringMap.contains(Spelling.name()) &&
3743+
TestStringMap[Spelling.name()] != TestStr)
37433744
TestStringMap[Spelling.name()] += " || " + TestStr;
37443745
else
37453746
TestStringMap[Spelling.name()] = TestStr;

0 commit comments

Comments
 (0)