summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/special/class.inhctor
Commit message (Collapse)AuthorAgeFilesLines
* When diagnosing the lack of a viable conversion function, also listRichard Smith2020-01-091-1/+1
| | | | | | | | | | | | | | explicit functions that are not candidates. It's not always obvious that the reason a conversion was not possible is because the function you wanted to call is 'explicit', so explicitly say if that's the case. It would be nice to rank the explicit candidates higher in the diagnostic if an implicit conversion sequence exists for their arguments, but unfortunately we can't determine that without potentially triggering non-immediate-context errors that we're not permitted to produce.
* When diagnosing an ambiguity, only note the candidates that contributeRichard Smith2019-10-243-8/+8
| | | | to the ambiguity, rather than noting all viable candidates.
* [SemaDeclCXX] Allow inheriting constructor declaration to specify a ↵Tan S. B.2019-08-171-0/+1
| | | | | | | | cv-qualified type Differential Revision: https://reviews.llvm.org/D47419 llvm-svn: 369196
* [Sema] Use %sub to cleanup overload diagnosticsEric Fiselier2018-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds the newly added `%sub` diagnostic modifier to cleanup repetition in the overload candidate diagnostics. I think this should be good to go. @rsmith: Some of the notes now emit `function template` where they only said `function` previously. It seems OK to me, but I would like your sign off on it. Reviewers: rsmith, EricWF Reviewed By: EricWF Subscribers: cfe-commits, rsmith Differential Revision: https://reviews.llvm.org/D47101 llvm-svn: 333485
* PR31606: Generalize our tentative DR resolution for inheriting copy/moveRichard Smith2017-01-133-10/+10
| | | | | | constructors to better match the pre-P0136R1 behavior. llvm-svn: 291955
* P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:Richard Smith2016-06-286-114/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace inheriting constructors implementation with new approach, voted into C++ last year as a DR against C++11. Instead of synthesizing a set of derived class constructors for each inherited base class constructor, we make the constructors of the base class visible to constructor lookup in the derived class, using the normal rules for using-declarations. For constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived class that tracks the requisite additional information. We create shadow constructors (not found by name lookup) in the derived class to model the actual initialization, and have a new expression node, CXXInheritedCtorInitExpr, to model the initialization of a base class from such a constructor. (This initialization is special because it performs real perfect forwarding of arguments.) In cases where argument forwarding is not possible (for inalloca calls, variadic calls, and calls with callee parameter cleanup), the shadow inheriting constructor is not emitted and instead we directly emit the initialization code into the caller of the inherited constructor. Note that this new model is not perfectly compatible with the old model in some corner cases. In particular: * if B inherits a private constructor from A, and C uses that constructor to construct a B, then we previously required that A befriends B and B befriends C, but the new rules require A to befriend C directly, and * if a derived class has its own constructors (and so its implicit default constructor is suppressed), it may still inherit a default constructor from a base class llvm-svn: 274049
* Implement the remaining portion of DR1467 from r227022. I may have ↵Larisse Voufo2015-01-271-1/+1
| | | | | | overlooked a few things, but this implementation comes straight from the DR resolution itself. llvm-svn: 227224
* Replace "can not" with "cannot" in diagnostics messages.Ismail Pazarbasi2014-03-071-3/+3
| | | | llvm-svn: 203302
* Implemented delayed processing of 'unavailable' checking, just like with ↵Ted Kremenek2013-12-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 'deprecated'. Fixes <rdar://problem/15584219> and <rdar://problem/12241361>. This change looks large, but all it does is reuse and consolidate the delayed diagnostic logic for deprecation warnings with unavailability warnings. By doing so, it showed various inconsistencies between the diagnostics, which were close, but not consistent. It also revealed some missing "note:"'s in the deprecated diagnostics that were showing up in the unavailable diagnostics, etc. This change also changes the wording of the core deprecation diagnostics. Instead of saying "function has been explicitly marked deprecated" we now saw "'X' has been been explicitly marked deprecated". It turns out providing a bit more context is useful, and often we got the actual term wrong or it was not very precise (e.g., "function" instead of "destructor"). By just saying the name of the thing that is deprecated/deleted/unavailable we define this issue away. This diagnostic can likely be further wordsmithed to be shorter. llvm-svn: 197627
* Fix crash-on-invalid with inheriting constructor.Eli Friedman2013-07-181-1/+3
| | | | | | Fixes PR16656. llvm-svn: 186631
* Clean up diagnostics for inheriting constructors.Eli Friedman2013-07-182-14/+12
| | | | | | | No new diagnostics, just better wording and notes pointing at more relevant locations. llvm-svn: 186629
* PR15755: don't drop parameter packs when dropping parameters with defaultRichard Smith2013-04-171-0/+13
| | | | | | arguments in the formation of a candidate set of inheriting constructors. llvm-svn: 179708
* C++11 inheriting constructors: support for inheriting constructor templates.Richard Smith2013-04-107-7/+107
| | | | llvm-svn: 179151
* Bring inheriting constructor implementation up-to-date with current defectRichard Smith2013-03-187-22/+231
| | | | | | | | | reports, and implement implicit definition of inheriting constructors. Remaining missing features: inheriting constructor templates, implicit exception specifications for inheriting constructors, inheriting constructors from dependent bases. llvm-svn: 177320
* PR12224 (sort of): Diagnose inheriting constructor declarations in C++11 mode.Richard Smith2012-04-273-20/+20
| | | | | | | We do not support IRGen for these, and get some parts of the semantic analysis wrong. llvm-svn: 155728
* Basic semantic analysis support for inheriting constructor declarations inRichard Smith2012-04-023-1/+56
| | | | | | dependent contexts. llvm-svn: 153858
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-133-3/+3
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Declare and define implicit move constructor and assignment operator.Sebastian Redl2011-08-301-2/+2
| | | | | | | | | This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. llvm-svn: 138821
* Revert "Disable inherited constructors for 2.9."Sebastian Redl2011-03-123-9/+3
| | | | | | It is only meant for the release branch. llvm-svn: 127542
* Disable inherited constructors for 2.9.Sebastian Redl2011-03-123-3/+9
| | | | llvm-svn: 127541
* Basic implementation of inherited constructors. Only generates declarations, ↵Sebastian Redl2011-02-053-0/+79
and probably only works for very basic use cases. llvm-svn: 124970
OpenPOWER on IntegriCloud