History log of /external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3ed4d1cbaad763c103771bdefb8b986a08f165fc 18-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR14503: Don't assert if a constexpr constructor temploid instantiates to a
constructor that does not initialize all members, and that constructor is used
to initialize a global.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
ce61715606b5f55ccc023720cdf9c1a796b0d526 06-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y: support 'for', 'while', and 'do ... while' in constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
a10b97898ee6339c3110e6ca33f178ff52f05238 22-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y constexpr extensions, round 1: Allow most forms of declaration and
statement in constexpr functions. Everything which doesn't require variable
mutation is also allowed as an extension in C++11. 'void' becomes a literal
type to support constexpr functions which return 'void'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
b8abff66a8d30356c82314c4734c692cdd479e5e 28-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> C++ core issue 1344, PR10618: promote "addition of default argument makes this
a special member" diagnostic from warning to error, and fix the cases where it
produced diagnostics with incorrect wording.

We don't support this as an extension, and we ban it even in C++98 mode. This
breaks too much (for instance, the ABI-specified calling convention for a type
can change if it acquires a copy constructor through the addition of a default
argument).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
7756afa6273cf708b5e3fbd6a6478eb2cada27e2 10-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR13052 properly, by performing special member lookup to determine whether
an explicitly-defaulted default constructor would be constexpr. This is
necessary in weird (but well-formed) cases where a class has more than one copy
or move constructor.

Cleanup of now-unused parts of CXXRecordDecl to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
86c3ae46250cdcc57778c27826060779a92f3815 13-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Update constexpr implementation to match CWG's chosen approach for core issues
1358, 1360, 1452 and 1453.
- Instantiations of constexpr functions are always constexpr. This removes the
need for separate declaration/definition checking, which is now gone.
- This makes it possible for a constexpr function to be virtual, if they are
only dependently virtual. Virtual calls to such functions are not constant
expressions.
- Likewise, it's now possible for a literal type to have virtual base classes.
A constexpr constructor for such a type cannot actually produce a constant
expression, though, so add a special-case diagnostic for a constructor call
to such a type rather than trying to evaluate it.
- Classes with trivial default constructors (for which value initialization can
produce a fully-initialized value) are considered literal types.
- Classes with volatile members are not literal types.
- constexpr constructors can be members of non-literal types. We do not yet use
static initialization for global objects constructed in this way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
30ecfad3af057bff74d1c98099eda0677525574e 09-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> DR1359: A constexpr constructor does not need to initialize an empty struct or
empty union. This still rejects anonymous member structs or unions which only
contain such empty class types, pending standard wording defining exactly what
an empty class type is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
745f5147e065900267c85a5568785a1991d4838f 27-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: Implement the [dcl.constexpr]p5 check for whether a constexpr
function definition can produce a constant expression. This also provides the
last few checks for [dcl.constexpr]p3 and [dcl.constexpr]p4.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
2fe9b7fb07dff15dd15dd8755a9a9e6de0fe46fc 15-Dec-2011 Richard Trieu <rtrieu@google.com> Modify how the -verify flag works. Currently, the verification string and
diagnostic message are compared. If either is a substring of the other, then
no error is given. This gives rise to an unexpected case:

// expect-error{{candidate function has different number of parameters}}

will match the following error messages from Clang:

candidate function has different number of parameters (expected 1 but has 2)
candidate function has different number of parameters

It will also match these other error messages:

candidate function
function has different number of parameters
number of parameters

This patch will change so that the verification string must be a substring of
the diagnostic message before accepting. Also, all the failing tests from this
change have been corrected. Some stats from this cleanup:

87 - removed extra spaces around verification strings
70 - wording updates to diagnostics
40 - extra leading or trailing characters (typos, unmatched parens or quotes)
35 - diagnostic level was included (error:, warning:, or note:)
18 - flag name put in the warning (-Wprotocol)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
762bb9d0ad20320b9f97a841dce57ba5e8e48b07 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
6e4337556efa700d5b4dceac22fa0dfbd1cdee8f 10-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: Disable checking of constructor member initializer lists for
constexpr constructor templates. Such checking is optional, and currently hard
to get right since clang doesn't generate implicit member initializers until
instantiation (even for non-dependent members).

This is needed for clang to accept libstdc++ from g++4.6 in c++0x mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp
9f569cca2a4c5fb6026005434e27025b9e71309d 01-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: semantic checking for constexpr functions and constructors. Based in
part on patches by Peter Collingbourne.

We diverge from the C++11 standard in a few areas, mostly related to checking
constexpr function declarations, and not just definitions. See WG21 paper
N3308=11-0078 for details.

Function invocation substitution is not available in this patch; constexpr
functions cannot yet be used from within constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp