summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx98-compat-pedantic.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang's handling of the copy performed in the second phase of classRichard Smith2016-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | copy-initialization. We previously got this wrong in a couple of ways: - we only looked for copy / move constructors and constructor templates for this copy, and thus would fail to copy in cases where doing so should use some other constructor (but see core issue 670), - we mishandled the special case for disabling user-defined conversions that blocks infinite recursion through repeated application of a copy constructor (applying it in slightly too many cases) -- though as far as I can tell, this does not ever actually affect the result of overload resolution, and - we misapplied the special-case rules for constructors taking a parameter whose type is a (reference to) the same class type by incorrectly assuming that only happens for copy/move constructors (it also happens for constructors instantiated from templates and those inherited from base classes). These changes should only affect strange corner cases (for instance, where the copy constructor exists but has a non-const-qualified parameter type), so for the most part it only causes us to produce more 'candidate' notes, but see the test changes for other cases whose behavior is affected. llvm-svn: 280776
* DR259: Demote the pedantic error for an explicit instantiation after anRichard Smith2016-08-311-4/+0
| | | | | | | | | explicit specialization to a warning for C++98 mode (this is a defect report resolution, so per our informal policy it should apply in C++98), and turn the warning on by default for C++11 and later. In all cases where it fires, the right thing to do is to remove the pointless explicit instantiation. llvm-svn: 280308
* Change -Wbind-to-temporary-copy from an ExtWarn to an Extension.Nico Weber2014-09-181-1/+28
| | | | | | | | | | | | | | | | | The reasoning is that this construct is accepted by all compilers and valid in C++11, so it doesn't seem like a useful warning to have enabled by default. Building with -pedantic, -Wbind-to-temporary-copy, or -Wc++98-compat still shows the warning. The motivation is that I built re2, and this was the only warning that was emitted during the build. Both changing re2 to fix the warning and detecting clang and suppressing the warning in re2's build seem inferior than just giving the compiler a good default for this warning. Also move the cxx98compat version of this warning to CXX98CompatPedantic, and update tests accordingly. llvm-svn: 218008
* C++1y is now C++14!Aaron Ballman2014-08-191-1/+1
| | | | | | Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording. llvm-svn: 215982
* Remove support for arrays of runtime bound in C++1y, now they have been votedRichard Smith2013-10-011-5/+0
| | | | | | out of the working paper. This reverts r179962 and r179992. llvm-svn: 191718
* r184100 Fix -- Updated test cases for contextual conversionLarisse Voufo2013-06-181-1/+1
| | | | llvm-svn: 184165
* Revert "Updated test cases for contextual conversion"Rafael Espindola2013-06-171-1/+1
| | | | | | | | | This reverts commit r184100. It was faling on some bots: http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/1973/steps/test_clang/logs/Clang%20%3A%3A%20SemaCXX__cxx1y-contextual-conversion-tweaks.cpp llvm-svn: 184108
* Updated test cases for contextual conversionLarisse Voufo2013-06-171-1/+1
| | | | llvm-svn: 184100
* Fixed one buildbot-failure-causing bug...Larisse Voufo2013-06-161-1/+1
| | | | llvm-svn: 184053
* Updated the support for contextual conversion tweaks (n3323) with a ↵Larisse Voufo2013-06-151-4/+9
| | | | | | previously overlooked part: implicitly converting array sizes to size_t, rather than contextually converting them to some unique type. llvm-svn: 184048
* Use 'c++' not 'cxx' in these diagnostic group names for consistency.Richard Smith2013-05-171-0/+2
| | | | llvm-svn: 182075
* Disable VLA diagnostic in C++1y mode, and add some tests.Richard Smith2013-04-201-0/+5
| | | | | | | | | | | | Still to do here: - we have a collection of syntactic accepts-invalids to diagnose - support non-PODs in VLAs, including dynamic initialization / destruction - runtime checks (and throw std::bad_array_length) for bad bound - support VLA capture by reference in lambdas - properly support VLAs in range-based for (don't recompute bound) llvm-svn: 179962
* Note that we support (and in fact have supported since the dawn of time itself)Richard Smith2013-04-191-0/+6
| | | | | | C++1y binary literals. llvm-svn: 179883
* Change the wording of the extension warning fromDmitri Gribenko2012-09-241-0/+6
| | | | | | | | | > 'long long' is an extension when C99 mode is not enabled to > 'long long' is a C++11 extension while compiling in C++98 mode. llvm-svn: 164545
* Minor improvements to some C99 variadic-macro-related diagnostics.Richard Smith2012-06-221-1/+1
| | | | llvm-svn: 159054
* 'extern template' is a C++11 feature. Add an Extension for C++98 (this matchesRichard Smith2011-10-201-0/+3
| | | | | | gcc's behaviour), and a -Wc++98-compat-pedantic warning for C++11. llvm-svn: 142597
* -Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.Richard Smith2011-10-181-0/+13
| | | | llvm-svn: 142419
* Implement -Wc++98-compat warnings for the parser.Richard Smith2011-10-151-0/+7
| | | | llvm-svn: 142056
* -Wc++98-compat warnings for the lexer.Richard Smith2011-10-151-0/+11
This also adds a -Wc++98-compat-pedantic for warning on constructs which would be diagnosed by -std=c++98 -pedantic (that is, it warns even on C++11 features which we enable by default, with no warning, in C++98 mode). llvm-svn: 142034
OpenPOWER on IntegriCloud