From 965cfa1d5bcb926b13591ed8838195bdfe956e5d Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Tue, 22 Jul 2014 03:33:01 +0000 Subject: Fix a template diffing problem were an '&' is unexpectedly printed in a template argument. llvm-svn: 213609 --- clang/test/Misc/diag-template-diffing.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'clang/test/Misc/diag-template-diffing.cpp') diff --git a/clang/test/Misc/diag-template-diffing.cpp b/clang/test/Misc/diag-template-diffing.cpp index c43ed263c69..41cdca47126 100644 --- a/clang/test/Misc/diag-template-diffing.cpp +++ b/clang/test/Misc/diag-template-diffing.cpp @@ -1105,6 +1105,22 @@ using F = C<21 + 21>; } } +namespace AddressOf { +template +struct S {}; + +template +struct Wrapper {}; + +template +Wrapper MakeWrapper(); +int global; +constexpr int * ptr = nullptr; +Wrapper> W = MakeWrapper>(); +// Don't print an extra '&' for 'ptr' +// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper>' to 'Wrapper>' +} + // CHECK-ELIDE-NOTREE: {{[0-9]*}} errors generated. // CHECK-NOELIDE-NOTREE: {{[0-9]*}} errors generated. // CHECK-ELIDE-TREE: {{[0-9]*}} errors generated. -- cgit v1.2.3