[cfe-commits] r97925 - in /cfe/trunk/test: SemaCXX/exceptions.cpp SemaTemplate/instantiate-function-1.cpp

Chandler Carruth chandlerc at google.com
Sun Mar 7 16:42:54 PST 2010


On Sun, Mar 7, 2010 at 3:28 PM, Douglas Gregor <dgregor at apple.com> wrote:

> Author: dgregor
> Date: Sun Mar  7 17:28:27 2010
> New Revision: 97925
>
> URL: http://llvm.org/viewvc/llvm-project?rev=97925&view=rev
> Log:
> Downgrade errors when trying to catch a pointer or reference to
> incomplete type to warnings; GCC (and EDG in GCC compatibility mode)
> permit such handles. Fixes PR6527.
>
> Modified:
>    cfe/trunk/test/SemaCXX/exceptions.cpp
>    cfe/trunk/test/SemaTemplate/instantiate-function-1.cpp
>

Looks like only the test updates and not the fix were submitted. ;] I
reverted in r97926 to get the build green.


>
> Modified: cfe/trunk/test/SemaCXX/exceptions.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/exceptions.cpp?rev=97925&r1=97924&r2=97925&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/exceptions.cpp (original)
> +++ cfe/trunk/test/SemaCXX/exceptions.cpp Sun Mar  7 17:28:27 2010
> @@ -12,8 +12,8 @@
>   } catch(float i) {
>   } catch(void v) { // expected-error {{cannot catch incomplete type
> 'void'}}
>   } catch(A a) { // expected-error {{cannot catch incomplete type 'struct
> A'}}
> -  } catch(A *a) { // expected-error {{cannot catch pointer to incomplete
> type 'struct A'}}
> -  } catch(A &a) { // expected-error {{cannot catch reference to incomplete
> type 'struct A'}}
> +  } catch(A *a) { // expected-warning {{pointer to incomplete type 'struct
> A'}}
> +  } catch(A &a) { // expected-warning {{reference to incomplete type
> 'struct A'}}
>   } catch(Abstract) { // expected-error {{variable type 'Abstract' is an
> abstract class}}
>   } catch(...) {
>     int j = i; // expected-error {{use of undeclared identifier 'i'}}
>
> Modified: cfe/trunk/test/SemaTemplate/instantiate-function-1.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-function-1.cpp?rev=97925&r1=97924&r2=97925&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/SemaTemplate/instantiate-function-1.cpp (original)
> +++ cfe/trunk/test/SemaTemplate/instantiate-function-1.cpp Sun Mar  7
> 17:28:27 2010
> @@ -194,7 +194,7 @@
>  template<typename T> struct TryCatch0 {
>   void f() {
>     try {
> -    } catch (T t) { // expected-error{{incomplete type}} \
> +    } catch (T t) { // expected-warning{{incomplete type}} \
>                     // expected-error{{abstract class}}
>     } catch (...) {
>     }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100307/72a24b55/attachment.html>


More information about the cfe-commits mailing list