diff options
author | John McCall <rjmccall@apple.com> | 2010-08-19 01:19:08 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-19 01:19:08 +0000 |
commit | 35a38d95da89d48778019c37b5f8c9a20f7e309c (patch) | |
tree | 5e7d971d3c44ec0d26c635432edd5cc902a5f748 /test/SemaCXX/warn-cast-align.cpp | |
parent | c9f8aece7e111f90265dfad9a81f3f517be948de (diff) |
On second thought, don't warn about reinterpret_casts under -Wcast-align.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/warn-cast-align.cpp')
-rw-r--r-- | test/SemaCXX/warn-cast-align.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaCXX/warn-cast-align.cpp b/test/SemaCXX/warn-cast-align.cpp index d2144d279e..68acbdd4ea 100644 --- a/test/SemaCXX/warn-cast-align.cpp +++ b/test/SemaCXX/warn-cast-align.cpp @@ -11,12 +11,12 @@ void test0(char *P) { a = CharPtr(P); b = (short*) P; // expected-warning {{cast from 'char *' to 'short *' increases required alignment from 1 to 2}} - b = reinterpret_cast<short*>(P); // expected-warning {{cast from 'char *' to 'short *' increases required alignment from 1 to 2}} + b = reinterpret_cast<short*>(P); typedef short *ShortPtr; b = ShortPtr(P); // expected-warning {{cast from 'char *' to 'ShortPtr' (aka 'short *') increases required alignment from 1 to 2}} c = (int*) P; // expected-warning {{cast from 'char *' to 'int *' increases required alignment from 1 to 4}} - c = reinterpret_cast<int*>(P); // expected-warning {{cast from 'char *' to 'int *' increases required alignment from 1 to 4}} + c = reinterpret_cast<int*>(P); typedef int *IntPtr; c = IntPtr(P); // expected-warning {{cast from 'char *' to 'IntPtr' (aka 'int *') increases required alignment from 1 to 4}} } |