[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: [clang] cfa578c - [Sema] add test cases for D152495 NFC
From: Nick Desaulniers via cfe-commits <cfe-commits () lists ! llvm ! org>
Date: 2023-08-31 21:18:16
Message-ID: 64f10398.170a0220.e2ab1.39de () mx ! google ! com
[Download RAW message or body]
Author: Nick Desaulniers
Date: 2023-08-31T14:17:41-07:00
New Revision: cfa578cde0314935c6eb5d7fa19ec26390d431dd
URL: https://github.com/llvm/llvm-project/commit/cfa578cde0314935c6eb5d7fa19ec26390d431dd
DIFF: https://github.com/llvm/llvm-project/commit/cfa578cde0314935c6eb5d7fa19ec26390d431dd.diff
LOG: [Sema] add test cases for D152495 NFC
Ensure these don't regress the next time we reland D152495.
Link: https://github.com/ClangBuiltLinux/linux/issues/1926
Reviewed By: cor3ntin, MaskRay
Differential Revision: https://reviews.llvm.org/D159307
Added:
Modified:
clang/test/SemaCXX/warn-unused-variables.cpp
Removed:
################################################################################
diff --git a/clang/test/SemaCXX/warn-unused-variables.cpp b/clang/test/SemaCXX/warn-unused-variables.cpp
index 4db8bdf12e5de0..1d5aa729dda68a 100644
--- a/clang/test/SemaCXX/warn-unused-variables.cpp
+++ b/clang/test/SemaCXX/warn-unused-variables.cpp
@@ -46,6 +46,9 @@ void unused_local_static() {
static int x = 0;
static int y = 0; // expected-warning{{unused variable 'y'}}
#pragma unused(x)
+ static __attribute__((used)) int z;
+ static __attribute__((unused)) int w;
+ [[maybe_unused]] static int v;
}
// PR10168
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic