diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-05-19 01:41:12 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-05-19 01:41:12 +0000 |
| commit | 86dec39c0adb19390b4cce6ce0ae9a6b83a94d9a (patch) | |
| tree | f2ac0b657308e419f3a78ceb7ea78374debd41f0 | |
| parent | 20683efd47e43e6c48569bcdbf4d6c5b29f16866 (diff) | |
| download | bcm5719-llvm-86dec39c0adb19390b4cce6ce0ae9a6b83a94d9a.tar.gz bcm5719-llvm-86dec39c0adb19390b4cce6ce0ae9a6b83a94d9a.zip | |
PR20073: promote "dereference of 'void*'" from Extension to ExtWarn.
llvm-svn: 237652
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
| -rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp | 2 | ||||
| -rw-r--r-- | clang/test/SemaCXX/reinterpret-cast.cpp | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 02be44639b6..2f419215782 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -5030,7 +5030,7 @@ def err_typecheck_unary_expr : Error< "invalid argument type %0 to unary expression">; def err_typecheck_indirection_requires_pointer : Error< "indirection requires pointer operand (%0 invalid)">; -def ext_typecheck_indirection_through_void_pointer : Extension< +def ext_typecheck_indirection_through_void_pointer : ExtWarn< "ISO C++ does not allow indirection on operand of type %0">, InGroup<DiagGroup<"void-ptr-dereference">>; def warn_indirection_through_null : Warning< diff --git a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp index f09faa90d5f..eb11e3375e5 100644 --- a/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp @@ -8,7 +8,7 @@ struct X0 { template<typename T, typename U> void X0<T, U>::f(T *t, const U &u) { - *t = u; // expected-error{{not assignable}} + *t = u; // expected-warning{{indirection on operand of type 'void *'}} expected-error{{not assignable}} } void test_f(X0<float, int> xfi, X0<void, int> xvi, float *fp, void *vp, int i) { diff --git a/clang/test/SemaCXX/reinterpret-cast.cpp b/clang/test/SemaCXX/reinterpret-cast.cpp index 4284032d9ba..7c88dc0302a 100644 --- a/clang/test/SemaCXX/reinterpret-cast.cpp +++ b/clang/test/SemaCXX/reinterpret-cast.cpp @@ -201,11 +201,11 @@ void dereference_reinterpret_cast() { (void)*reinterpret_cast<float*>(v_ptr); // Casting to void pointer - (void)*reinterpret_cast<void*>(&a); - (void)*reinterpret_cast<void*>(&b); - (void)*reinterpret_cast<void*>(&l); - (void)*reinterpret_cast<void*>(&d); - (void)*reinterpret_cast<void*>(&f); + (void)*reinterpret_cast<void*>(&a); // expected-warning {{ISO C++ does not allow}} + (void)*reinterpret_cast<void*>(&b); // expected-warning {{ISO C++ does not allow}} + (void)*reinterpret_cast<void*>(&l); // expected-warning {{ISO C++ does not allow}} + (void)*reinterpret_cast<void*>(&d); // expected-warning {{ISO C++ does not allow}} + (void)*reinterpret_cast<void*>(&f); // expected-warning {{ISO C++ does not allow}} } void reinterpret_cast_whitelist () { |

