summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constexpr-value-init.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Improve diagnostic on default-initializing const variables (PR20208).Nico Weber2014-07-231-3/+3
| | | | | | | | This tweaks the diagnostic wording slighly, and adds a fixit on a note. An alternative would be to add the fixit directly on the diagnostic, see the review thread linked to from the bug for a few notes on that approach. llvm-svn: 213725
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-1/+1
| | | | llvm-svn: 196510
* Modify the uninitialized field visitor to detect uninitialized use across theRichard Trieu2013-09-201-1/+1
| | | | | | | | | | | | | | | | | | fields in the class. This allows a better checking of member intiailizers and in class initializers in regards to initialization ordering. For instance, this code will now produce warnings: class A { int x; int y; A() : x(y) {} // y is initialized after x, warn here A(int): y(x) {} // default initialization of leaves x uninitialized, warn here }; Several test cases were updated with -Wno-uninitialized to silence this warning. llvm-svn: 191068
* C++1y: support simple variable assignments in constexpr functions.Richard Smith2013-04-261-1/+1
| | | | llvm-svn: 180603
* PR12012: Fix a regression in r150419 where we would try (and fail) toRichard Smith2012-02-171-0/+6
| | | | | | | zero-initialize class types with virtual bases when constant-evaluating an initializer. llvm-svn: 150770
* Update constexpr implementation to match CWG's chosen approach for core issuesRichard Smith2012-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 150359
* Unrevert r147271, reverted in r147361.Richard Smith2011-12-301-0/+31
| | | | | | | | | | | | Also temporarily remove the assumption from IR gen that we can emit IR for every constant we can fold, since it isn't currently true in C++11, to fix PR11676. Original comment from r147271: constexpr: perform zero-initialization prior to / instead of performing a constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147384
* Revert r147271. This fixes PR11676.Rafael Espindola2011-12-301-31/+0
| | | | llvm-svn: 147362
* constexpr: perform zero-initialization prior to / instead of performing aRichard Smith2011-12-251-0/+31
constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147271
OpenPOWER on IntegriCloud