diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-03-11 04:56:58 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-03-11 04:56:58 +0000 |
commit | 1e15394853bfae25112d9cc6b445504905e1f34a (patch) | |
tree | e482007d8237b44955b1fcea8febc429208b0007 /lib | |
parent | 34d6f9344d6b562b4642a882519dd82431db4163 (diff) |
Fix PR9453 by not trying to print a warning about ignored qualifiers
in conversion functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaType.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index f161f4e623..2292735b50 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1757,6 +1757,7 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S, // cv-qualifiers on return types are pointless except when the type is a // class type in C++. if (isa<PointerType>(T) && T.getLocalCVRQualifiers() && + (D.getName().getKind() != UnqualifiedId::IK_ConversionFunctionId) && (!getLangOptions().CPlusPlus || !T->isDependentType())) { assert(chunkIndex + 1 < e && "No DeclaratorChunk for the return type?"); DeclaratorChunk ReturnTypeChunk = D.getTypeObject(chunkIndex + 1); |