• Home
  • History
  • Annotate
  • only in /external/clang/test/CXX/class/class.static/
History log of /external/clang/test/CXX/class/class.static/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
lass.static.data/p4.cpp
a367e9de80eb05e78f06dc35c1e050799e735282 29-Jan-2013 David Blaikie <dblaikie@gmail.com> Move -Wstatic-float-init fixit into a note & don't recover as if constexpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173841 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.cpp
b4b1d69f19f32e8aeb2ce1e0239c6e20a7f9e952 25-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Sync 'in class initialization of static const double' extension up with GCC,
and split it out of -Wgnu into its own warning flag.

* In C++11, this is now a hard error (GCC has no extension here in C++11 mode).
The error can be disabled with -Wno-static-float-init, and has a fixit to
add 'constexpr'.

* In C++98, this is still an ExtWarn, but is now controlled by
-Wstatic-float-init as well as -Wgnu.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173414 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.cpp
7ca4850a3e3530fa6c93b64b740446e32c97f992 13-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Deal with a horrible C++11 special case. If a non-literal type has a constexpr
constructor, and that constructor is used to initialize an object of static
storage duration such that all members and bases are initialized by constant
expressions, constant initialization is performed. In this case, the object
can still have a non-trivial destructor, and if it does, we must emit a dynamic
initializer which performs no initialization and instead simply registers that
destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150419 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.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
lass.static.data/p3.cpp
eb96af8a908ea28b2ca76e3848b2476852f592a6 19-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> Further testing for instantiation of out-of-line constexpr static data member
template definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148506 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.cpp
796c1a1e3e63e459e371383ac878aa5f40b02a8c 19-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> An instantiation of a constexpr static data member in a class template is
constexpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148505 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.cpp
66f85713bd0d22f867efa8e9fb0037befdd6b151 07-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: static data members declared constexpr are required to have an
initializer; all other constexpr variables are merely required to be
initialized. In particular, a user-provided constexpr default constructor can be
used for such initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144028 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.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
lass.static.data/p3.cpp
b52c0dddffdb27b3a058913020001afcfc937d8d 06-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR11067: A definition of a constexpr static variable doesn't need an initializer if the in-class declaration had one. Such a declaration must be initialized by a constant expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141279 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.cpp
2d23ec29805f54edb3243022c64d752b8fbe5f46 30-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> Suggest adding 'constexpr' if the GNU extension for in-class initializers for static const float members is used in C++11 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140828 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.cpp
947be1941e9a1d4233116f51a45799d3904d4231 30-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> Mark the ExtWarn for in-class initialization of static const float members as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140820 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.cpp
c6d990a767150b02337de1136fdb55ccf349f4d1 29-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: semantic checking for constexpr variables.

We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140801 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p3.cpp
3a91abf311dcc399944882004f3e0b29489d31c7 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Diagnose the presence of multiple initializations of static data
members, from Faisal Vali! Fixes PR6904.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111900 91177308-0d34-0410-b5e6-96231b3b80d8
lass.static.data/p4.cpp