From 51fb8b013e7734b795139f49d3b1f77c539be20a Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Wed, 4 Nov 2009 15:04:32 +0000 Subject: Update clang to r86025. --- .../SemaTemplate/operator-function-id-template.cpp | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/SemaTemplate/operator-function-id-template.cpp (limited to 'test/SemaTemplate/operator-function-id-template.cpp') diff --git a/test/SemaTemplate/operator-function-id-template.cpp b/test/SemaTemplate/operator-function-id-template.cpp new file mode 100644 index 0000000000000..92a8c84e3be6f --- /dev/null +++ b/test/SemaTemplate/operator-function-id-template.cpp @@ -0,0 +1,28 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +template +struct A { + template A operator+(U); +}; + +template bool operator==(A, A); + +template<> bool operator==<0>(A, A); + +bool test_qualified_id(A ai) { + return ::operator==<0, int>(ai, ai); +} + +void test_op(A a, int i) { + const A &air = a.operator+(i); +} + +template +void test_op_template(A at, T x) { + const A &atr = at.template operator+(x); + const A &atr2 = at.A::template operator+(x); + // FIXME: unrelated template-name instantiation issue + // const A &atr3 = at.template A::template operator+(x); +} + +template void test_op_template(A, float); -- cgit v1.2.3