Fix a few auto-related issues:
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 22 Feb 2011 00:36:53 +0000 (00:36 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 22 Feb 2011 00:36:53 +0000 (00:36 +0000)
commite7397c6a1bb2b205c5fe678e26199eb26d22e38e
tree9ed73dbf4ea5f051f3ca96a07d4b4d581006e4b4
parent24d44eddfc98464d10802e71c77d3dc3e45f4aac
Fix a few auto-related issues:

 * 'auto' was being rejected on abstract-declarators with trailing return
types and on typedefs with trailing return types. 'auto' is always
allowed in these cases. This was found while testing the fix for PR 9278.

 * A very poor diagnostic was being issued for auto (f() -> int): "return
type must be 'auto', not 'auto'". This is closely related to PR 9060.

 * Trailing return type handling was happening slightly too late,
resulting in the checks for functions returning arrays and functions
returning functions being missed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126166 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaType.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p2.cpp [new file with mode: 0644]
test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp
test/CXX/dcl.decl/dcl.meaning/dcl.fct/p2-cxx0x.cpp
test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8-0x.cpp [new file with mode: 0644]
test/CXX/dcl.decl/dcl.meaning/dcl.fct/p9-0x.cpp [new file with mode: 0644]