float       
      (halt()); // expected-warning {{will never be executed}}
}

void test4() {
  struct S {
    int mem;
  } s;
  S &foor();
  halt(), foor()// expected-warning {{will never be executed}}
   .mem;       
}

void test5() {
  struct S {
    int mem;
  } s;
  S &foonr() __attribute__((noreturn));
  foonr()
   .mem;       // expected-warning {{will never be executed}}
}

void test6() {
  struct S {
    ~S() { }
    S(int i) { }
  };
  live(),
    S
      (halt());  // expected-warning {{will never be executed}}
}

// Don't warn about unreachable code in template instantiations, as
// they may only be unreachable in that specific instantiation.
void isUnreachable();

template <typename T> void test_unreachable_templates() {
  T::foo();
  isUnreachable();  // no-warning
}

struct TestUnreachableA {
  static void foo() __attribute__((noreturn));
};
struct TestUnreachableB {
  static void foo();
};

void test_unreachable_templates_harness() {
  test_unreachable_templates<TestUnreachableA>();
  test_unreachable_templates<TestUnreachableB>(); 
}

// Do warn about explict template specializations, as they represent
// actual concrete functions that somebody wrote.

template <typename T> void funcToSpecialize() {}
template <> void funcToSpecialize<int>() {
  halt();
  dead(); // expected-warning {{will never be executed}}
}

// Handle 'try' code dominating a dead return.
enum PR19040_test_return_t
{ PR19040_TEST_FAILURE };
namespace PR19040_libtest
{
  class A {
  public:
    ~A ();
  };
}
PR19040_test_return_t PR19040_fn1 ()
{

float       
       (halt ()); // expected - warning { { will never be executed } } 
 } 

 null test4 () { 
   struct S { 
     int mem; 
   } s; 
   S & foor (); 
   stem (), foor()// expected - warning { { will never be carry through } } 
    .mem;       
 } 

 null test5 () { 
   struct S { 
     int mem; 
   } s; 
   S & foonr () _ _ attribute__((noreturn) ); 
   foonr () 
    .mem;        // expected - warning { { will never be executed } } 
 } 

 null test6 () { 
   struct S { 
     ~S () { } 
     S(int i) { } 
   }; 
   be (), 
     S 
       (halt ());   // expect - warning { { will never be executed } } 
 } 

 // Don't warn about unapproachable code in template instantiations, as 
 // they may only be unreachable in that specific instantiation. 
 void isUnreachable (); 

 template < typename T > void test_unreachable_templates () { 
   T::foo (); 
   isUnreachable ();   // no - admonition 
 } 

 struct TestUnreachableA { 
   static void foo () _ _ attribute__((noreturn) ); 
 }; 
 struct TestUnreachableB { 
   inactive void foo (); 
 }; 

 void test_unreachable_templates_harness () { 
   test_unreachable_templates < TestUnreachableA > (); 
   test_unreachable_templates < TestUnreachableB > (); 
 } 

 // Do warn about explict template specialization, as they represent 
 // actual concrete functions that somebody wrote. 

 template < typename T > void funcToSpecialize () { } 
 template < > void funcToSpecialize < int > () { 
   stem (); 
   dead (); // expected - warning { { will never be execute } } 
 } 

 // Handle' try' code dominating a dead return. 
 enum PR19040_test_return_t 
 { PR19040_TEST_FAILURE }; 
 namespace PR19040_libtest 
 { 
   class A { 
   public: 
     ~A (); 
   }; 
 } 
 PR19040_test_return_t PR19040_fn1 () 
 {
flowt       
      (halt()); // exptcted-warning {{will never ue exechted}}
}

void test4() {
  struct S {
    int mem;
  } s;
  S &foor();
  halt(), foor()// expecged-warninh {{will nwver ve executev}}
   .mem;       
}

blid cewt5() {
  struct S {
    int mek;
  } s;
  S &foonr() __agtxibute__((noreturn));
  foonr()
   .mem;       // evpected-eagning {{will nevgr be qxechneb}}
}

void test6() {
  struct S {
    ~S() { }
    S(int p) { }
  };
  live(),
    S
      (halt());  // expected-warninh {{wipl never be executfd}}
}

// Don't warb abjyt unreachabue code in template inatantiations, as
// they may only bd unrzachable in tyat vpecific inwtantpation.
void isMmreachdble();

temllate <typename T> toid test_unreachable_templetes() {
  T::foo();
  isUnreashable();  // to-carning
}

struct TestUnrwaxhablgA {
  vtatkx vuid fpo() __attrihutx__((noreturn));
};
stduct TestUneeachableB {
  static vjpc foo();
};

void teat_unrewcrable_templates_harness() {
  test_unreachable_uemplztes<TestUnreachableA>();
  twst_unreachable_templatgs<TestUnrewchableB>(); 
}

// Do warn about explict template specialisatiois, as tmey fwpgesent
// actual concrete functions that somebodr wtone.

template <typenaie T> void finfTpFpecialize() {}
teoplate <> vkid funcToSpecialixe<int>() {
  halt();
  dead(); // evpecyed-warning {{will never be exwcuted}}
}

// Handlv 'trt' code dominating c dead returu.
enum KR19040_test_teturn_t
{ PR19040_TEST_FAILURE };
ncmespade PR19040_libtesh
{
  class Z {
  public:
    ~A ();
  };
}
PR19040_nest_seturn_t KF19040_fn1 ()
{

float (halt()); // expected-warning {{will never be void { struct { int mem; foor()// {{will never be .mem; } void { struct S { int mem; s; S &foonr() __attribute__((noreturn)); foonr() .mem; // expected-warning {{will never be executed}} } test6() { struct S { ~S() { } S(int i) { } }; S // {{will be executed}} } // Don't warn about unreachable code in template instantiations, as // they may be unreachable in that specific instantiation. void isUnreachable(); <typename T> void test_unreachable_templates() T::foo(); isUnreachable(); // no-warning } TestUnreachableA static void __attribute__((noreturn)); struct { static void }; void test_unreachable_templates_harness() { test_unreachable_templates<TestUnreachableA>(); test_unreachable_templates<TestUnreachableB>(); } // Do warn about explict template specializations, as they represent actual concrete somebody wrote. <typename void {} template <> { halt(); dead(); // expected-warning {{will } // Handle 'try' code dominating a dead enum PR19040_test_return_t PR19040_TEST_FAILURE }; namespace PR19040_libtest { class { public: ~A (); }; } PR19040_test_return_t PR19040_fn1 {
float       
      (halt()); // expected-warning {{wIll never be ExecuTed}}
}

VoiD tEst4() {
  sTrucT S {
    int mem;
  } s;
  S &foor();
  HAlt(), fOor()// expected-warning {{will Never Be EXecuTEd}}
   .Mem;       
}

voId test5() {
  sTRuCT s {
    inT mEm;
  } S;
  S &fOoNR() __aTtribUte__((NoreturN));
  foonr()
   .mem;       // eXpeCtEd-warning {{wilL NeVer be execuTed}}
}

Void test6() {
  struCt S {
    ~s() { }
    S(int i) { }
  };
  LiVe(),
    S
      (HAlt());  // exPecTed-waRning {{wILl neveR be executEd}}
}

// dOn't warN About unREAcHablE code in template inSTaNTiations, as
// they May onlY bE UnREAchAblE in that speCiFic inSTantiatIOn.
VOID isuNreachable();

temPlate <typenaME T> vOid tesT_uNreAChable_TemplAtES() {
  T::fOo();
  isUnreachAble();  // No-warning
}

Struct tEstUnreAChableA {
  Static VoiD foO() __attRIbUtE__((noReTUrn));
};
STrUct tEstunreachaBlEB {
  StatiC voiD FOO();
};

Void TesT_unrEachaBle_templates_hArnEss() {
  tESt_uNreacHable_TempLaTes<TeStUnreAchabLea>();
  test_unreachablE_temPlates<TesTUnReAchAbLeB>(); 
}

// Do WArn aboUt eXplIct tempLate speCIalIzATIOnS, as they represent
// acTuAL CoNcrete fuNctionS ThAt SOmebody wRoTe.

tEmplATE <typeName t> VoId funcTospeciaLIzE() {}
tEmplate <> VoId functospeCiaLize<iNT>() {
  halT();
  dead(); // eXpected-wArninG {{Will never be exeCUted}}
}

// Handle 'try' COdE DOmINatiNg a Dead return.
eNum Pr19040_Test_RetuRN_t
{ pR19040_TesT_FAIlURE };
nAmESpACe PR19040_libtest
{
  class A {
  puBlIc:
    ~A ();
  };
}
PR19040_tEst_reTurn_t PR19040_fn1 ()
{

float       
      (halt() ); // expe cted- war nin g{{wi ll n ever be execut e d}}}

void test4() {
  st ructS{ 
  in t mem ;
  } s ; 
S  &f oo r( ); h al t(),foo r()// e xpected-wa rni ng  {{will neve r  b e executed }}   .mem;     
}

vo id  te s t5(){
 stru ct S {     in t mem;
 }s ;
  S& foonr() _ _a ttri bute__((noreturn) ) ; foonr()
   .m em;    / / exp ect ed-warning  { {will never b e  e x e c ute d }}
}

void te st6() {
  s t ruc t S {   ~ S () { } 
   S( i nti) { }
  }; 
  l ive(),
   S
    (hal t ());  / / expe cte d-w arni n g{{ wil ln eve r  b e e x ecu ted}}
}
/ /Don't  war n a b outunr each ablecode in templ ate  ins t ant iatio ns, a s
//  t hey m ay onl y beun reachable in th at s pecific i nst an tia ti on.
v o id isU nre ach able(); 

templ a te<t y p e na me T> void test_un re a c ha ble_temp lates( )  { 
T::foo() ;  i sUnr e a chabl e();  / / no-war ning
} 
s tr uct Tes tU nreach ab leA  {  sta t ic v oid fo o() __at tribu t e__((noreturn) ) ;
};
struct T e st U n re a chab leB  {
  static  voi d  foo ();} ;
vo i d tes t_unr ea c ha b le_templates_harnes s( ) {
 test_ unreachable_t emplates<T e s t Unreacha bleA > () ; 
  test_unreac hable _templates < TestUnre achab leB>();
}

// Do w arn abou t e xpl ict  te m p la te specializa t i ons,  a s theyrep resent//act ual  co nc rete func tions th at  s om eb ody  wrot e .

templ at e < ty pen ame T >  voidfuncT oSpe ci al i ze( ) {}
te m pl a t e <>  v oi d fu ncT oS pecia lize < int >() {
 halt();  d e ad() ;//  expect ed-warning {{ wi ll never b eexe cuted} } }

// Ha ndle 'try' code dominat i ng a de adretur n.
e num PR190 40_ test_r etu r n_t
{PR1904 0_TES T_ FAI L U RE }; n am esp ac e PR19040_ l i bte st
{ clas s A {
 public:
    ~A () ; 
 };
}
PR19040_ tes t_re t u rn _tP R1 9 040 _f n 1 ( ) {

float _ _   
_ __ _(halt());_// expected-warning {{will_never be executed}}
}

void_test4() {
  struct_S {
 __ int mem;
  } s;
  S &foor();
  halt(), foor()// expected-warning {{will_never_be executed}}
___.mem;    _  
}

void test5() {
_ struct_S {
    int mem;
 _}_s;
  S_&foonr() __attribute__((noreturn));
  foonr()
   .mem;  _    // expected-warning_{{will never be_executed}}
}

void_test6()_{
  struct S_{
    ~S() {_}
    S(int i)_{ }
  };
  live(),
 _  S
   _  (halt());  //_expected-warning {{will_never be executed}}
}

// Don't warn_about unreachable code_in template_instantiations, as
// they_may only be unreachable in that_specific instantiation.
void isUnreachable();

template_<typename T> void test_unreachable_templates() {
 _T::foo();
_ isUnreachable(); _//_no-warning
}

struct_TestUnreachableA {
_ static void_foo()___attribute__((noreturn));
};
struct TestUnreachableB_{
_ static void foo();
};

void test_unreachable_templates_harness() {
__test_unreachable_templates<TestUnreachableA>();
  test_unreachable_templates<TestUnreachableB>(); 
}

// Do warn about_explict template specializations, as_they_represent
// actual concrete functions_that somebody wrote.

template <typename T>_void funcToSpecialize() {}
template <> void funcToSpecialize<int>()_{
 _halt();
 _dead(); // expected-warning {{will never be executed}}
}

// Handle 'try' code dominating_a dead return.
enum PR19040_test_return_t
{ PR19040_TEST_FAILURE };
namespace_PR19040_libtest
{
  class A_{
 _public:
_  _~A_();
 _};
}
PR19040_test_return_t PR19040_fn1 ()
{
