]> granicus.if.org Git - clang/commit
Match type names and give more info for out-of-line function definition errors.
authorKaelyn Uhrain <rikka@google.com>
Thu, 4 Aug 2011 17:40:00 +0000 (17:40 +0000)
committerKaelyn Uhrain <rikka@google.com>
Thu, 4 Aug 2011 17:40:00 +0000 (17:40 +0000)
commit4d9d157afb35742bc6348defbe45bc6de780ec77
treefda1ae74394dc9d22ba2b28ba6d4768ea31435a0
parent083fcb208ee2c8c2e375c41482a92039282e6389
Match type names and give more info for out-of-line function definition errors.

Having a function declaration and definition with different types for a
parameter where the types have same (textual) name can occur when an unqualified
type name resolves to types in different namespaces in each location.

The error messages have been extended by adding notes that point to the first
parameter of the function definition that doesn't match the declaration, instead
of a generic "member declaration nearly matches". The generic message is still
used in cases where the mismatch is not in the paramenter list, such as
mismatched cv qualifiers on the member function itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136891 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Type.h
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/Type.cpp
lib/Sema/SemaDecl.cpp
test/SemaCXX/nested-name-spec.cpp
test/SemaCXX/out-of-line-def-mismatch.cpp [new file with mode: 0644]