Implement current CWG direction for support of arrays of unknown bounds in
constant expressions. We permit array-to-pointer decay on such arrays, but disallow pointer arithmetic (since we do not know whether it will have defined behavior). This is based on r311970 and r301822 (the former by me and the latter by Robert Haberlach). Between then and now, two things have changed: we have committee feedback indicating that this is indeed the right direction, and the code broken by this change has been fixed. This is necessary in C++17 to continue accepting certain forms of non-type template argument involving arrays of unknown bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316245 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/DiagnosticASTKinds.td 9 additions, 0 deletionsinclude/clang/Basic/DiagnosticASTKinds.td
- include/clang/Basic/DiagnosticIDs.h 1 addition, 1 deletioninclude/clang/Basic/DiagnosticIDs.h
- lib/AST/ExprConstant.cpp 66 additions, 27 deletionslib/AST/ExprConstant.cpp
- test/SemaCXX/constant-expression-cxx11.cpp 23 additions, 12 deletionstest/SemaCXX/constant-expression-cxx11.cpp
- test/SemaCXX/constexpr-array-unknown-bound.cpp 26 additions, 0 deletionstest/SemaCXX/constexpr-array-unknown-bound.cpp
- test/SemaTemplate/temp_arg_nontype_cxx1z.cpp 3 additions, 0 deletionstest/SemaTemplate/temp_arg_nontype_cxx1z.cpp
Loading
Please register or sign in to comment