projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60be17a
)
Fix compile error in UnresolvedSetTest.cpp with -Wall
author
John Brawn
<john.brawn@arm.com>
Wed, 5 Jul 2023 16:39:59 +0000
(17:39 +0100)
committer
John Brawn
<john.brawn@arm.com>
Wed, 5 Jul 2023 16:39:59 +0000
(17:39 +0100)
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.
clang/unittests/AST/UnresolvedSetTest.cpp
patch
|
blob
|
history
diff --git
a/clang/unittests/AST/UnresolvedSetTest.cpp
b/clang/unittests/AST/UnresolvedSetTest.cpp
index
6c4d6db
..
147c42e
100644
(file)
--- 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() {}