On Feb 1, 2012, at 1:01 PM, Howard Hinnant wrote:

> Author: hhinnant
> Date: Wed Feb  1 15:01:52 2012
> New Revision: 149536
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=149536&view=rev
> Log:
> Add some tests to test catching nullptr with pointers and member pointers.  
> Tests are only activated if #if __has_feature(cxx_nullptr).

Do you also want some const-pointer tests?
Something like this (warning, uncompiled code):

struct  A {};

void test1 () {
    
try  {
        throw nullptr;
        assert(false);
    }
    
catch ( const A* ) {}
catch ( A *) { assert (false); }
}

void test1 () {
    
try  {
        throw nullptr;
        assert(false);
    }
    
catch ( A* ) {}
catch ( const A *) { assert (false); }
}


-- Marshall

Marshall Clow     Idio Software   <mailto:[email protected]>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly 
moderated down to (-1, Flamebait).
        -- Yu Suzuki


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to