/llvm-project/clang/test/Sema/ |
H A D | c2x-fallthrough.c | 3 // This is the latest version of fallthrough that we support. 4 _Static_assert(__has_c_attribute(fallthrough) == 201910L); 10 [[fallthrough]]; // ok in f() 13 [[fallthrough]]; // ok in f() 19 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f() 22 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f() 25 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f() 27 do [[fallthrough]]; while (1); // expected-error {{does not directly precede switch label}} in f() 29 do [[fallthrough]]; while (0); // expected-error {{does not directly precede switch label}} in f() 35 [[fallthrough]]; in f() [all …]
|
H A D | fallthrough-attr.c | 1 // RUN: %clang_cc1 -fsyntax-only -std=gnu89 -verify -Wimplicit-fallthrough %s 2 // RUN: %clang_cc1 -fsyntax-only -std=gnu99 -verify -Wimplicit-fallthrough %s 3 // RUN: %clang_cc1 -fsyntax-only -std=c99 -verify -Wimplicit-fallthrough %s 4 // RUN: %clang_cc1 -fsyntax-only -std=c11 -verify -Wimplicit-fallthrough %s 5 // RUN: %clang_cc1 -fsyntax-only -std=c2x -DC2X -verify -Wimplicit-fallthrough %s 13 …tated fall-through between switch labels}} expected-note@-2{{insert '[[fallthrough]];' to silence … in fallthrough_attribute_spelling() 15 …rough between switch labels}} expected-note@-4{{insert '__attribute__((fallthrough));' to silence … in fallthrough_attribute_spelling() 18 __attribute__((fallthrough)); in fallthrough_attribute_spelling()
|
/llvm-project/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/ |
H A D | p1.cpp | 7 [[fallthrough]]; // ok in f() 10 [[fallthrough]]; // ok in f() 16 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f() 19 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f() 22 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f() 24 do [[fallthrough]]; while (true); // expected-error {{does not directly precede switch label}} in f() 26 do [[fallthrough]]; while (false); // expected-error {{does not directly precede switch label}} in f() 32 [[fallthrough]]; in f() 35 [[fallthrough]]; // expected-error {{does not directly precede switch label}} in f() 40 case 10: // no warning, -Wimplicit-fallthrough is not enabled in this test, and does not need to in f() [all …]
|
/llvm-project/clang/test/SemaCXX/ |
H A D | switch-implicit-fallthrough.cpp | 1 …%clang_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough -Wunreachable-code-fallthrough … 4 int fallthrough(int n) { in fallthrough() function 15 …d fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence … in fallthrough() 17 …d fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence … in fallthrough() 19 …d fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence … in fallthrough() 22 …d fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence … in fallthrough() 25 …d fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence … in fallthrough() 34 …d fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence … in fallthrough() 54 [[clang::fallthrough]]; in fallthrough() 57 [[clang::fallthrough]]; in fallthrough() [all …]
|
H A D | switch-implicit-fallthrough-macro.cpp | 1 …ify -std=c++11 -Wimplicit-fallthrough -DCLANG_PREFIX -DCOMMAND_LINE_FALLTHROUGH=[[clang::fallthrou… 2 …g_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough -DCOMMAND_LINE_FALLTHROUGH=[[fallthr… 3 …tax-only -verify -std=c++1z -Wimplicit-fallthrough -DCLANG_PREFIX -DCOMMAND_LINE_FALLTHROUGH=[[cla… 4 …c1 -fsyntax-only -verify -std=c++1z -Wimplicit-fallthrough -DCOMMAND_LINE_FALLTHROUGH=[[clang::fal… 5 …ly -verify -std=c++1z -Wimplicit-fallthrough -DCOMMAND_LINE_FALLTHROUGH=[[fallthrough]] -DUNCHOSEN… 19 :: fallthrough ] ] // testing whitespace and comments in macro definition 22 fallthrough ] ] // testing whitespace and comments in macro definition 37 #define M1 [[clang::fallthrough]] 39 #define M1 [[fallthrough]] 47 #define WRONG_MACRO1 clang::fallthrough [all …]
|
H A D | switch-implicit-fallthrough-per-method.cpp | 1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough-per-function %s 4 int fallthrough(int n) { in fallthrough() function 8 …ed-warning{{unannotated fall-through}} expected-note{{insert '[[clang::fallthrough]];' to silence … in fallthrough() 12 [[clang::fallthrough]]; in fallthrough() 15 …ed-warning{{unannotated fall-through}} expected-note{{insert '[[clang::fallthrough]];' to silence … in fallthrough() 44 [[fallthrough]]; in unscoped() 46 [[clang::fallthrough]]; in unscoped()
|
/llvm-project/llvm/test/Transforms/CodeGenPrepare/X86/ |
H A D | sink-addrmode-base.ll | 12 br i1 %cond, label %if.then, label %fallthrough 16 br label %fallthrough 18 fallthrough: 20 ; CHECK-NO-LABEL: fallthrough: 33 br i1 %cond, label %if.then, label %fallthrough 37 br label %fallthrough 39 fallthrough: 52 br i1 %cond, label %if.then, label %fallthrough 56 br label %fallthrough 58 fallthrough: [all …]
|
H A D | sink-addrmode-inseltpoison.ll | 15 br i1 %cond, label %if.then, label %fallthrough 19 br label %fallthrough 21 fallthrough: 32 br i1 %cond, label %if.then, label %fallthrough 40 br i1 %cmp, label %next, label %fallthrough 47 br label %fallthrough 49 fallthrough: 59 br i1 %cond, label %if.then, label %fallthrough 69 br label %fallthrough 71 fallthrough: [all …]
|
H A D | sink-addrmode.ll | 15 br i1 %cond, label %if.then, label %fallthrough 19 br label %fallthrough 21 fallthrough: 32 br i1 %cond, label %if.then, label %fallthrough 40 br i1 %cmp, label %next, label %fallthrough 47 br label %fallthrough 49 fallthrough: 59 br i1 %cond, label %if.then, label %fallthrough 69 br label %fallthrough 71 fallthrough: [all …]
|
H A D | nonintegral.ll | 16 br i1 %cond, label %if.then, label %fallthrough 20 br label %fallthrough 22 fallthrough: 37 br i1 %cond, label %if.then, label %fallthrough 41 br label %fallthrough 43 fallthrough: 58 br i1 %cond, label %if.then, label %fallthrough 62 br label %fallthrough 64 fallthrough:
|
/llvm-project/llvm/test/CodeGen/WebAssembly/ |
H A D | simd-load-lane-offset.ll | 21 ; CHECK-NEXT: # fallthrough-return 29 ; MEM64-NEXT: # fallthrough-return 44 ; CHECK-NEXT: # fallthrough-return 56 ; MEM64-NEXT: # fallthrough-return 74 ; CHECK-NEXT: # fallthrough-return 84 ; MEM64-NEXT: # fallthrough-return 100 ; CHECK-NEXT: # fallthrough-return 110 ; MEM64-NEXT: # fallthrough-return 126 ; CHECK-NEXT: # fallthrough-return 138 ; MEM64-NEXT: # fallthrough-return [all …]
|
H A D | simd-offset.ll | 17 ; CHECK-NEXT: # fallthrough-return 28 ; CHECK-NEXT: # fallthrough-return 41 ; CHECK-NEXT: # fallthrough-return 55 ; CHECK-NEXT: # fallthrough-return 71 ; CHECK-NEXT: # fallthrough-return 83 ; CHECK-NEXT: # fallthrough-return 99 ; CHECK-NEXT: # fallthrough-return 113 ; CHECK-NEXT: # fallthrough-return 129 ; CHECK-NEXT: # fallthrough-return 145 ; CHECK-NEXT: # fallthrough-return [all …]
|
H A D | simd-load-store-alignment.ll | 18 ; CHECK-NEXT: # fallthrough-return 29 ; CHECK-NEXT: # fallthrough-return 41 ; CHECK-NEXT: # fallthrough-return 53 ; CHECK-NEXT: # fallthrough-return 65 ; CHECK-NEXT: # fallthrough-return 77 ; CHECK-NEXT: # fallthrough-return 90 ; CHECK-NEXT: # fallthrough-return 103 ; CHECK-NEXT: # fallthrough-return 115 ; CHECK-NEXT: # fallthrough-return 129 ; CHECK-NEXT: # fallthrough-return [all …]
|
H A D | simd-select.ll | 23 ; CHECK-NEXT: # fallthrough-return 38 ; CHECK-NEXT: # fallthrough-return 53 ; CHECK-NEXT: # fallthrough-return 68 ; CHECK-NEXT: # fallthrough-return 82 ; CHECK-NEXT: # fallthrough-return 96 ; CHECK-NEXT: # fallthrough-return 114 ; CHECK-NEXT: # fallthrough-return 129 ; CHECK-NEXT: # fallthrough-return 144 ; CHECK-NEXT: # fallthrough-return 159 ; CHECK-NEXT: # fallthrough-return [all …]
|
H A D | simd-extending.ll | 14 ; CHECK-NEXT: # fallthrough-return 27 ; CHECK-NEXT: # fallthrough-return 40 ; CHECK-NEXT: # fallthrough-return 53 ; CHECK-NEXT: # fallthrough-return 66 ; CHECK-NEXT: # fallthrough-return 79 ; CHECK-NEXT: # fallthrough-return 92 ; CHECK-NEXT: # fallthrough-return 105 ; CHECK-NEXT: # fallthrough-return 118 ; CHECK-NEXT: # fallthrough-return 131 ; CHECK-NEXT: # fallthrough-return [all …]
|
H A D | masked-shifts.ll | 15 ; CHECK-NEXT: # fallthrough-return 28 ; CHECK-NEXT: # fallthrough-return 41 ; CHECK-NEXT: # fallthrough-return 54 ; CHECK-NEXT: # fallthrough-return 67 ; CHECK-NEXT: # fallthrough-return 80 ; CHECK-NEXT: # fallthrough-return 93 ; CHECK-NEXT: # fallthrough-return 110 ; CHECK-NEXT: # fallthrough-return 128 ; CHECK-NEXT: # fallthrough-return 145 ; CHECK-NEXT: # fallthrough-return [all …]
|
H A D | multivalue-stackify.ll | 29 ; CHECK-NEXT: # fallthrough-return 42 ; CHECK-NEXT: # fallthrough-return 54 ; CHECK-NEXT: # fallthrough-return 71 ; CHECK-NEXT: # fallthrough-return 88 ; CHECK-NEXT: # fallthrough-return 102 ; CHECK-NEXT: # fallthrough-return 121 ; CHECK-NEXT: # fallthrough-return 140 ; CHECK-NEXT: # fallthrough-return 156 ; CHECK-NEXT: # fallthrough-return 174 ; CHECK-NEXT: # fallthrough-return [all …]
|
H A D | simd-load-zero-offset.ll | 18 ; CHECK-NEXT: # fallthrough-return 30 ; CHECK-NEXT: # fallthrough-return 45 ; CHECK-NEXT: # fallthrough-return 60 ; CHECK-NEXT: # fallthrough-return 75 ; CHECK-NEXT: # fallthrough-return 92 ; CHECK-NEXT: # fallthrough-return 105 ; CHECK-NEXT: # fallthrough-return 119 ; CHECK-NEXT: # fallthrough-return 135 ; CHECK-NEXT: # fallthrough-return 147 ; CHECK-NEXT: # fallthrough-return [all …]
|
/llvm-project/llvm/test/Transforms/SimplifyCFG/ |
H A D | merge-cond-stores.ll | 21 br i1 %x1, label %fallthrough, label %yes1 25 br label %fallthrough 27 fallthrough: 56 br i1 %x1, label %yes1, label %fallthrough 60 br label %fallthrough 62 fallthrough: 97 br i1 %x1, label %fallthrough, label %yes1 101 br label %fallthrough 103 fallthrough: 138 ; CHECK-NEXT: br i1 [[X1]], label [[FALLTHROUGH:%.*]], label [[YES1:%.*]] [all …]
|
/llvm-project/clang/test/Preprocessor/ |
H A D | has_attribute.cpp | 8 // CHECK: clang::fallthrough: 1 9 CXX11(clang::fallthrough) 23 // CHECK: _Clang::fallthrough: 1 24 CXX11(_Clang::fallthrough) 53 CXX11(fallthrough) 66 // CHECK: fallthrough: 201603L 80 #define F fallthrough 81 #define CF clang::fallthrough 98 #if __has_cpp_attribute(C::fallthrough) 109 #if __has_cpp_attribute(FUNCLIKE1(fallthrough)) [all …]
|
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/ |
H A D | branch-clone-fallthrough.cpp | 7 case 1: [[fallthrough]]; in testSwitchFallthroughAttribute() 8 case 2: [[fallthrough]]; in testSwitchFallthroughAttribute() 19 case 1: { [[fallthrough]]; } in testSwitchFallthroughAttributeAndBraces() 20 case 2: { [[fallthrough]]; } in testSwitchFallthroughAttributeAndBraces() 33 case 1: value += 1; [[fallthrough]]; in testSwitchWithFallthroughAttributeAndCode() 34 case 2: value += 1; [[fallthrough]]; in testSwitchWithFallthroughAttributeAndCode() 59 case 1: [[fallthrough]]; in testSwitchFallthroughAttributeIntoDefault() 60 case 2: [[fallthrough]]; in testSwitchFallthroughAttributeIntoDefault()
|
/llvm-project/llvm/lib/Target/X86/MCTargetDesc/ |
H A D | X86InstComments.cpp | 334 [[fallthrough]]; in printFMAComments() 349 [[fallthrough]]; in printFMAComments() 366 [[fallthrough]]; in printFMAComments() 383 [[fallthrough]]; in printFMAComments() 401 [[fallthrough]]; in printFMAComments() 415 [[fallthrough]]; in printFMAComments() 431 [[fallthrough]]; in printFMAComments() 442 [[fallthrough]]; in printFMAComments() 453 [[fallthrough]]; in printFMAComments() 464 [[fallthrough]]; in printFMAComments() [all...] |
/llvm-project/clang/test/CodeGen/ |
H A D | asm-goto.c | 8 // CHECK: to label %asm.fallthrough [label %label_true, label %loop] in test1() 9 // CHECK-LABEL: asm.fallthrough: in test1() 25 // CHECK: to label %asm.fallthrough [label %label_true.split, label %loop.split] in test2() 26 // CHECK-LABEL: asm.fallthrough: in test2() 42 // CHECK: to label %asm.fallthrough [label %label_true.split, label %loop.split] in test3() 43 // CHECK-LABEL: asm.fallthrough: in test3() 59 // CHECK: to label %asm.fallthrough [label %label_true.split, label %loop.split] in test4() 60 // CHECK-LABEL: asm.fallthrough: in test4() 78 // CHECK: to label %asm.fallthrough [label %t_err.split] in test5() 79 // CHECK-LABEL: asm.fallthrough: in test5() [all …]
|
/llvm-project/clang/test/CXX/drs/ |
H A D | cwg24xx.cpp | 11 void fallthrough(int n) { 17 [[fallthrough]]; in fallthrough() 18 case 3: // warning on fallthrough discouraged in fallthrough() 20 [[fallthrough]]; in fallthrough() 21 // since-cxx17-error@-1 {{fallthrough annotation does not directly precede switch label}} in fallthrough() 25 [[fallthrough]]; in fallthrough() 26 // since-cxx17-error@-1 {{fallthrough annotation does not directly precede switch label}} in fallthrough() 30 [[fallthrough]]; in fallthrough() 31 // since-cxx17-error@-1 {{fallthrough annotation does not directly precede switch label}} in fallthrough() 35 case 4: // implementation may warn on fallthrough in fallthrough() 15 void fallthrough(int n) { fallthrough() function [all...] |
/llvm-project/offload/DeviceRTL/src/ |
H A D | Parallelism.cpp | 206 [[fallthrough]]; in __kmpc_parallel_51() 209 [[fallthrough]]; in __kmpc_parallel_51() 212 [[fallthrough]]; in __kmpc_parallel_51() 215 [[fallthrough]]; in __kmpc_parallel_51() 218 [[fallthrough]]; in __kmpc_parallel_51() 221 [[fallthrough]]; in __kmpc_parallel_51() 224 [[fallthrough]]; in __kmpc_parallel_51() 227 [[fallthrough]]; in __kmpc_parallel_51() 230 [[fallthrough]]; in __kmpc_parallel_51() 233 [[fallthrough]]; in __kmpc_parallel_51() [all...] |