// RUN: %clang_cc1 %s -fsyntax-only -fcxx-exceptions -verify -Wreturn-type -Wmissing-noreturn -Wno-unreachable-code -Wno-covered-switch-default
// RUN: %clang_cc1 %s -fsyntax-only -fcxx-exceptions -std=c++11 -verify -Wreturn-type -Wmissing-noreturn -Wno-unreachable-code -Wno-covered-switch-default
// A destructor may be marked noreturn and should still influence the CFG.
void ;
;
;
// Ensure that destructors from objects are properly modeled in the CFG despite
// the presence of switches, case statements, labels, and blocks. These tests
// try to cover bugs reported in both PR6884 and PR10063.
// PR9380
;
;
void
// Array of objects with destructors. This is purely a coverage test case.
void
// Test classes wrapped in typedefs. This is purely a coverage test case
// for CFGImplictDtor::getDestructorDecl().
void
// PR9412 - Handle CFG traversal with null successors.
;
int // expected-warning {{non-void function does not return a value}}
void
;
;
int
int
int // expected-warning {{non-void function does not return a value}}
int
int // expected-warning {{non-void function does not return a value}}
int // expected-warning {{non-void function does not return a value in all control paths}}
int // expected-warning {{non-void function does not return a value in all control paths}}
int // expected-warning {{non-void function does not return a value in all control paths}}
int // expected-warning {{non-void function does not return a value in all control paths}}
int
int
int // expected-warning {{non-void function does not return a value}}
int // expected-warning {{non-void function does not return a value}}
int // expected-warning {{non-void function does not return a value in all control paths}}
int // expected-warning {{non-void function does not return a value in all control paths}}
int
int
// Ensure that function-try-blocks also check for return values properly.
int try catch // expected-warning {{non-void function does not return a value in all control paths}}
int try catch // expected-warning {{non-void function does not return a value in all control paths}}
int try catch // ok, both paths return.