From: John Brawn Date: Wed, 5 Jul 2023 16:39:59 +0000 (+0100) Subject: Fix compile error in UnresolvedSetTest.cpp with -Wall X-Git-Tag: upstream/17.0.6~2846 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=258322105892bd895a89ccbe89487885581f5a47;p=platform%2Fupstream%2Fllvm.git 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. --- diff --git a/clang/unittests/AST/UnresolvedSetTest.cpp b/clang/unittests/AST/UnresolvedSetTest.cpp index 6c4d6db..147c42e 100644 --- a/clang/unittests/AST/UnresolvedSetTest.cpp +++ b/clang/unittests/AST/UnresolvedSetTest.cpp @@ -3,7 +3,9 @@ namespace clang { class NamedDecl { - int dummy; + // DeclAccessPair assumes that NamedDecl is at least 4-byte aligned, so we + // we need to have a dummy value to make this dummy NamedDecl also be aligned. + int dummy __attribute__((unused)); public: NamedDecl() {}