Implement C++11 [expr.call]p11: If the operand to a decltype-specifier is a
function call (or a comma expression with a function call on its right-hand side), possibly parenthesized, then the return type is not required to be complete and a temporary is not bound. Other subexpressions inside a decltype expression do not get this treatment. This is implemented by deferring the relevant checks for all calls immediately within a decltype expression, then, when the expression is fully-parsed, checking the relevant constraints and stripping off any top-level temporary binding. Deferring the completion of the return type exposed a bug in overload resolution where completion of the argument types was not attempted, which is also fixed by this change. llvm-svn: 151117
Showing
- clang/include/clang/AST/ExprCXX.h 3 additions, 0 deletionsclang/include/clang/AST/ExprCXX.h
- clang/include/clang/Sema/Sema.h 23 additions, 5 deletionsclang/include/clang/Sema/Sema.h
- clang/lib/Parse/ParseDeclCXX.cpp 8 additions, 2 deletionsclang/lib/Parse/ParseDeclCXX.cpp
- clang/lib/Sema/Sema.cpp 2 additions, 1 deletionclang/lib/Sema/Sema.cpp
- clang/lib/Sema/SemaExpr.cpp 11 additions, 2 deletionsclang/lib/Sema/SemaExpr.cpp
- clang/lib/Sema/SemaExprCXX.cpp 104 additions, 8 deletionsclang/lib/Sema/SemaExprCXX.cpp
- clang/lib/Sema/SemaOverload.cpp 2 additions, 0 deletionsclang/lib/Sema/SemaOverload.cpp
- clang/lib/Sema/TreeTransform.h 6 additions, 1 deletionclang/lib/Sema/TreeTransform.h
- clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp 108 additions, 0 deletions...XX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp
- clang/test/SemaCXX/overload-call.cpp 9 additions, 0 deletionsclang/test/SemaCXX/overload-call.cpp
Loading
Please register or sign in to comment