File tree Expand file tree Collapse file tree 1 file changed +19
-22
lines changed
compiler-rt/test/asan/TestCases/Windows Expand file tree Collapse file tree 1 file changed +19
-22
lines changed Original file line number Diff line number Diff line change 88#include < cstdio>
99#include < exception>
1010
11- void throwInFunction (){
12- throw std::exception (" test2" );
13- }
11+ void throwInFunction () { throw std::exception (" test2" ); }
1412
15- int main ()
16- {
17- // case 1: direct throw
18- try {
19- throw std::exception (" test1" );
20- } catch (const std::exception& ex){
21- puts (ex.what ());
22- // CHECK: test1
23- }
13+ int main () {
14+ // case 1: direct throw
15+ try {
16+ throw std::exception (" test1" );
17+ } catch (const std::exception &ex) {
18+ puts (ex.what ());
19+ // CHECK: test1
20+ }
2421
25- // case 2: throw in function
26- try {
27- throwInFunction ();
28- } catch (const std::exception& ex){
29- puts (ex.what ());
30- // CHECK: test2
31- }
22+ // case 2: throw in function
23+ try {
24+ throwInFunction ();
25+ } catch (const std::exception & ex) {
26+ puts (ex.what ());
27+ // CHECK: test2
28+ }
3229
33- printf (" Success!\n " );
34- // CHECK: Success!
35- return 0 ;
30+ printf (" Success!\n " );
31+ // CHECK: Success!
32+ return 0 ;
3633}
You can’t perform that action at this time.
0 commit comments