summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-16 17:42:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-16 17:43:23 +0100
commit440720e14deb7020ba8d3158c3325c2d588664a1 (patch)
tree6f1b3896e2494f34deca4cae74ac40335b1a763a /compilerplugins/clang/test
parent6d3db33328fb2fec3539c828d062cad6d16d3195 (diff)
loplugin:redundantcast: Avoid double warnings on some const_cast
Change-Id: I1e6140fef55054899dd32465726e804fc6006394
Diffstat (limited to 'compilerplugins/clang/test')
-rw-r--r--compilerplugins/clang/test/redundantcast.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/test/redundantcast.cxx b/compilerplugins/clang/test/redundantcast.cxx
index 7af9716fa27c..e8be3013cd86 100644
--- a/compilerplugins/clang/test/redundantcast.cxx
+++ b/compilerplugins/clang/test/redundantcast.cxx
@@ -19,8 +19,8 @@ int main() {
f1(const_cast<char * const>(p1)); // expected-error {{redundant const_cast from 'char *' to 'char *const' [loplugin:redundantcast]}}
f1(const_cast<char *>(p2));
f1(const_cast<char * const>(p2));
- f2(const_cast<char *>(p1)); // expected-error {{redundant const_cast from 'char *' to 'char *', result is implictly cast to 'const char *' [loplugin:redundantcast]}} expected-error {{redundant const_cast from 'char *' to 'char *' [loplugin:redundantcast]}}
- f2(const_cast<char * const>(p1)); // expected-error {{redundant const_cast from 'char *' to 'char *', result is implictly cast to 'const char *' [loplugin:redundantcast]}} expected-error {{redundant const_cast from 'char *' to 'char *const' [loplugin:redundantcast]}}
+ f2(const_cast<char *>(p1)); // expected-error {{redundant const_cast from 'char *' to 'char *' [loplugin:redundantcast]}}
+ f2(const_cast<char * const>(p1)); // expected-error {{redundant const_cast from 'char *' to 'char *const' [loplugin:redundantcast]}}
f2(const_cast<char const *>(p1));
f2(const_cast<char const * const>(p1));
f2(const_cast<char *>(p2)); // expected-error {{redundant const_cast from 'const char *' to 'char *', result is implictly cast to 'const char *' [loplugin:redundantcast]}}