Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 328354 Details for
Bug 441778
sys-devel/clang-3.1 ICE's when a type with multiple copy-ctors is in a union
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch backported from trunk
0001-Backport-two-patches-from-trunk-to-3.1.patch (text/plain), 2.25 KB, created by
Ben Longbons
on 2012-11-04 21:08:22 UTC
(
hide
)
Description:
patch backported from trunk
Filename:
MIME Type:
Creator:
Ben Longbons
Created:
2012-11-04 21:08:22 UTC
Size:
2.25 KB
patch
obsolete
>>From 48191d0392dd4edbb8fb23acd6cbe96200a35a77 Mon Sep 17 00:00:00 2001 >From: Benjamin Kramer <benny.kra@googlemail.com> >Date: Mon, 30 Jul 2012 15:53:26 +0000 >Subject: [PATCH] Backport two patches from trunk to 3.1 > >Fix ambiguity detection in GetBestOverloadCandidateSimple. > >When performing the simplistic overload resolution for single-argument methods, >don't check the best overload for ambiguity with itself when the best overload >doesn't happen to be the first one. > >Fixes PR13480. > >git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160961 91177308-0d34-0410-b5e6-96231b3b80d8 > >Use the location of the copy assignment when diagnosing classes that are nontrivial because of it. > >git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160962 91177308-0d34-0410-b5e6-96231b3b80d8 >--- > lib/AST/DeclCXX.cpp | 4 ++-- > lib/Sema/SemaDecl.cpp | 7 +++---- > 2 files changed, 5 insertions(+), 6 deletions(-) > >diff --git a/tools/clang/lib/AST/DeclCXX.cpp b/tools/clang/lib/AST/DeclCXX.cpp >index 114322b..14a540b 100644 >--- a/tools/clang/lib/AST/DeclCXX.cpp >+++ b/tools/clang/lib/AST/DeclCXX.cpp >@@ -359,8 +359,8 @@ GetBestOverloadCandidateSimple( > if (Cands[Best].second.compatiblyIncludes(Cands[I].second)) > Best = I; > >- for (unsigned I = 1; I != N; ++I) >- if (Cands[Best].second.compatiblyIncludes(Cands[I].second)) >+ for (unsigned I = 0; I != N; ++I) >+ if (I != Best && Cands[Best].second.compatiblyIncludes(Cands[I].second)) > return 0; > > return Cands[Best].first; >diff --git a/tools/clang/lib/Sema/SemaDecl.cpp b/tools/clang/lib/Sema/SemaDecl.cpp >index 1227e92..421a567 100644 >--- a/tools/clang/lib/Sema/SemaDecl.cpp >+++ b/tools/clang/lib/Sema/SemaDecl.cpp >@@ -9213,10 +9213,9 @@ void Sema::DiagnoseNontrivial(const RecordType* T, CXXSpecialMember member) { > > case CXXCopyAssignment: > if (RD->hasUserDeclaredCopyAssignment()) { >- // FIXME: this should use the location of the copy >- // assignment, not the type. >- SourceLocation TyLoc = RD->getLocStart(); >- Diag(TyLoc, diag::note_nontrivial_user_defined) << QT << member; >+ SourceLocation AssignLoc = >+ RD->getCopyAssignmentOperator(0)->getLocation(); >+ Diag(AssignLoc, diag::note_nontrivial_user_defined) << QT << member; > return; > } > break; >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 441778
: 328354