summaryrefslogtreecommitdiff
path: root/test/SemaCXX
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-28 15:55:56 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-28 15:55:56 +0000
commitbbf306bd1d3e674edf40c692a5693a475e961a57 (patch)
treedc634e72ee9dbbbdc3709e8e9018588cc89acd7e /test/SemaCXX
parent08972924fadafeadcee25ecf52c5fa6cfc729332 (diff)
downloadclang-bbf306bd1d3e674edf40c692a5693a475e961a57.tar.gz
When doing overload resolution, expressions that are value dependent but not type dependent and of integral type should not be treated as null pointer constants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80369 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX')
-rw-r--r--test/SemaCXX/overload-value-dep-arg.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaCXX/overload-value-dep-arg.cpp b/test/SemaCXX/overload-value-dep-arg.cpp
new file mode 100644
index 0000000000..1e94d5a301
--- /dev/null
+++ b/test/SemaCXX/overload-value-dep-arg.cpp
@@ -0,0 +1,13 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+class C {
+ C(void*);
+};
+
+int f(const C&);
+int f(unsigned long);
+
+template<typename T> int f(const T* t) {
+ return f(reinterpret_cast<unsigned long>(t));
+}
+