summaryrefslogtreecommitdiffstats
path: root/clang/docs/LanguageExtensions.html
Commit message (Collapse)AuthorAgeFilesLines
...
* Now that we support move generation, mention this in the language extension ↵Sebastian Redl2011-10-101-1/+2
| | | | | | and C++ status pages. Also update the C++ status for default functions, which are complete now that we can generate move functions, and destructor exception specifications, which I did a while ago. llvm-svn: 141558
* Add list initialization for complex numbers in C. Essentially, this allows ↵Eli Friedman2011-09-191-1/+37
| | | | | | | | "_Complex float x = {1.0f, 2.0f};". See changes to docs/LanguageExtensions.html for a longer description. <rdar://problem/9397672>. llvm-svn: 140090
* Document __has_feature(objc_instancetype).Douglas Gregor2011-09-081-0/+3
| | | | llvm-svn: 139299
* Allow C++0x enumerations with a fixed underlying type inDouglas Gregor2011-09-081-0/+19
| | | | | | | Objective-C. The @encode'ing of such an enumeration type is the same as its underlying type. <rdar://problem/5276348>. llvm-svn: 139297
* Implement the Objective-C 'instancetype' type, which is an alias ofDouglas Gregor2011-09-081-3/+15
| | | | | | | | | | 'id' that can be used (only!) via a contextual keyword as the result type of an Objective-C message send. 'instancetype' then gives the method a related result type, which we have already been inferring for a variety of methods (new, alloc, init, self, retain). Addresses <rdar://problem/9267640>. llvm-svn: 139275
* Add and document __has_feature values for the remaining C++0xDouglas Gregor2011-08-291-34/+79
| | | | | | | features, so clients can check for the availability of these features even before we get around to implementing them. llvm-svn: 138741
* Thread Safety: Added basic argument parsing for all new attributes.Caitlin Sadowski2011-08-091-34/+29
| | | | | | | | | | | | This patch special cases the parser for thread safety attributes so that all attribute arguments are put in the argument list (instead of a special parameter) since arguments may not otherwise resolve correctly without two-token lookahead. This patch also adds checks to make sure that attribute arguments are lockable objects. llvm-svn: 137130
* Add a __has_feature macro for generalized initializers, turned offAlexis Hunt2011-08-071-0/+8
| | | | | | because we don't support them yet. llvm-svn: 137027
* Added basic parsing for all remaining attributes, thread safetyCaitlin Sadowski2011-07-281-16/+133
| | | | | | | analysis. This includes checking that the attributes are applied in the correct contexts and with the correct number of arguments. llvm-svn: 136383
* Thread safety: Fix typo in documentationCaitlin Sadowski2011-07-281-1/+1
| | | | llvm-svn: 136370
* Added parsing for guarded_var, pt_guarded_var, lockable,Caitlin Sadowski2011-07-281-0/+52
| | | | | | scoped_lockable, and no_thread_safety_analysis attributes, all for thread safety analysis llvm-svn: 136364
* Thanks to Chandler for reminding me to update the documentation for theAlexis Hunt2011-07-181-0/+1
| | | | | | __underlying_type feature. llvm-svn: 135402
* Add documentation about __has_feature(cxx_delegationg_constructors)Alexis Hunt2011-06-231-0/+6
| | | | llvm-svn: 133693
* Fix a minor copy-paste-o that broke the stylesheetsAlexis Hunt2011-06-231-2/+2
| | | | llvm-svn: 133678
* Fix a bunch of HTML compliance problems with LanguageExtensions.htmlAlexis Hunt2011-06-231-51/+55
| | | | | | | | | One weird thing is the addition of several <a name=""> tags where previously there were id attributes on the <h3> tags. This is because the id attribute must begin with a letter, not an underscore. The name attribute is not so constrained, so links will continue to work. llvm-svn: 133677
* Revert "-fexceptions does not, in fact, enable C++ exceptions"Alexis Hunt2011-06-231-1/+1
| | | | | | | In fact it does. For the driver anyway, and not cc1 which I'm supposed to pretend doesn't exist. llvm-svn: 133673
* -fexceptions does not, in fact, enable C++ exceptionsAlexis Hunt2011-06-221-1/+1
| | | | llvm-svn: 133666
* Automatic Reference Counting.John McCall2011-06-151-0/+7
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Implement Objective-C Related Result Type semantics.Douglas Gregor2011-06-111-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related result types apply Cocoa conventions to the type of message sends and property accesses to Objective-C methods that are known to always return objects whose type is the same as the type of the receiving class (or a subclass thereof), such as +alloc and -init. This tightens up static type safety for Objective-C, so that we now diagnose mistakes like this: t.m:4:10: warning: incompatible pointer types initializing 'NSSet *' with an expression of type 'NSArray *' [-Wincompatible-pointer-types] NSSet *array = [[NSArray alloc] init]; ^ ~~~~~~~~~~~~~~~~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1: note: instance method 'init' is assumed to return an instance of its receiver type ('NSArray *') - (id)init; ^ It also means that we get decent type inference when writing code in Objective-C++0x: auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil]; // ^ now infers NSMutableArray* rather than id llvm-svn: 132868
* Audit and finish the implementation of C++0x nullptr, fixing twoDouglas Gregor2011-05-211-2/+1
| | | | | | | | | | | | | | minor issues along the way: - Non-type template parameters of type 'std::nullptr_t' were not permitted. - We didn't properly introduce built-in operators for nullptr ==, !=, <, <=, >=, or > as candidate functions . To my knowledge, there's only one (minor but annoying) part of nullptr that hasn't been implemented: catching a thrown 'nullptr' as a pointer or pointer-to-member, per C++0x [except.handle]p4. llvm-svn: 131813
* Introduce __has_extension macroPeter Collingbourne2011-05-131-101/+165
| | | | | | | | | | | | | | | __has_extension is a function-like macro which takes the same set of feature identifiers as __has_feature. It evaluates to 1 if the feature is supported by Clang in the current language (either as a language extension or a standard language feature) or 0 if not. At the same time, add support for the C1X feature identifiers c_generic_selections (renamed from generic_selections) and c_static_assert, and document them. Patch by myself and Jean-Daniel Dupas. llvm-svn: 131308
* Implement CWG1170, which makes access-control errors into templateDouglas Gregor2011-05-111-0/+5
| | | | | | | argument deduction failures. Only implemented in C++0x, since this is a significant change in behavior from C++98/03. llvm-svn: 131209
* Implement support for C++0x alias templates.Richard Smith2011-05-051-0/+6
| | | | llvm-svn: 130953
* Add __has_feature(cxx_range_for) check for C++11 range-based for loop.Richard Smith2011-04-151-0/+6
| | | | llvm-svn: 129573
* C1X: implement generic selectionsPeter Collingbourne2011-04-151-0/+15
| | | | | | | As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. llvm-svn: 129554
* add a __sync_swap builtin to fill out the rest of the __sync builtins. Chris Lattner2011-04-091-0/+31
| | | | | | Patch by Dave Zarzycki! llvm-svn: 129189
* we can now claim to fully support the override control feature in C++0x.Anders Carlsson2011-03-251-0/+6
| | | | llvm-svn: 128281
* and now there are 3!Chris Lattner2011-03-211-1/+1
| | | | llvm-svn: 128001
* Improve the documentation for some of the analyzer attributes I addedJohn McCall2011-03-181-13/+39
| | | | | | a while back. llvm-svn: 127866
* Create __has_feature(cxx_noexcept) and mark it as working.Sebastian Redl2011-03-151-0/+6
| | | | | | | Find out that our C++0x status has only one field for noexcept expression and specification together, and that it was accidentally already marked as fully implemented. This completes noexcept specification work. llvm-svn: 127701
* Update the www to indicate that auto is now implemented.Richard Smith2011-02-231-2/+1
| | | | llvm-svn: 126280
* Add a __has_feature check for default template arguments in functionDouglas Gregor2011-02-051-0/+5
| | | | | | templates, a C++0x feature. llvm-svn: 124973
* Add __has_feature() for each of the type traitsDouglas Gregor2011-02-031-1/+42
| | | | llvm-svn: 124820
* Revert r124217 because it didn't catch the actual error case it was trying toJeffrey Yasskin2011-01-271-28/+0
| | | | | | | | | | catch: lock_guard(my_mutex); declares a variable instead of creating a temporary. llvm-svn: 124398
* Add __has_feature(cxx_reference_qualified_functions); update tests andDouglas Gregor2011-01-261-3/+7
| | | | | | documentation. llvm-svn: 124322
* Add an attribute to forbid temporary instances of a type. This allows classJeffrey Yasskin2011-01-251-0/+28
| | | | | | | | | | | | | | | authors to write class __attribute__((forbid_temporaries)) Name { ... }; when they want to force users to name all variables of the type. This protects people from doing things like creating a scoped_lock that only lives for a single statement instead of an entire scope. The warning produced by this attribute can be disabled by -Wno-forbid-temporaries. llvm-svn: 124217
* Document the ns_returns_retained, ns_consumed, etc. attributes.John McCall2011-01-251-0/+45
| | | | llvm-svn: 124176
* Eliminate the last reference to concepts, from Jean-Daniel DupasDouglas Gregor2011-01-241-1/+0
| | | | llvm-svn: 124118
* Fix the __has_attribute example; we don't have an override attribute anymore.Anders Carlsson2011-01-241-3/+3
| | | | llvm-svn: 124106
* remove some crazy leftover thing.Chris Lattner2011-01-241-1/+1
| | | | llvm-svn: 124098
* Eradicate any mention of C++0x concepts.Douglas Gregor2011-01-191-7/+1
| | | | llvm-svn: 123860
* fix typoChris Lattner2010-11-281-1/+1
| | | | llvm-svn: 120254
* make the example a bit better, encouraging people to use "suggestions of ↵Chris Lattner2010-11-091-2/+2
| | | | | | what to use" in the message :) llvm-svn: 118612
* Document Clang's support for attributes on individual enumerators andJohn McCall2010-11-081-4/+45
| | | | | | | tweak the documentation for deprecation-with-message. Provide __has_feature tests for both. rdar://problem/8605692 llvm-svn: 118435
* Add a __has_attribute macro that works much like __has_feature and ↵Anders Carlsson2010-10-201-0/+24
| | | | | | __has_builtin. llvm-svn: 116906
* Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked aDouglas Gregor2010-10-081-0/+6
| | | | | | bit by me). llvm-svn: 116122
* Patch for adding message to unavailable attribute.Fariborz Jahanian2010-10-061-0/+9
| | | | | | | And its documentation. Finishes off // rdar: // 6734520. llvm-svn: 115862
* Implement the C++0x "trailing return type" feature, e.g.,Douglas Gregor2010-10-011-0/+6
| | | | | | | | | | auto f(int) -> int from Daniel Wallin! (With a few minor bug fixes from me). llvm-svn: 115322
* Implement __has_feature(cxx_inline_namespaces)Sebastian Redl2010-08-311-7/+15
| | | | llvm-svn: 112671
* Reverted r103214.mike-m2010-05-071-0/+658
| | | | llvm-svn: 103222
OpenPOWER on IntegriCloud