Skip to content

Commit 2583221

Browse files
Fix compile error in UnresolvedSetTest.cpp with -Wall
A stage 2 buildbot that compiles with -Wall -Werror is showing a failure because a dummy value is unused. Use the unused attribute to suppress the warning, and add a comment about why we have this value.
1 parent 60be17a commit 2583221

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/unittests/AST/UnresolvedSetTest.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
namespace clang {
55
class NamedDecl {
6-
int dummy;
6+
// DeclAccessPair assumes that NamedDecl is at least 4-byte aligned, so we
7+
// we need to have a dummy value to make this dummy NamedDecl also be aligned.
8+
int dummy __attribute__((unused));
79

810
public:
911
NamedDecl() {}

0 commit comments

Comments
 (0)