diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-12 08:07:23 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-12 08:07:23 +0000 |
commit | 8fcc516a5d5b2fec0023a9dced29285a38b95355 (patch) | |
tree | b23ca737524fdd1cb440bac909b0a14d4cef6b5a /test/SemaCXX/conversion-function.cpp | |
parent | c6dbc3fa467e2355b678a6b717534928048efcb2 (diff) |
When performing overload resolution, only compare the final conversion
sequences for two conversion functions when in fact we are in the text
of initialization by a user-defined conversion sequences. Fixes PR8034.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113724 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/conversion-function.cpp')
-rw-r--r-- | test/SemaCXX/conversion-function.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp index 8d5e01039c..61c8ada62f 100644 --- a/test/SemaCXX/conversion-function.cpp +++ b/test/SemaCXX/conversion-function.cpp @@ -343,3 +343,13 @@ namespace PR8065 { Container<int> test; } + +namespace PR8034 { + struct C { + operator int(); + + private: + template <typename T> operator T(); + }; + int x = C().operator int(); +} |