1 // RUN: %clang_cc1 -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -std=c++11 %s | FileCheck %s 2 3 #define BREAK break 4 5 enum class MD { 6 Val1, 7 Val2 8 }; 9 10 void nop() {} 11 12 // CHECK: foo 13 // CHECK-NEXT: File 0, [[@LINE+1]]:16 -> {{[0-9]+}}:2 = #0 14 void foo(MD i) { 15 switch (i) { 16 #define HANDLE_MD(X) \ 17 case MD::X: \ 18 break; 19 #include "Inputs/md.def" 20 default: 21 BREAK; 22 } 23 24 if (false) 25 nop(); 26 #define HANDLE_MD(X) else if (i == MD::X) { nop(); } 27 #include "Inputs/md.def" 28 } 29 30 int main(int argc, const char *argv[]) { 31 foo(MD::Val1); 32 return 0; 33 } 34