diff options
| author | Richard Trieu <rtrieu@google.com> | 2013-08-09 21:42:32 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2013-08-09 21:42:32 +0000 |
| commit | 7ea491cd10c4ea5bf54b9dc15a07ff49cc8a44c6 (patch) | |
| tree | 85439bbdfab9cc2e62b49def95f77c9667601a7c /lib/Sema/SemaOverload.cpp | |
| parent | 24016765c905a02c9df94ef0b8a50c5e74fff5c2 (diff) | |
| download | clang-7ea491cd10c4ea5bf54b9dc15a07ff49cc8a44c6.tar.gz clang-7ea491cd10c4ea5bf54b9dc15a07ff49cc8a44c6.tar.bz2 clang-7ea491cd10c4ea5bf54b9dc15a07ff49cc8a44c6.tar.xz | |
Fix for PR16570: when comparing two function pointers, discard qualifiers when
comparing non-reference function parameters. The qualifiers don't matter for
comparisons.
This is a re-commit of r187769, which was accidentially reverted in r187770,
with a simplification at the suggestion of Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
| -rw-r--r-- | lib/Sema/SemaOverload.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index ec7c3a4609..c77abe8155 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -2584,7 +2584,8 @@ bool Sema::FunctionArgTypesAreEqual(const FunctionProtoType *OldType, for (FunctionProtoType::arg_type_iterator O = OldType->arg_type_begin(), N = NewType->arg_type_begin(), E = OldType->arg_type_end(); O && (O != E); ++O, ++N) { - if (!Context.hasSameType(*O, *N)) { + if (!Context.hasSameType(O->getUnqualifiedType(), + N->getUnqualifiedType())) { if (ArgPos) *ArgPos = O - OldType->arg_type_begin(); return false; } |
