summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/dependent-expr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-26 10:57:22 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-26 10:57:22 +0000
commita21e06cb62dbd806073f646e756e89d8e23fc1c3 (patch)
tree8d917f3e21d4562f61cac71c840839252055b949 /test/SemaTemplate/dependent-expr.cpp
parent110eaf156121760073fe6af6b3b0ed09be0cc0ce (diff)
downloadclang-a21e06cb62dbd806073f646e756e89d8e23fc1c3.tar.gz
For internal consistency's sake, compute the value kind of a dependent cast
based on the known properties of the casted-to type. Fixes a crash on spirit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/dependent-expr.cpp')
-rw-r--r--test/SemaTemplate/dependent-expr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaTemplate/dependent-expr.cpp b/test/SemaTemplate/dependent-expr.cpp
index e25afce77a..f3970d1d71 100644
--- a/test/SemaTemplate/dependent-expr.cpp
+++ b/test/SemaTemplate/dependent-expr.cpp
@@ -45,3 +45,10 @@ namespace PR7724 {
template<typename OT> int myMethod()
{ return 2 && sizeof(OT); }
}
+
+namespace test4 {
+ template <typename T> T *addressof(T &v) {
+ return reinterpret_cast<T*>(
+ &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
+ }
+}