]> granicus.if.org Git - clang/commitdiff
Have __has_nothrow_copy use Sema's lookup routines. This fixes the problem with not...
authorSebastian Redl <sebastian.redl@getdesigned.at>
Mon, 13 Sep 2010 21:10:20 +0000 (21:10 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Mon, 13 Sep 2010 21:10:20 +0000 (21:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113784 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExprCXX.cpp
test/SemaCXX/type-traits.cpp

index 76d6f496e6fd62d3c548f29f5d6bc283db8269cc..d026851f622c2e5936699cd7c72619481480e807 100644 (file)
@@ -2148,7 +2148,7 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, UnaryTypeTrait UTT, QualType T) {
       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)) {
index 99ac5cd433c71ebdef4a1972e6f58b903f4f9695..61aba075975683db855a3e2e2c60edb202f3f6ce 100644 (file)
@@ -366,6 +366,7 @@ void has_nothrow_copy() {
   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() {