]> granicus.if.org Git - clang/commitdiff
Use CanQualType in the exception specification verification type sets.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Wed, 14 Oct 2009 15:06:25 +0000 (15:06 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Wed, 14 Oct 2009 15:06:25 +0000 (15:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84101 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExceptionSpec.cpp

index 12d06b4905b364d6f600509e8119b2504df27ba7..0adeb99d0c02aece31604cc0ed97ffbd951a03c9 100644 (file)
@@ -117,14 +117,14 @@ bool Sema::CheckEquivalentExceptionSpec(
   bool Success = true;
   // Both have a definite exception spec. Collect the first set, then compare
   // to the second.
-  llvm::SmallPtrSet<const Type*, 8> OldTypes, NewTypes;
+  llvm::SmallPtrSet<CanQualType, 8> OldTypes, NewTypes;
   for (FunctionProtoType::exception_iterator I = Old->exception_begin(),
        E = Old->exception_end(); I != E; ++I)
-    OldTypes.insert(Context.getCanonicalType(*I).getTypePtr());
+    OldTypes.insert(Context.getCanonicalType(*I).getUnqualifiedType());
 
   for (FunctionProtoType::exception_iterator I = New->exception_begin(),
        E = New->exception_end(); I != E && Success; ++I) {
-    const Type *TypePtr = Context.getCanonicalType(*I).getTypePtr();
+    CanQualType TypePtr = Context.getCanonicalType(*I).getUnqualifiedType();
     if(OldTypes.count(TypePtr))
       NewTypes.insert(TypePtr);
     else