aboutsummaryrefslogtreecommitdiff
path: root/docs/LanguageExtensions.html
AgeCommit message (Collapse)Author
2011-10-10Now that we support move generation, mention this in the language extension ↵Sebastian Redl
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19Add list initialization for complex numbers in C. Essentially, this allows ↵Eli Friedman
"_Complex float x = {1.0f, 2.0f};". See changes to docs/LanguageExtensions.html for a longer description. <rdar://problem/9397672>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140090 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08Document __has_feature(objc_instancetype).Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139299 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08Allow C++0x enumerations with a fixed underlying type inDouglas Gregor
Objective-C. The @encode'ing of such an enumeration type is the same as its underlying type. <rdar://problem/5276348>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139297 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-08Implement the Objective-C 'instancetype' type, which is an alias ofDouglas Gregor
'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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139275 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-29Add and document __has_feature values for the remaining C++0xDouglas Gregor
features, so clients can check for the availability of these features even before we get around to implementing them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138741 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09Thread Safety: Added basic argument parsing for all new attributes.Caitlin Sadowski
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137130 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-07Add a __has_feature macro for generalized initializers, turned offSean Hunt
because we don't support them yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137027 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28Added basic parsing for all remaining attributes, thread safetyCaitlin Sadowski
analysis. This includes checking that the attributes are applied in the correct contexts and with the correct number of arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136383 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28Thread safety: Fix typo in documentationCaitlin Sadowski
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136370 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28Added parsing for guarded_var, pt_guarded_var, lockable,Caitlin Sadowski
scoped_lockable, and no_thread_safety_analysis attributes, all for thread safety analysis git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136364 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18Thanks to Chandler for reminding me to update the documentation for theSean Hunt
__underlying_type feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135402 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23Add documentation about __has_feature(cxx_delegationg_constructors)Sean Hunt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133693 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23Fix a minor copy-paste-o that broke the stylesheetsSean Hunt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133678 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23Fix a bunch of HTML compliance problems with LanguageExtensions.htmlSean Hunt
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133677 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23Revert "-fexceptions does not, in fact, enable C++ exceptions"Sean Hunt
In fact it does. For the driver anyway, and not cc1 which I'm supposed to pretend doesn't exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133673 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22-fexceptions does not, in fact, enable C++ exceptionsSean Hunt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133666 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-15Automatic Reference Counting.John McCall
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-11Implement Objective-C Related Result Type semantics.Douglas Gregor
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132868 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21Audit and finish the implementation of C++0x nullptr, fixing twoDouglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131813 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-13Introduce __has_extension macroPeter Collingbourne
__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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131308 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-11Implement CWG1170, which makes access-control errors into templateDouglas Gregor
argument deduction failures. Only implemented in C++0x, since this is a significant change in behavior from C++98/03. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131209 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-05Implement support for C++0x alias templates.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15Add __has_feature(cxx_range_for) check for C++11 range-based for loop.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129573 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15C1X: implement generic selectionsPeter Collingbourne
As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-09add a __sync_swap builtin to fill out the rest of the __sync builtins. Chris Lattner
Patch by Dave Zarzycki! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129189 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-25we can now claim to fully support the override control feature in C++0x.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128281 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-21and now there are 3!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128001 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-18Improve the documentation for some of the analyzer attributes I addedJohn McCall
a while back. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127866 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-15Create __has_feature(cxx_noexcept) and mark it as working.Sebastian Redl
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127701 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-23Update the www to indicate that auto is now implemented.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126280 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05Add a __has_feature check for default template arguments in functionDouglas Gregor
templates, a C++0x feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124973 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03Add __has_feature() for each of the type traitsDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124820 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-27Revert r124217 because it didn't catch the actual error case it was trying toJeffrey Yasskin
catch: lock_guard(my_mutex); declares a variable instead of creating a temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124398 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-26Add __has_feature(cxx_reference_qualified_functions); update tests andDouglas Gregor
documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124322 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-25Add an attribute to forbid temporary instances of a type. This allows classJeffrey Yasskin
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124217 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-25Document the ns_returns_retained, ns_consumed, etc. attributes.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124176 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-24Eliminate the last reference to concepts, from Jean-Daniel DupasDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124118 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-24Fix the __has_attribute example; we don't have an override attribute anymore.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124106 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-24remove some crazy leftover thing.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124098 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-19Eradicate any mention of C++0x concepts.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123860 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-28fix typoChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09make the example a bit better, encouraging people to use "suggestions of ↵Chris Lattner
what to use" in the message :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08Document Clang's support for attributes on individual enumerators andJohn McCall
tweak the documentation for deprecation-with-message. Provide __has_feature tests for both. rdar://problem/8605692 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20Add a __has_attribute macro that works much like __has_feature and ↵Anders Carlsson
__has_builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116906 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked aDouglas Gregor
bit by me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06Patch for adding message to unavailable attribute.Fariborz Jahanian
And its documentation. Finishes off // rdar: // 6734520. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115862 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01Implement the C++0x "trailing return type" feature, e.g.,Douglas Gregor
auto f(int) -> int from Daniel Wallin! (With a few minor bug fixes from me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-31Implement __has_feature(cxx_inline_namespaces)Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Reverted r103214.mike-m
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103222 91177308-0d34-0410-b5e6-96231b3b80d8