diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2015-10-12 18:40:58 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2015-10-12 18:40:58 +0000 |
commit | 5f2ef457bfb1dbfdb34f05d4075089e937678936 (patch) | |
tree | cf99940773cb993333e1ebd1c0710d0bb0c58bab /clang/test/SemaCXX/addr-of-overloaded-function.cpp | |
parent | 61e13de40859751d0c605d7509eeb5a99cf7e9c1 (diff) | |
download | bcm5719-llvm-5f2ef457bfb1dbfdb34f05d4075089e937678936.tar.gz bcm5719-llvm-5f2ef457bfb1dbfdb34f05d4075089e937678936.zip |
[Sema] Don't emit multiple diags for one error
Fixed a bug where we'd emit multiple diagnostics if there was a problem
taking the address of an overloaded template function.
Differential Revision: http://reviews.llvm.org/D13664
llvm-svn: 250078
Diffstat (limited to 'clang/test/SemaCXX/addr-of-overloaded-function.cpp')
-rw-r--r-- | clang/test/SemaCXX/addr-of-overloaded-function.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/test/SemaCXX/addr-of-overloaded-function.cpp b/clang/test/SemaCXX/addr-of-overloaded-function.cpp index 6d055037735..09f280bc1db 100644 --- a/clang/test/SemaCXX/addr-of-overloaded-function.cpp +++ b/clang/test/SemaCXX/addr-of-overloaded-function.cpp @@ -125,13 +125,9 @@ namespace PR7971 { } namespace PR8033 { - template <typename T1, typename T2> int f(T1 *, const T2 *); // expected-note {{candidate function [with T1 = const int, T2 = int]}} \ - // expected-note{{candidate function}} - template <typename T1, typename T2> int f(const T1 *, T2 *); // expected-note {{candidate function [with T1 = int, T2 = const int]}} \ - // expected-note{{candidate function}} - int (*p)(const int *, const int *) = f; // expected-error{{address of overloaded function 'f' is ambiguous}} \ - // expected-error{{address of overloaded function 'f' is ambiguous}} - + template <typename T1, typename T2> int f(T1 *, const T2 *); // expected-note {{candidate function [with T1 = const int, T2 = int]}} + template <typename T1, typename T2> int f(const T1 *, T2 *); // expected-note {{candidate function [with T1 = int, T2 = const int]}} + int (*p)(const int *, const int *) = f; // expected-error{{address of overloaded function 'f' is ambiguous}} } namespace PR8196 { |