Fix compile error in UnresolvedSetTest.cpp, again
authorJohn Brawn <john.brawn@arm.com>
Wed, 5 Jul 2023 16:53:12 +0000 (17:53 +0100)
committerJohn Brawn <john.brawn@arm.com>
Wed, 5 Jul 2023 16:54:50 +0000 (17:54 +0100)
My previous fix used a gcc-style attribute, but not all compilers will accept
that. Instead use [[maybe_unused]], which is what we use elsewhere for this
kind of thing.

clang/unittests/AST/UnresolvedSetTest.cpp

index 147c42e..ada857e 100644 (file)
@@ -5,7 +5,7 @@ namespace clang {
 class NamedDecl {
   // 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));
+  [[maybe_unused]] int dummy;
 
 public:
   NamedDecl() {}