Implement DR1265 (wg21.link/cwg1265).
Diasllow a declaration using the 'auto' type specifier from using two different meanings of it at once, or from declaring multiple functions with deduced return types or introducing multiple trailing return types. The standard does not technically disallow the multiple trailing return types case if all the declarators declare variables (such as function pointers with trailing return types), but we disallow that too, following the clear intent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291880 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/Type.h 5 additions, 0 deletionsinclude/clang/AST/Type.h
- include/clang/Basic/DiagnosticSemaKinds.td 4 additions, 0 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- lib/AST/Type.cpp 29 additions, 16 deletionslib/AST/Type.cpp
- lib/Sema/SemaDecl.cpp 61 additions, 50 deletionslib/Sema/SemaDecl.cpp
- test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp 28 additions, 7 deletionstest/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp
- test/CXX/drs/dr12xx.cpp 17 additions, 3 deletionstest/CXX/drs/dr12xx.cpp
- test/CXX/drs/dr13xx.cpp 19 additions, 0 deletionstest/CXX/drs/dr13xx.cpp
- www/cxx_dr_status.html 2 additions, 2 deletionswww/cxx_dr_status.html
Loading
Please register or sign in to comment