summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/anonymous-struct.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` ↵Eric Fiselier2018-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | messages. Summary: There are cases where the same string or select is repeated verbatim in a lot of diagnostics. This can be a pain to maintain and update. Tablegen provides no way stash the common text somewhere and reuse it in the diagnostics, until now! This patch allows diagnostic texts to contain `%sub{<definition-name>}`, where `<definition-name>` names a Tablegen record of type `TextSubstitution`. These substitutions are done early, before the diagnostic string is otherwise processed. All `%sub` modifiers will be replaced before the diagnostic definitions are emitted. The substitution must specify all arguments used by the substitution, and modifier indexes in the substitution are re-numbered accordingly. For example: ``` def select_ovl_candidate : TextSubstitution<"%select{function|constructor}0%select{| template| %2}1">; ``` when used as ``` "candidate `%sub{select_ovl_candidate}3,2,1 not viable" ``` will act as if we wrote: ``` "candidate %select{function|constructor}3%select{| template| %1}2 not viable" ``` Reviewers: rsmith, rjmccall, aaron.ballman, a.sidorin Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46740 llvm-svn: 332799
* Add test for anonymous struct containing an implicitly private data member.Richard Smith2017-04-131-0/+3
| | | | | | Patch by Jacob Young! llvm-svn: 300266
* Lit C++11 Compatibility Patch #8Charles Li2016-04-141-4/+19
| | | | | | 24 tests have been updated for C++11 compatibility. llvm-svn: 266387
* Diagnose typedef names for linkage purposes that would changeJohn McCall2014-01-301-0/+7
| | | | | | | | | | | | | | a previously-computed linkage as an unsupportable error condition. Per discussion on cfe-commits, this appears to be a difficult-to-resolve flaw in our implementation approach; we may pursue this as a language defect, but for now it's better to diagnose it as unsupported than to produce inconsistent results (or assertions). Anything that we can do to limit how often this diagnostic fires, such as the changes in r200380, is probably for the best, though. llvm-svn: 200438
* Properly compute triviality for explicitly-defaulted or deleted special members.Richard Smith2012-12-081-2/+2
| | | | | | | | | | | | | | Remove pre-standard restriction on explicitly-defaulted copy constructors with 'incorrect' parameter types, and instead just make those special members non-trivial as the standard requires. This required making CXXRecordDecl correctly handle classes which have both a trivial and a non-trivial special member of the same kind. This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the new triviality computation technology. llvm-svn: 169667
* Don't provide errors for anonymous unions when they're actually anonymous ↵David Blaikie2011-10-191-0/+5
| | | | | | classes. llvm-svn: 142551
* Emit diagnostic error when the field of an anonymous struct is non trivial.Argyrios Kyrtzidis2010-08-161-0/+11
llvm-svn: 111158
OpenPOWER on IntegriCloud