diff options
author | Anders Carlsson <andersca@mac.com> | 2009-10-19 18:14:28 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-10-19 18:14:28 +0000 |
commit | 027732b5b995aaab410ea397ac813d2b01fe9827 (patch) | |
tree | bedb61d4d105b5f47ae3d001c5f846ac6fbf1a4d /clang/test/CodeGenCXX/casts.cpp | |
parent | 24fcb826bd86d43f9f3000e9763e746b7ee967d8 (diff) | |
download | bcm5719-llvm-027732b5b995aaab410ea397ac813d2b01fe9827.tar.gz bcm5719-llvm-027732b5b995aaab410ea397ac813d2b01fe9827.zip |
Set the cast kind to CK_NoOp for C-style casts that are really const casts. Fixes PR5248.
llvm-svn: 84514
Diffstat (limited to 'clang/test/CodeGenCXX/casts.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/casts.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/casts.cpp b/clang/test/CodeGenCXX/casts.cpp new file mode 100644 index 00000000000..045f2d4fe03 --- /dev/null +++ b/clang/test/CodeGenCXX/casts.cpp @@ -0,0 +1,14 @@ +// RUN: clang-cc %s -emit-llvm -o %t + +// PR5248 +namespace PR5248 { +struct A { + void copyFrom(const A &src); + void addRef(void); +}; + +void A::copyFrom(const A &src) { + ((A &)src).addRef(); +} +} + |