Skip to content

Commit

Permalink
[Sema] add test cases for D152495 NFC
Browse files Browse the repository at this point in the history
Ensure these don't regress the next time we reland D152495.

Link: ClangBuiltLinux/linux#1926

Reviewed By: cor3ntin, MaskRay

Differential Revision: https://reviews.llvm.org/D159307
  • Loading branch information
nickdesaulniers committed Aug 31, 2023
1 parent 2a2f02e commit cfa578c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clang/test/SemaCXX/warn-unused-variables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cfa578c

Please sign in to comment.