> wouldn't you want to provide the source range to the microsoft-mode
> diagnostic too?

r148683, good catch.

>> +namespace PR11791 {
>> +  template<class _Ty>
>> +  void del(_Ty *_Ptr) {
>> +    _Ptr->~_Ty();  // expected-warning {{pseudo-destructors on type void 
>> are a Microsoft extension}}
>> +  }
>> +
>> +  void f() {
>> +    int* a = 0;
>> +    del((void*)a);  // expected-note {{in instantiation of function 
>> template specialization}}
>> +  }
>> +}
>
> This test case seems a bit more convoluted than necessary - would:
>
> typedef void *foo;
> foo f;
> f.~foo();
>
> suffice?

typedef void *foo;
foo f;
f->foo::~foo();

does suffice. The current test looks easier to understand to me
(pseudo-destructors were new to me), which is why I went with that.

Nico

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

Reply via email to