forked from OSchip/llvm-project
Fix PR9453 by not trying to print a warning about ignored qualifiers
in conversion functions. llvm-svn: 127460
This commit is contained in:
parent
cc27b3acc4
commit
6b7e3bc992
|
@ -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);
|
||||
|
|
|
@ -49,3 +49,7 @@ namespace PR9328 {
|
|||
const PCHAR GetName() { return 0; } // expected-warning{{'const' type qualifier on return type has no effect}}
|
||||
};
|
||||
}
|
||||
|
||||
class foo {
|
||||
operator int * const ();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue