Instantiate exception specifications when instantiating function types (other
than the type of a function declaration). We previously didn't instantiate these at all! This also covers the pathological case where the only mention of a parameter pack is within the exception specification; this gives us a second way (other than alias templates) to reach the horrible state where a type contains an unexpanded pack, but its canonical type does not. This is a re-commit of r219977: r219977 was reverted in r220038 because it hit a wrong-code bug in GCC 4.7.2. (That's gcc.gnu.org/PR56135, and affects any implicit lambda-capture of 'this' within a template.) r219977 was a re-commit of r217995, r218011, and r218053: r217995 was reverted in r218058 because it hit a rejects-valid bug in MSVC. (Incorrect overload resolution in the presence of using-declarations.) It was re-committed in r219977 with a workaround for the MSVC rejects-valid. r218011 was a workaround for an MSVC parser bug. (Incorrect desugaring of unbraced range-based for loop). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221750 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/DataRecursiveASTVisitor.h 27 additions, 13 deletionsinclude/clang/AST/DataRecursiveASTVisitor.h
- include/clang/AST/Expr.h 17 additions, 14 deletionsinclude/clang/AST/Expr.h
- include/clang/AST/RecursiveASTVisitor.h 27 additions, 13 deletionsinclude/clang/AST/RecursiveASTVisitor.h
- include/clang/AST/Type.h 3 additions, 1 deletioninclude/clang/AST/Type.h
- include/clang/Sema/Sema.h 4 additions, 1 deletioninclude/clang/Sema/Sema.h
- lib/AST/Type.cpp 20 additions, 7 deletionslib/AST/Type.cpp
- lib/Sema/SemaDeclCXX.cpp 17 additions, 15 deletionslib/Sema/SemaDeclCXX.cpp
- lib/Sema/SemaExceptionSpec.cpp 16 additions, 8 deletionslib/Sema/SemaExceptionSpec.cpp
- lib/Sema/SemaTemplateInstantiate.cpp 46 additions, 16 deletionslib/Sema/SemaTemplateInstantiate.cpp
- lib/Sema/SemaTemplateInstantiateDecl.cpp 35 additions, 133 deletionslib/Sema/SemaTemplateInstantiateDecl.cpp
- lib/Sema/SemaType.cpp 2 additions, 1 deletionlib/Sema/SemaType.cpp
- lib/Sema/TreeTransform.h 140 additions, 17 deletionslib/Sema/TreeTransform.h
- test/CXX/except/except.spec/p1.cpp 8 additions, 1 deletiontest/CXX/except/except.spec/p1.cpp
- test/SemaTemplate/instantiate-exception-spec-cxx11.cpp 41 additions, 0 deletionstest/SemaTemplate/instantiate-exception-spec-cxx11.cpp
- test/SemaTemplate/instantiate-exception-spec.cpp 20 additions, 1 deletiontest/SemaTemplate/instantiate-exception-spec.cpp
Loading
Please register or sign in to comment