diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-09-19 01:12:33 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-09-19 01:12:33 +0000 |
commit | 71271083578eeccf16421a295a7803ceda5bb44d (patch) | |
tree | 344bfd5c491c152b4e8ec13ee2942cf3f52bb195 /clang/test/SemaTemplate/dependent-expr.cpp | |
parent | 0834a4b90139341eacdfff167b052595a95cf2e5 (diff) | |
download | bcm5719-llvm-71271083578eeccf16421a295a7803ceda5bb44d.tar.gz bcm5719-llvm-71271083578eeccf16421a295a7803ceda5bb44d.zip |
Fix crash with cast of value-dependent expr.
We don't really need to perform semantic analysis on the dependent expression
anyway, so just call the cast dependent.
<rdar://problem/15012610>
llvm-svn: 190981
Diffstat (limited to 'clang/test/SemaTemplate/dependent-expr.cpp')
-rw-r--r-- | clang/test/SemaTemplate/dependent-expr.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/dependent-expr.cpp b/clang/test/SemaTemplate/dependent-expr.cpp index d75b0f3e302..01ac42ed421 100644 --- a/clang/test/SemaTemplate/dependent-expr.cpp +++ b/clang/test/SemaTemplate/dependent-expr.cpp @@ -72,3 +72,10 @@ namespace PR8795 { return data[0]; } } + +template<typename T> struct CastDependentIntToPointer { + static void* f() { + T *x; + return ((void*)(((unsigned long)(x)|0x1ul))); + } +}; |