summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-class.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Bugfix: bogus warning -- "invalid use of non-static data member",DeLesley Hutchins2012-02-251-0/+11
| | | | | | | when a class is forward declared, and the reference to the data member in question does not occur within a method body. llvm-svn: 151413
* Change the diagnostics which said 'accepted as an extension' to instead sayRichard Smith2011-12-291-2/+2
| | | | | | | 'is an extension'. The former is inappropriate and confusing when building with -Werror/-pedantic-errors. llvm-svn: 147357
* constexpr handling improvements. Produce detailed diagnostics when a 'constexpr'Richard Smith2011-12-191-2/+2
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 146856
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Suggest adding 'constexpr' if the GNU extension for in-class initializers ↵Richard Smith2011-09-301-2/+2
| | | | | | for static const float members is used in C++11 mode. llvm-svn: 140828
* Mark the ExtWarn for in-class initialization of static const float members ↵Richard Smith2011-09-291-2/+2
| | | | | | as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode. llvm-svn: 140820
* In C++0x, static const volatile data members cannot be initialized in-class.Richard Smith2011-09-291-0/+28
llvm-svn: 140809
OpenPOWER on IntegriCloud