diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-09-18 21:48:27 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-09-18 21:48:27 +0000 |
commit | 39cba5343d023b08348f7e6fc7281b05b872c28c (patch) | |
tree | a6f48c7fb49ba76d2c15587556ed7d2c98ad1834 /clang/test/SemaCXX/MicrosoftExtensions.cpp | |
parent | 08d2fa0a782163cba3078b3a873b477a9ecbb3f8 (diff) | |
download | bcm5719-llvm-39cba5343d023b08348f7e6fc7281b05b872c28c.tar.gz bcm5719-llvm-39cba5343d023b08348f7e6fc7281b05b872c28c.zip |
Move the "jump bypasses variable initialization" error -> warning downgrade from -fms-extensions to -fms-compatibility.
llvm-svn: 140008
Diffstat (limited to 'clang/test/SemaCXX/MicrosoftExtensions.cpp')
-rw-r--r-- | clang/test/SemaCXX/MicrosoftExtensions.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/clang/test/SemaCXX/MicrosoftExtensions.cpp b/clang/test/SemaCXX/MicrosoftExtensions.cpp index 396ee13f66a..e5e5752dba8 100644 --- a/clang/test/SemaCXX/MicrosoftExtensions.cpp +++ b/clang/test/SemaCXX/MicrosoftExtensions.cpp @@ -257,56 +257,3 @@ void f() } - -namespace ms_protected_scope { - struct C { C(); }; - - int jump_over_variable_init(bool b) { - if (b) - goto foo; // expected-warning {{illegal goto into protected scope}} - C c; // expected-note {{jump bypasses variable initialization}} - foo: - return 1; - } - -struct Y { - ~Y(); -}; - -void jump_over_var_with_dtor() { - goto end; // expected-warning{{goto into protected scope}} - Y y; // expected-note {{jump bypasses variable initialization}} - end: - ; -} - - void jump_over_variable_case(int c) { - switch (c) { - case 0: - int x = 56; // expected-note {{jump bypasses variable initialization}} - case 1: // expected-error {{switch case is in protected scope}} - x = 10; - } - } - - -void exception_jump() { - goto l2; // expected-error {{illegal goto into protected scope}} - try { // expected-note {{jump bypasses initialization of try block}} - l2: ; - } catch(int) { - } -} - -int jump_over_indirect_goto() { - static void *ps[] = { &&a0 }; - goto *&&a0; // expected-warning {{goto into protected scope}} - int a = 3; // expected-note {{jump bypasses variable initialization}} - a0: - return 0; -} - -} - - - |