[cfe-commits] r113784 - in /cfe/trunk: lib/Sema/SemaExprCXX.cpp test/SemaCXX/type-traits.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Mon Sep 13 14:10:21 PDT 2010
Author: cornedbee
Date: Mon Sep 13 16:10:20 2010
New Revision: 113784
URL: http://llvm.org/viewvc/llvm-project?rev=113784&view=rev
Log:
Have __has_nothrow_copy use Sema's lookup routines. This fixes the problem with not finding implicitly declared copy constructors, part of PR8107.
Modified:
cfe/trunk/lib/Sema/SemaExprCXX.cpp
cfe/trunk/test/SemaCXX/type-traits.cpp
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=113784&r1=113783&r2=113784&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Mon Sep 13 16:10:20 2010
@@ -2148,7 +2148,7 @@
DeclarationName ConstructorName
= C.DeclarationNames.getCXXConstructorName(C.getCanonicalType(T));
DeclContext::lookup_const_iterator Con, ConEnd;
- for (llvm::tie(Con, ConEnd) = RD->lookup(ConstructorName);
+ for (llvm::tie(Con, ConEnd) = Self.LookupConstructors(RD);
Con != ConEnd; ++Con) {
CXXConstructorDecl *Constructor = cast<CXXConstructorDecl>(*Con);
if (Constructor->isCopyConstructor(FoundTQs)) {
Modified: cfe/trunk/test/SemaCXX/type-traits.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/type-traits.cpp?rev=113784&r1=113783&r2=113784&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/type-traits.cpp (original)
+++ cfe/trunk/test/SemaCXX/type-traits.cpp Mon Sep 13 16:10:20 2010
@@ -366,6 +366,7 @@
int t21[T(__has_nothrow_copy(HasMultipleNoThrowCopy))];
int t22[F(__has_nothrow_copy(void))];
int t23[F(__has_nothrow_copy(cvoid))];
+ int t24[T(__has_nothrow_copy(HasVirtDest))];
}
void has_nothrow_constructor() {
More information about the cfe-commits
mailing list