1 // RUN: not %clang_cc1 -fsyntax-only -std=c++14 -code-completion-at=%s:28:5 -fopenmp %s -o - 2>&1 | FileCheck %s 2 template <class T> 3 auto make_func() { 4 struct impl { 5 impl* func() { 6 int x; 7 if (x = 10) { 8 #pragma omp parallel 9 ; 10 } 11 // Check that body of this function is actually skipped. 12 // CHECK-NOT: crash-skipped-bodies-template-inst.cpp:7:{{[0-9]+}}: warning: using the result of an assignment as a condition without parentheses 13 return this; 14 } 15 }; 16 17 int x; 18 if (x = 10) {} 19 // Check that this function is not skipped. 20 // CHECK: crash-skipped-bodies-template-inst.cpp:18:9: warning: using the result of an assignment as a condition without parentheses 21 return impl(); 22 } 23 Test()24void foo() { 25 []() { 26 make_func<int>(); 27 m 28 // CHECK: COMPLETION: make_func : [#auto#]make_func<<#class T#>>() 29 }; 30 } 31