03ce5f8c68f55405db6001e82bdb18581d0dadce |
|
24-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y: track object lifetime during constexpr evaluation, and don't allow objects to be used once their lifetimes end. This completes the C++1y constexpr extensions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
bebf5b1bcfbf591dd3cd80c4aebd6486bb34f41c |
|
26-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y: support simple variable assignments in constexpr functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
282e7e66748cc6dd14d6f7f2cb52e5373c531e61 |
|
04-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In C++11 mode, when an integral constant expression is desired and we have a value of class type, look for a unique conversion operator converting to integral or unscoped enumeration type and use that. Implements [expr.const]p5. Sema::VerifyIntegerConstantExpression now performs the conversion and returns the converted result. Some important callers of Expr::isIntegralConstantExpr have been switched over to using it (including all of those required for C++11 conformance); this switch brings a side-benefit of improved diagnostics and, in several cases, simpler code. However, some language extensions and attributes have not been moved across and will not perform implicit conversions on constant expressions of literal class type where an ICE is required. In passing, fix static_assert to perform a contextual conversion to bool on its argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
244ee7b89a483fd3764637abdf95de2893b437d0 |
|
15-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Pedantic diagnostic correction: in C++, we have integral constant expressions, not integer constant expressions. In passing, fix the 'folding is an extension' diagnostic to not claim we're accepting the code, since that's not true in -pedantic-errors mode, and add this diagnostic to -Wgnu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
d7c56e1114bfe7d461786903bb720d2c6efc05a1 |
|
29-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Change the diagnostics which said 'accepted as an extension' to instead say 'is an extension'. The former is inappropriate and confusing when building with -Werror/-pedantic-errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
099e7f647ccda915513f2b2ec53352dc756082d3 |
|
19-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr handling improvements. Produce detailed diagnostics when a 'constexpr' variable is initialized by a non-constant expression, and pass in the variable being declared so that earlier-initialized fields' values can be used. Rearrange VarDecl init evaluation to make this possible, and in so doing fix a long-standing issue in our C++ constant expression handling, where we would mishandle cases like: extern const int a; const int n = a; const int a = 5; int arr[n]; Here, n is not initialized by a constant expression, so can't be used in an ICE, even though the initialization expression would be an ICE if it appeared later in the TU. This requires computing whether the initializer is an ICE eagerly, and saving that information in PCH files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
436c8898cd1c93c5bacd3fcc4ac586bc5cd77062 |
|
25-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Revert r142844, it broke selfhost. The problem appears to be a missing lvalue-to-rvalue conversion on the LHS operand of '->'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
41bf4f38348561a0f12c10d34f1673cd19a6eb04 |
|
24-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Constant expression evaluation: evaluate lvalues as lvalues, and rvalues as rvalues, as C++11 constant evaluation semantics require. DeclRefs referring to references can now use the normal initialization-caching codepath, which incidentally fixes a crash in cyclic initialization of references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
32cb47174304bc7ec11478b9497c4e10f48273d9 |
|
24-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
In accordance with the C89, C99 and C++98 standards, ICEs can only contain floating-point literals if they are the immediate operands of casts. ImplicitCastExpr is not a cast in the language-standards sense. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
db924224b51b153f24fbe492102d4edebcbbb7f4 |
|
11-Oct-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Extend lvalue evaluation in ExprConstant.cpp to handle CK_LValueBitCast (which is completely trivial). PR8836. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
eea0e817c609c662f3fef61bb257fddf1ae8f7b7 |
|
29-Sep-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR11040: CheckICE should not allow an lvalue bitcast as part of an integer constant expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
24c38e1ff057ce49c866294bf486444255e18f31 |
|
14-Jun-2011 |
Chris Lattner <sabre@nondot.org> |
fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member as an extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
60b4d049ae53bf837aee6def125df2fdb941a8ec |
|
06-Sep-2010 |
Eli Friedman <eli.friedman@gmail.com> |
Update test for r113128. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
0fb97083cc0f8a82e404e22991ae80d2216e71d5 |
|
18-May-2010 |
John McCall <rjmccall@apple.com> |
If a switch condition is constant, don't warn about missing enum cases. If a switch condition is constant, warn if there's no case for it. Constant switch conditions do come up in reasonable template code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
f604a5648d201d2350e1631a755121e9b837f9f2 |
|
24-Feb-2010 |
John McCall <rjmccall@apple.com> |
References to const int parameters with ICE default arguments are not ICEs. Fixes PR6373. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
1f1b3b3bdec84e2204f18732e3241f6907a17309 |
|
06-Feb-2010 |
John McCall <rjmccall@apple.com> |
Per discussion, remove the explicit restriction on static const data members with out-of-line initializers as integer constant expressions. Fixes PR6206. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 |
|
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
c013118155077cf8bdaef743c5dbce760114eed3 |
|
03-Dec-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Add recursion guards to ice-checking and evaluation for declrefs, so we don't infinitely recurse for cases we can't evaluate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
f299124fe491879fed48f611f6f299382d114dd4 |
|
11-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Eliminate some "default"s in CheckICE. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
59600d80b7e34e819cd25dd67f661aa1f3d9099d |
|
10-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
static_cast, reinterpret_cast, and const_cast can all be used in C++ integral constant expressions (for conversions to integer types, naturally). I don't *think* that const_casts will ever get to this point, but I also can't convince myself that they won't... so I've taken the safe route and allowed the ICE checking code to look at const_cast. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 |
|
24-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
Rename clang to clang-cc. Tests and drivers updated, still need to shuffle dirs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|
4a4251b9e719415f30db0f5170abf31296a62225 |
|
07-Feb-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Make const-initialized const integral variables I-C-Es in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/i-c-e-cxx.cpp
|