modocache added a comment.
Thanks for the reviews!
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57032/new/
https://reviews.llvm.org/D57032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
This revision was automatically updated to reflect the committed changes.
Closed by commit rC352831: [SemaCXX] Param diagnostic matches overload logic
(authored by modocache, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D57032?vs=184284&id=184667#toc
Repository:
rC Clang
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Thanks, LGTM.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57032/new/
https://reviews.llvm.org/D57032
___
cfe-c
modocache marked an inline comment as done.
modocache added a comment.
Herald added a project: clang.
Friendly ping! Is there anything I can do to improve this patch? I think it's a
clear improvement of the diagnostic, with a test case to boot!
Repository:
rC Clang
CHANGES SINCE LAST ACTION
modocache updated this revision to Diff 184284.
modocache added a comment.
Thanks, @cpplearner! You're absolutely right. I got confused because I didn't
realize that the method `FunctionProtoType::getUnqualifiedType` was being used
from within `Sema::FunctionParamTypesAreEqual`, not
`QualType::
cpplearner added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:5092
// The parameter types are identical
-if (Context.hasSameType(DefParamTy, DeclParamTy))
+if (Context.hasSameType(DefParamTy.getUnqualifiedType(),
+DeclParamTy.getUnqu
modocache created this revision.
modocache added a reviewer: rsmith.
Given the following test program:
class C {
public:
int A(int a, int& b);
};
int C::A(const int a, int b) {
return a * b;
}
Clang would produce an error message that correctly diagnosed the
redeclaration of