summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/fun-template-def.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-24 21:39:56 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-24 21:39:56 +0000
commit9983cc110422a2e976191a0ce6ac4f1d7b634cc0 (patch)
treea05093e3218265fcaeb4b916d22447c2562d8dba /test/SemaTemplate/fun-template-def.cpp
parenta24eb4ef63d5860a5a02f7532e56e84283782984 (diff)
downloadclang-9983cc110422a2e976191a0ce6ac4f1d7b634cc0.tar.gz
clang-9983cc110422a2e976191a0ce6ac4f1d7b634cc0.tar.bz2
clang-9983cc110422a2e976191a0ce6ac4f1d7b634cc0.tar.xz
Don't try to evaluate an expression that is type- or value-dependent while building the CFG
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/fun-template-def.cpp')
-rw-r--r--test/SemaTemplate/fun-template-def.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/SemaTemplate/fun-template-def.cpp b/test/SemaTemplate/fun-template-def.cpp
index 8833ef4ddc..dee4250078 100644
--- a/test/SemaTemplate/fun-template-def.cpp
+++ b/test/SemaTemplate/fun-template-def.cpp
@@ -10,8 +10,13 @@ namespace std { class type_info {}; }
struct dummy {};
+template<typename T>
+int f0(T x) {
+ return (sizeof(x) == sizeof(int))? 0 : (sizeof(x) == sizeof(double))? 1 : 2;
+}
+
template <typename T, typename U>
-T f(T t1, U u1, int i1)
+T f1(T t1, U u1, int i1)
{
T t2 = i1;
t2 = i1 + u1;