Mercurial > hg > CbC > CbC_llvm
annotate clang/test/Sema/warn-unused-label.c @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 (2022-11-09) |
parents | 1d019706d866 |
children |
rev | line source |
---|---|
150 | 1 // RUN: %clang_cc1 -fsyntax-only -Wunused-label -verify %s |
2 | |
236 | 3 void f(void) { |
150 | 4 a: |
5 goto a; | |
6 b: // expected-warning{{unused}} | |
7 c: __attribute__((unused)); | |
8 d: __attribute__((noreturn)); // expected-warning {{'noreturn' attribute only applies to functions}} | |
9 goto d; | |
10 return; | |
11 } | |
12 | |
236 | 13 void PR8455(void) { |
150 | 14 L: __attribute__((unused)) return; // ok, no semicolon required |
15 } |