Commit Graph

563 Commits

Author SHA1 Message Date
Douglas Gregor bcfe5582a5 Document the conversion from a lambda closure type to a block pointer
in Objective-C++.

llvm-svn: 152446
2012-03-09 23:24:48 +00:00
Richard Smith f5a0d10c2c Add user-defined literals to release notes.
llvm-svn: 152424
2012-03-09 19:09:47 +00:00
Richard Smith 5023188315 User-defined literals are done.
llvm-svn: 152396
2012-03-09 08:41:27 +00:00
Richard Smith 1e3c1d38f2 Correct the documentation to give a legal example of a raw string literal.
llvm-svn: 152216
2012-03-07 08:57:31 +00:00
Richard Smith 522fa53703 Add a pile of tests for unrestricted unions, and advertise support for them.
llvm-svn: 151992
2012-03-03 23:51:05 +00:00
Jean-Daniel Dupas 999892f0d0 Fix Typo in 'objc changes' anchor.
llvm-svn: 151978
2012-03-03 13:37:22 +00:00
Kostya Serebryany b187449435 add documentation for -f[no-]thread-sanitizer and -f[no-]address-sanitizer to docs/UsersManual.html
llvm-svn: 151858
2012-03-01 23:14:19 +00:00
Jean-Daniel Dupas 908f130d58 Implement double underscore names support in __has_attribute
llvm-svn: 151809
2012-03-01 14:53:16 +00:00
Richard Smith d18cd186d0 Correct an example of a feature name to actually use a feature name rather
than an attribute name. Patch by Michel Morin!

llvm-svn: 151791
2012-03-01 02:12:07 +00:00
Richard Smith 2dc867f4e3 Update release notes and language extensions pages to note that support for
generalized initializers is available.

llvm-svn: 151477
2012-02-26 07:09:21 +00:00
Richard Smith 2cca7b5ca9 Accept __has_feature(__feature__) as a synonym for __has_feature(feature) (and
likewise for __has_extension). Patch by Jonathan Sauer!

llvm-svn: 151445
2012-02-25 10:41:10 +00:00
Douglas Gregor 29c42f2a25 Implement a new type trait __is_trivially_constructible(T, Args...)
that provides the behavior of the C++11 library trait
std::is_trivially_constructible<T, Args...>, which can't be
implemented purely as a library.

Since __is_trivially_constructible can have zero or more arguments, I
needed to add Yet Another Type Trait Expression Class, this one
handling arbitrary arguments. The next step will be to migrate
UnaryTypeTrait and BinaryTypeTrait over to this new, more general
TypeTrait class.

Fixes the Clang side of <rdar://problem/10895483> / PR12038.

llvm-svn: 151352
2012-02-24 07:38:34 +00:00
Douglas Gregor e5809a0aaf Fix indentation
llvm-svn: 151264
2012-02-23 17:54:00 +00:00
Douglas Gregor 1fe7e90758 Note that lambda expressions are available in the release notes for 3.1
llvm-svn: 151263
2012-02-23 17:51:51 +00:00
Douglas Gregor 64bfb2e88e Clang supports lambdas.
llvm-svn: 151239
2012-02-23 05:44:09 +00:00
Chad Rosier c41c5a8c39 Improve placement of clang crash diagnostics section.
llvm-svn: 151192
2012-02-22 20:26:10 +00:00
Chad Rosier 35d14d91c2 Add clang crash diagnostic info and associated flags to Clang user manual.
llvm-svn: 151184
2012-02-22 19:14:46 +00:00
Dmitri Gribenko e72fa2c113 Add -Wstrncat-size and -Wempty-body to release notes.
llvm-svn: 150879
2012-02-18 14:13:26 +00:00
Nico Weber 2668f0a132 Add a few minor items to the 3.1 release notes.
llvm-svn: 150656
2012-02-16 02:35:03 +00:00
Richard Smith 7e14ddd41b Start off release notes for clang 3.1 with reference to C11 anonymous structs
and unions, and C++11 generalized constant expressions.

llvm-svn: 150640
2012-02-16 00:32:27 +00:00
David Blaikie 040a3a28f1 Remove the unuseful -fdiagnostics-show-name
This option was added in r129614 and doesn't have any use case that I'm aware
of. It's possible that external tools are using these names - and if that's
the case we can certainly reassess the functionality, but for now it lets us
shave out a few unneeded bits from clang.

Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool.
This removes the actual diagnostic name strings from clang entirely.

Reviewed by Chris Lattner & Ted Kremenek.

llvm-svn: 150612
2012-02-15 19:45:34 +00:00
Richard Smith 1cb2af0b3a Advertize support for constexpr.
llvm-svn: 150524
2012-02-14 22:56:17 +00:00
Michael J. Spencer 9dc864b6ce Fix broken link. I believe this has been broken for at least 7 months.
llvm-svn: 150329
2012-02-12 09:11:39 +00:00
Benjamin Kramer a20863e67d Fix a typo (builting -> builtin).
Patch by Afriza N. Arief!

llvm-svn: 149822
2012-02-05 11:24:56 +00:00
Kostya Serebryany 588d6abf7d The following patch adds __attribute__((no_address_safety_analysis)) which will allow to disable
address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function.

When building with AddressSanitizer, add AddressSafety function attribute to every generated function
except for those that have __attribute__((no_address_safety_analysis)).

With this patch we will be able to
1. disable AddressSanitizer for a particular function
2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on.

llvm-svn: 148842
2012-01-24 19:25:38 +00:00
Kostya Serebryany 8c84d4591d [asan] document the need for -fno-optimize-sibling-calls
llvm-svn: 148716
2012-01-23 18:50:23 +00:00
Benjamin Kramer 83369b3377 Tweak markup.
llvm-svn: 148221
2012-01-15 16:42:14 +00:00
Anton Yartsev e89856784c added descriptions of vector extensions, info about vector literals and vector operations.
llvm-svn: 148220
2012-01-15 16:22:24 +00:00
Benjamin Kramer eaa262b5b8 Fix ALL the markup.
llvm-svn: 148219
2012-01-15 15:26:07 +00:00
Kostya Serebryany 417dfe7a16 [asan] mention -fno-omit-frame-pointer in the docs
llvm-svn: 147663
2012-01-06 17:35:27 +00:00
Benjamin Kramer e56f393249 Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" so this patch is surprisingly small.
Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility.

llvm-svn: 147221
2011-12-23 17:00:35 +00:00
Douglas Gregor 12aa609fd9 Fix typo 'typdefs', from Nikola Smiljanic
llvm-svn: 146894
2011-12-19 19:50:23 +00:00
Chris Lattner ac2bda8dd0 fix a broken link
llvm-svn: 146859
2011-12-19 07:49:23 +00:00
Chris Lattner ee9c24a40b clarify that clang version number macros are marketing version #'s, not something useful.
llvm-svn: 146672
2011-12-15 19:06:36 +00:00
Kostya Serebryany 7c5c789e38 [asan] update asan docs
llvm-svn: 146446
2011-12-12 23:22:31 +00:00
Richard Smith eb45aa0b2e Document the updated behaviour of __builtin_constant_p introduced in r146236.
llvm-svn: 146241
2011-12-09 03:40:28 +00:00
Chris Lattner 1e13e8ac97 we got badgered into supporting multi-alternative constraints.
llvm-svn: 145822
2011-12-05 18:29:03 +00:00
Douglas Gregor dca70af22f Implement support for the __is_final type trait, to determine whether
a class is marked 'final', from Alberto Ganesh Barbati! Fixes
PR11462.

llvm-svn: 145775
2011-12-03 18:14:24 +00:00
Kostya Serebryany 3aac38e90f [asan] update docs to allow, but discourage, -O0
llvm-svn: 145653
2011-12-02 00:24:42 +00:00
Peter Collingbourne a35dcd2310 Add Clang release notes for OpenCL C support.
llvm-svn: 145360
2011-11-29 02:03:07 +00:00
Peter Collingbourne 33d838c499 Fix URL typo.
llvm-svn: 145359
2011-11-29 02:03:03 +00:00
Chandler Carruth d196a1e637 Fix a spelling error pointed out by Sebastien, and tidy up the
formatting here a bit... mostly to my preferred bikeshed-blue.

llvm-svn: 145337
2011-11-29 00:24:20 +00:00
Chandler Carruth 9a39b455aa Remove the last of my notes. I don't think these really need to be in
the release notes despite their awesomeness. If we had a thorough
discussion of the performance of Clang in 2.9 vs. 3.0, the first would
be more relevant, but we don't. The serialization stuff hopefully isn't
terribly visible to end users.

Objections to these omissions are of course welcome. =]

llvm-svn: 145336
2011-11-29 00:24:18 +00:00
Chandler Carruth cb9f4c7fde Last major chunk of features. This covers a couple of language
extensions and one infrastructure feature addition that has a direct
impact on other projects which use Clang.

llvm-svn: 145335
2011-11-29 00:15:26 +00:00
Chandler Carruth 30befa0f7a And sink the GNU runtime bit into this section as a stub.
llvm-svn: 145334
2011-11-29 00:15:25 +00:00
Chandler Carruth 1ef751f4a5 Flesh out the Objective-C section a bit. This may well need some love
from the Objective-C experts, but the basic stuff is there now.

llvm-svn: 145333
2011-11-29 00:15:23 +00:00
Rafael Espindola e11c5f2d63 CFI is mentioned on the LLVM releases as the clang bits are relatively small.
llvm-svn: 145325
2011-11-28 23:58:04 +00:00
Francois Pichet 2a69e24291 Update release notes with 2 features now supported in -fms-extensions mode.
I think that's enough for my release notes.

llvm-svn: 145320
2011-11-28 23:46:15 +00:00
Richard Smith 0e8f5c7e9b Release notes: add link to ISO C++ 2011 standard from the C++11 section.
llvm-svn: 145317
2011-11-28 23:35:03 +00:00
Francois Pichet 44cb7b6354 Update release notes with information on MSVC mode.
llvm-svn: 145315
2011-11-28 23:30:46 +00:00
Richard Smith a7c7e2bb84 Release notes: fix up formatting of diagnostic example.
llvm-svn: 145311
2011-11-28 23:16:15 +00:00
Chandler Carruth 67f5d88869 Extract a Windows section in the release notes. Hopefully this is more
accurate than my original notes were based on IRC conversations. Windows
folks, please edit as needed to make this closer to the truth if I've
still got it wrong.

llvm-svn: 145309
2011-11-28 23:11:27 +00:00
Chandler Carruth 2d4fc0c329 Create a stub for Nick to hack on, nuking another of my rough notes.
llvm-svn: 145308
2011-11-28 23:02:13 +00:00
Chandler Carruth 17ca53c12c Pull the uninitialized values rewrite into the diagnostics section, and
add a bit to that section about the many bug-finding warnings that Clang
has grown since 2.9 as this is one of the more visible new additions.

llvm-svn: 145307
2011-11-28 22:54:33 +00:00
Chandler Carruth 6111e359e0 Remove some features that don't really seem major enough or widely used
enough to merit space in the release notes.

llvm-svn: 145306
2011-11-28 22:54:31 +00:00
Richard Smith 66fced550e Add a release notes section for C1X language features supported by clang 3.0.
llvm-svn: 145305
2011-11-28 22:48:25 +00:00
Chandler Carruth 2679f3cb12 Pull out the libclang section and try to clean it up some. This one
feels a bit spartan currently.

llvm-svn: 145302
2011-11-28 22:43:32 +00:00
Chandler Carruth 124d8ff0da We now have text (or comment stubs for others) for these...
llvm-svn: 145299
2011-11-28 22:36:40 +00:00
Chandler Carruth 7252e7a949 Expand and clean up the diagnostics section.
llvm-svn: 145298
2011-11-28 22:34:59 +00:00
Kostya Serebryany 1283ccf273 fix html markup
llvm-svn: 145297
2011-11-28 22:34:10 +00:00
Chandler Carruth 270e4511a7 Create a more organized (but still commented out as not very useful)
stub for OpenCL work. I can't really dig enough out of the commit log
messages other than to tell that a lot of work went into this in the 2.9
-> 3.0 timeframe. I'll let the folks touching it decide if it merits
a spot in the release notes and provide the appropriate details if so.

llvm-svn: 145291
2011-11-28 22:17:58 +00:00
Chandler Carruth b843b0be6b Create a 3.1 notes section in a comment so that the next batch are a bit
easier. Move the CUDA bits and the C1X/C++11 atomics stuff there. We
haven't exposed a __has_feature for the atomic builtins, so none of this
is available yet...

llvm-svn: 145288
2011-11-28 22:12:44 +00:00
Chandler Carruth c869fb3be9 Peter says this shouldn't make it to the relnotes, it's too immature at
this stage.

llvm-svn: 145286
2011-11-28 22:06:59 +00:00
Chandler Carruth c8b093de54 Flesh out and pretty-up the driver section. This could probably use some
more love w.r.t. platforms other than Linux?

llvm-svn: 145285
2011-11-28 21:56:30 +00:00
Chandler Carruth 8ecf3c970b Add a brief mention of the warning flag name updates associated with the
C++11 standard.

llvm-svn: 145284
2011-11-28 21:55:34 +00:00
Chandler Carruth f99d03b489 Tidy up, wrap lines, and use <code> tags more consistently.
llvm-svn: 145283
2011-11-28 21:47:51 +00:00
Anna Zaks c086f0f91b Cleanup the Release Notes for the static analyzer:
The performance improvement was committed after the 3.0 branch.
Constructors/destructors are handled by the CFG, but we do not do anything
special for them in the analyzer yet.

Since we do not have an open source release qualification for the analyzer,
we are not investing into creating the proper release notes for it.

llvm-svn: 145281
2011-11-28 21:31:55 +00:00
Kostya Serebryany 9751d340db First version of AddressSanitizer docs; documentation for __has_feature(address_sanitizer)
llvm-svn: 145276
2011-11-28 20:51:02 +00:00
Richard Smith 7a5898c3fe Add a release notes section on new C++11 language features, and flesh it out.
llvm-svn: 145268
2011-11-28 20:02:05 +00:00
Chandler Carruth 48f8f9fdb1 Add a proper blurb for the PPCallbacks features.
llvm-svn: 145261
2011-11-28 19:17:25 +00:00
Chandler Carruth 9252724a04 This doesn't really seem worthy of a relnote... Shout if you disagree!
llvm-svn: 145259
2011-11-28 19:11:25 +00:00
Chandler Carruth 61a0421cf4 Fill in a section for the instantiation -> expansion rename. Not great,
but better.

llvm-svn: 145258
2011-11-28 19:06:34 +00:00
Chandler Carruth 34dfcc5570 Add proper text for the Diagnostic API changes.
llvm-svn: 145257
2011-11-28 18:55:47 +00:00
Douglas Gregor 08dbbbb338 Add a release note for Objective-C related result types
llvm-svn: 145252
2011-11-28 17:51:39 +00:00
Douglas Gregor 6cfe81e603 Note that code completion now works better for in-class member functions
llvm-svn: 145251
2011-11-28 17:50:36 +00:00
Chandler Carruth e2031bbcb8 And that completes my sweep through commits for things that might be
worth noting in the release notes. These remain raw notes. I'll be
re-writing them into nice prose first thing tomorrow, with help from
others. A couple of notes for any reading the commits:

If you don't see something that should be mentioned, feel free to add
a note (or even a nicely written section) about it! I haven't really
done the static analyzer justice here as I don't really know what the
significant changes are other than mile-high stuff like watching it grow
C++ support and a more robust CFG. I also worry I've missed important
stuff in the Objective-C world.

If you see something that isn't worth mentioning, just delete it. I know
there are several things like this. I plan to prune the list down as
I flesh things out.

If you're name or email is on a bullet, I'll likely be sending you an
email asking for any input on that subject. For many of these I can fill
in something generic, and I'll just want you to give it a once-over.
However, if you have time, feel free to just write the blurb yourself
and drop it in, or drop it in an email to me.

Finally, *WOW* has a lot happened in Clang... I shouldn't have dreaded
(and put off) this so much, it was kind of awesome to go back and watch
the evolution. Anyways, these should be in a reasonable draft state
early tomorrow.

llvm-svn: 145247
2011-11-28 13:02:29 +00:00
Chandler Carruth 3fc02a2fd9 Finished with August's commits, and actually added a clearly missing
section on libclang.

llvm-svn: 145246
2011-11-28 12:24:23 +00:00
Chandler Carruth 2191916305 July's notes..
llvm-svn: 145245
2011-11-28 12:24:21 +00:00
Chandler Carruth e70b005a6d July was a bit quiet to... except for ARC. ;]
llvm-svn: 145242
2011-11-28 11:27:33 +00:00
Chandler Carruth 955ba6c076 June was a quiet month... I can't imagine why... ;]
llvm-svn: 145241
2011-11-28 10:57:14 +00:00
Chandler Carruth a393202377 Notes through another month... a *really* busy month, but mostly bug
fixing.

llvm-svn: 145237
2011-11-28 09:43:30 +00:00
Chandler Carruth 7c8e5ff578 Add the first month's commit notes.
llvm-svn: 145236
2011-11-28 08:41:06 +00:00
Chandler Carruth 629c3552bb Begin sketching out the Clang release notes. The plan is to link to
these more detailed notes from the primary LLVM release notes for Clang.
This gives us a nice place to flesh out in plenty of detail the major
changes that have happened in Clang land since 2.9.

I've outlined a very rough structure based on the LLVM release notes
structure and what seems like useful divisions in the Clang landscape
(e.g., language-specific stuff is relevant to a narrower audience).

I'll be first converting my brain-dump-ish notes from the commit logs,
and then cleaning here. Suggestions on structure welcome. Typo
corrections, spelling fixes (oh how I'll need them), all welcome; just
commit away.

llvm-svn: 145233
2011-11-28 07:16:19 +00:00
David Blaikie 4f1f9e6b2e Fix typo (becuase->because), PR11427
llvm-svn: 145117
2011-11-24 00:37:54 +00:00
Richard Smith f13b855809 Add stub section to the user manual for C++ language features, and document
-ftemplate-depth= and -fconstexpr-depth= in it.

llvm-svn: 145049
2011-11-21 20:54:59 +00:00
NAKAMURA Takumi 74793710c1 docs/UsersManual.html: Remove obsolete mingw issue.
llvm-svn: 144897
2011-11-17 07:54:13 +00:00
Ted Kremenek 1fcdaa9c05 ARC: make assignment to 'self' within class methods illegal. Fixes <rdar://problem/10416568>.
llvm-svn: 144572
2011-11-14 21:59:25 +00:00
Douglas Gregor f8b02cabca Fix grammaro
llvm-svn: 143633
2011-11-03 18:33:01 +00:00
Tanya Lattner fa7d9360f0 Do not create sub_dirs. This breaks the CSS links for the website and produces really long URLS.
llvm-svn: 143487
2011-11-01 20:09:03 +00:00
Douglas Gregor 3c469769a2 Add __has_feature(cxx_defaulted_functions) for querying "defaulted
functions", from Michel Morin!

llvm-svn: 143411
2011-11-01 01:19:34 +00:00
David Blaikie 8317245f9c Update documentation to use "C++11" instead of "C++0x"
llvm-svn: 142339
2011-10-18 05:49:30 +00:00
Bill Wendling 1c78ba0140 Enable CREATE_SUBDIRS for a performance win, because there are a lot of files being generated.
llvm-svn: 142113
2011-10-16 06:43:18 +00:00
Peter Collingbourne a8e267b398 Internals manual: eliminate mention of System library
llvm-svn: 142074
2011-10-15 16:59:24 +00:00
Peter Collingbourne 60188eb8bf Add c_alignas and cxx_alignas features
llvm-svn: 142020
2011-10-14 23:44:46 +00:00
Douglas Gregor a273f58c74 Fix grammaro
llvm-svn: 141927
2011-10-14 00:54:15 +00:00
Ted Kremenek a35d67dfd9 Implement built-in macro '__has_warning', which allows one to query if a warning flag is valid. Fixes <rdar://problem/10263428>.
llvm-svn: 141802
2011-10-12 19:46:30 +00:00
Douglas Gregor e7a8e3b612 Introduce BalancedDelimiterTracker, to better track open/close
delimiter pairs and detect when we exceed the implementation limit for
nesting depth, from Aaron Ballman!

llvm-svn: 141782
2011-10-12 16:37:45 +00:00
Daniel Dunbar 0f41eee2a0 Driver: Add support for a new -nostdlibinc option.
- This disables the system include directories, but not the compiler builtin
   directories. Useful for projects that want to use things like the intrinsic
   headers, but are otherwise freestanding.

 - I'm willing to reconsider the option naming, I also considered providing an
   explicit -builtinc (which would match -nobuiltininc), but this is more
   consistent with existing options.

llvm-svn: 141692
2011-10-11 18:20:16 +00:00
Sebastian Redl 6ce53ae752 Now that we support move generation, mention this in the language extension 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
2011-10-10 18:10:00 +00:00
Daniel Dunbar 920844c36e Revert my --working-directory option, which wasn't well thought through.
llvm-svn: 140889
2011-09-30 21:33:09 +00:00
Douglas Gregor 3984269260 Add a section detailing the steps required to add an expression or
statement to Clang.

llvm-svn: 140888
2011-09-30 21:32:37 +00:00
Daniel Dunbar 10d398f894 Driver: Add a --working-directory option which can be used to cause the compiler
to operate "as if" in a certain working directory.
 - For now, we just implement this by changing the actual working directory, but
   eventually we would want to handle this transparently. This is useful to
   avoid an extra exec() pair in some situations, and will be something we would
   want to support for more flexibility in using the Clang libraries.

llvm-svn: 140409
2011-09-23 20:33:41 +00:00
Eli Friedman 6b9c41ea68 Add list initialization for complex numbers in C. Essentially, this allows "_Complex float x = {1.0f, 2.0f};". See changes to docs/LanguageExtensions.html for a longer description.
<rdar://problem/9397672>.

llvm-svn: 140090
2011-09-19 23:17:44 +00:00
Douglas Gregor dc28ba12e1 Document __has_feature(objc_instancetype).
llvm-svn: 139299
2011-09-08 17:19:31 +00:00
Douglas Gregor 8b7d403684 Allow C++0x enumerations with a fixed underlying type in
Objective-C. The @encode'ing of such an enumeration type is the same
as its underlying type. <rdar://problem/5276348>.

llvm-svn: 139297
2011-09-08 17:18:35 +00:00
Douglas Gregor bab8a96f2f Implement the Objective-C 'instancetype' type, which is an alias of
'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
2011-09-08 01:46:34 +00:00
Douglas Gregor cd267f7e0d Update mingw-w64 part of the user manual, from Ruben Van Boxem!
llvm-svn: 138788
2011-08-30 00:40:12 +00:00
Douglas Gregor 26858b7e10 Add and document __has_feature values for the remaining C++0x
features, so clients can check for the availability of these features
even before we get around to implementing them.

llvm-svn: 138741
2011-08-29 17:28:38 +00:00
Ted Kremenek 66bfc1db14 Add documentation on -Weverything.
llvm-svn: 137911
2011-08-18 01:17:05 +00:00
NAKAMURA Takumi 5ae5353894 docs/doxygen.css: Import .memitem, .memproto and .memdoc from llvm/doxygen.
llvm-svn: 137435
2011-08-12 06:24:04 +00:00
Caitlin Sadowski 4b1e8399c2 Thread Safety: Added basic argument parsing for all new attributes.
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
2011-08-09 17:59:31 +00:00
Alexis Hunt 7d1492a99d Add a __has_feature macro for generalized initializers, turned off
because we don't support them yet.

llvm-svn: 137027
2011-08-07 00:34:32 +00:00
Caitlin Sadowski 63fa667c68 Added basic parsing for all remaining attributes, thread safety
analysis. This includes checking that the attributes are applied in the
correct contexts and with the correct number of arguments.

llvm-svn: 136383
2011-07-28 20:12:35 +00:00
Caitlin Sadowski 13d4444f96 Thread safety: Fix typo in documentation
llvm-svn: 136370
2011-07-28 18:38:36 +00:00
Caitlin Sadowski aac4d21ba7 Added parsing for guarded_var, pt_guarded_var, lockable,
scoped_lockable, and no_thread_safety_analysis attributes, all for thread safety analysis

llvm-svn: 136364
2011-07-28 17:21:07 +00:00
John McCall cf1667022f Document the existing objc_precise_lifetime attribute.
Introduce and document a new objc_returns_inner_pointer
attribute, and consume it by performing a retain+autorelease
on message receivers when they're not immediately loaded from
an object with precise lifetime.

llvm-svn: 135764
2011-07-22 08:53:00 +00:00
Alexis Hunt 106b4924e2 Thanks to Chandler for reminding me to update the documentation for the
__underlying_type feature.

llvm-svn: 135402
2011-07-18 17:22:33 +00:00
John McCall 7c3ed3d0c5 Document the behavior of property modifiers in ARC.
rdar://problem/9768338

llvm-svn: 135104
2011-07-13 23:15:32 +00:00
David Chisnall c2800aab7b Fix another typo (int -> id for captured_obj).
llvm-svn: 134998
2011-07-12 20:34:06 +00:00
David Chisnall 561471d2f3 Fix example: variable is initialized to 10 and then has 11 stored in it, but in the expanded version is initialized to 11.
llvm-svn: 134610
2011-07-07 09:49:59 +00:00
John McCall c3df93aa0d Move and elaborate the section on objc_arc_weak_unavailable.
llvm-svn: 134567
2011-07-07 00:03:42 +00:00
Fariborz Jahanian 1025318ca9 Update document for objc_arc_weak_unavailable attribute
on class declarations. Documentation for // rdar://9693477

llvm-svn: 134558
2011-07-06 22:56:44 +00:00
Fariborz Jahanian e634a92dac Update document on use of ns_returns_not_retained
attribute on property. Document for // rdar://9636091.

llvm-svn: 134556
2011-07-06 22:47:46 +00:00
Fariborz Jahanian 251e793a3f Update documentation for // rdar://9619861
llvm-svn: 134544
2011-07-06 21:58:44 +00:00
Jonathan D. Turner 3b1da3604f Update docs to remove reference to OverloadedFunctionDecl and replace it with DeclContext::lookup_result.
llvm-svn: 134514
2011-07-06 18:12:36 +00:00
Chris Lattner 052172bc14 fix typo
llvm-svn: 134361
2011-07-03 02:21:48 +00:00
Douglas Gregor c2e40fa681 Remove reference to the Index library
llvm-svn: 134238
2011-07-01 16:35:47 +00:00
Benjamin Kramer 0c14ce1dbf Remove doxygen.cfg to prevent accidental commits, it is generated from doxygen.cfg.in.
llvm-svn: 134072
2011-06-29 16:22:39 +00:00
Evan Cheng fbaa5b1077 Revert accidental commit.
llvm-svn: 134052
2011-06-29 01:23:25 +00:00
Evan Cheng eeb486dda5 SubtargetFeature.h has been moved to MC.
llvm-svn: 134050
2011-06-29 01:14:32 +00:00
Alexis Hunt b0d8199925 Add documentation about __has_feature(cxx_delegationg_constructors)
llvm-svn: 133693
2011-06-23 06:11:37 +00:00
Alexis Hunt efa0716ab7 Fix a minor copy-paste-o that broke the stylesheets
llvm-svn: 133678
2011-06-23 01:22:53 +00:00
Alexis Hunt aedbfe480f Fix a bunch of HTML compliance problems with LanguageExtensions.html
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
2011-06-23 01:21:01 +00:00
Alexis Hunt c0a2ab6421 Revert "-fexceptions does not, in fact, enable C++ exceptions"
In fact it does. For the driver anyway, and not cc1 which I'm supposed
to pretend doesn't exist.

llvm-svn: 133673
2011-06-23 00:42:53 +00:00
Alexis Hunt 6d756895a9 -fexceptions does not, in fact, enable C++ exceptions
llvm-svn: 133666
2011-06-22 23:49:12 +00:00
John McCall a994df5a02 More clarifications.
llvm-svn: 133387
2011-06-19 10:12:24 +00:00
John McCall fb414bc66d Improve the intro to the runtime-functions section.
llvm-svn: 133386
2011-06-19 09:59:33 +00:00
John McCall 092701c326 Describe the ARC runtime support calls.
llvm-svn: 133385
2011-06-19 09:36:02 +00:00
John McCall 9cc574d538 Clarify the semantics of init methods, and point out a few places
where mismatched semantics can cause undefined behavior.

llvm-svn: 133341
2011-06-18 08:15:19 +00:00
John McCall f8d4799267 A couple of minor changes to the ARC spec, plus a new section
specifying that retain/release/autorelease/retainCount are forbidden,
plus a section talking about the behavior of dealloc.

llvm-svn: 133340
2011-06-18 07:31:30 +00:00
Douglas Gregor d7357a9b8e Objective-C++ ARC: eliminate the utterly unjustified loophole that
silently dropped ownership qualifiers that were being applied to
ownership-qualified, substituted type that was *not* a substituted
template type parameter. We now provide a diagnostic in such cases,
and recover by dropping the added qualifiers.

Document this behavior in the ARC specification.

llvm-svn: 133309
2011-06-17 23:16:24 +00:00
Douglas Gregor 4fdf57b0b2 Fix a grammaro
llvm-svn: 133304
2011-06-17 22:19:27 +00:00
Douglas Gregor e46db90c9a Objective-ARC++: infer template type arguments of
ownership-unqualified retainable object type as __strong. This allows
us to write, e.g.,

  std::vector<id>

and we'll infer that the vector's element types have __strong
ownership semantics, which is far nicer than requiring:

  std::vector<__strong id>

Note that we allow one to override the ownership qualifier of a
substituted template type parameter, e.g., given

  template<typename T>
  struct X {
    typedef __weak T type;
  };

X<id> is treated the same as X<__strong id>. At instantiation type,
the __weak in "__weak T" overrides the (inferred or specified)
__strong on the template argument type, so that we can still provide
metaprogramming transformations.

This is part of <rdar://problem/9595486>.

llvm-svn: 133303
2011-06-17 22:11:49 +00:00
John McCall 31168b077c Automatic Reference Counting.
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
2011-06-15 23:02:42 +00:00
John McCall 556fad31d1 The specification document for the new ObjC Automatic Reference Counting
feature.

Implementation to follow. :)

llvm-svn: 133090
2011-06-15 21:21:53 +00:00
Chris Lattner dcb562dea4 remove the index page, we have dox now!
llvm-svn: 133087
2011-06-15 21:13:48 +00:00
Chris Lattner e67977214f mention new VLA behavior in gnu* vs c* mode dox.
llvm-svn: 133030
2011-06-15 00:41:40 +00:00
Blaine Garst f562bf239c fix example as per rdar://problem/9461587
llvm-svn: 133012
2011-06-14 21:41:00 +00:00
Eli Friedman 97f3d1a5ee Update extensions section of the docs to account for wacky gcc stuff we did end up implementing.
llvm-svn: 132947
2011-06-13 23:12:01 +00:00
Douglas Gregor 33823727c8 Implement Objective-C Related Result Type semantics.
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
2011-06-11 01:09:30 +00:00
Ted Kremenek 8c66ae7ddc Remove derelict documentation.
llvm-svn: 132407
2011-06-01 17:45:02 +00:00
Argyrios Kyrtzidis 0e37afa15e A StringRef-ication of the DiagnosticIDs API and internals.
Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static
diagnostic data structures, which resulted in a huge global-var-init function.

Depends on llvm commit r132046.

llvm-svn: 132047
2011-05-25 05:05:01 +00:00
Douglas Gregor 80af31397a Audit and finish the implementation of C++0x nullptr, fixing two
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
2011-05-21 23:15:46 +00:00
Douglas Gregor 643c922e66 Introduce the -fdiagnostics-format=xxx option to control how Clang
prints the file, line, and column of a diagnostic. We currently
support Clang's normal format, MSVC, and Vi formats.

Note that we no longer change the diagnostic format based on
-fms-extensions.

Patch by Andrew Fish!

llvm-svn: 131794
2011-05-21 17:07:29 +00:00
Peter Collingbourne d5d410faa8 Introduce __has_extension macro
__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
2011-05-13 20:54:45 +00:00
Peter Collingbourne d12d712c84 Delete doxygen.cfg, and use cwd-relative paths in doxygen.cfg.in.
Now "make doxygen" works for clang.

llvm-svn: 131282
2011-05-13 03:29:06 +00:00
Douglas Gregor 347d626cf7 Implement CWG1170, which makes access-control errors into template
argument deduction failures. Only implemented in C++0x, since this is
a significant change in behavior from C++98/03.

llvm-svn: 131209
2011-05-11 23:45:11 +00:00
Richard Smith 3f1b5d077b Implement support for C++0x alias templates.
llvm-svn: 130953
2011-05-05 21:57:07 +00:00
Chad Rosier b9a8525bab Documentation for -Oz; Updated synopsis and item.
llvm-svn: 130570
2011-04-30 02:04:10 +00:00
Chad Rosier bc8d7c27d9 Add documentation for -Oz flag.
llvm-svn: 130569
2011-04-30 01:40:58 +00:00
Richard Smith 9bc6eedab4 Add __has_feature(cxx_range_for) check for C++11 range-based for loop.
llvm-svn: 129573
2011-04-15 15:14:40 +00:00
Chris Lattner 57540c5be0 fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Peter Collingbourne 9114759641 C1X: implement generic selections
As an extension, generic selection support has been added for all
supported languages.  The syntax is the same as for C1X.

llvm-svn: 129554
2011-04-15 00:35:48 +00:00
Chris Lattner 9cb59fa834 add a __sync_swap builtin to fill out the rest of the __sync builtins.
Patch by Dave Zarzycki!

llvm-svn: 129189
2011-04-09 03:57:26 +00:00
Chris Lattner e094ee0a34 typo fix + expand
llvm-svn: 129167
2011-04-08 22:58:43 +00:00
Evan Cheng 298de937e7 Minor format fix.
llvm-svn: 129164
2011-04-08 22:34:21 +00:00
Evan Cheng fbbacc9241 Document -ftrap-function= option
llvm-svn: 129162
2011-04-08 22:18:01 +00:00
NAKAMURA Takumi 584f2de0a3 docs/UsersManual.html: Fix some inconsistent HTML elements.
llvm-svn: 128876
2011-04-05 04:31:31 +00:00
NAKAMURA Takumi a33296392e docs/UsersManual.html: "&quot;"ize in a paragraph. A few unpaired quotations might confuse HTML-aware text edtors.
llvm-svn: 128871
2011-04-05 00:57:02 +00:00
NAKAMURA Takumi ce60187a89 docs/UsersManual.html: Add cygming notes.
llvm-svn: 128819
2011-04-04 15:02:41 +00:00
Anders Carlsson 69f1f9391b we can now claim to fully support the override control feature in C++0x.
llvm-svn: 128281
2011-03-25 15:04:23 +00:00
Chris Lattner 04fe64f899 and now there are 3!
llvm-svn: 128001
2011-03-21 16:25:11 +00:00
Peter Collingbourne e4c02400ad Code modification hints have been known as fix-it hints for almost
a year now.  Update the internals manual.

llvm-svn: 127983
2011-03-21 01:45:18 +00:00
Ted Kremenek d15609a582 Remove '-Xclang' and '-mllvm' entries from Clang man page. The later is only available in debug builds and the former is not supposed to be used by end-users.
llvm-svn: 127914
2011-03-18 22:11:40 +00:00
John McCall 6107fc9e68 Improve the documentation for some of the analyzer attributes I added
a while back.

llvm-svn: 127866
2011-03-18 03:51:49 +00:00
Sebastian Redl c17003c66b Create __has_feature(cxx_noexcept) and mark it as working.
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
2011-03-15 21:17:12 +00:00
Peter Collingbourne 2f1e36bfd0 Rename tok::eom to tok::eod.
The previous name was inaccurate as this token in fact appears at
the end of every preprocessing directive, not just macro definitions.
No functionality change, except for a diagnostic tweak.

llvm-svn: 126631
2011-02-28 02:37:51 +00:00
Richard Smith bb7dcf59a0 Update the www to indicate that auto is now implemented.
llvm-svn: 126280
2011-02-23 00:41:16 +00:00
Chris Lattner c4ef61af9a we now support __label__
llvm-svn: 125826
2011-02-18 04:12:08 +00:00
Chris Lattner 18703d41f0 fix two broken links and some out of date writing, PR9174
llvm-svn: 125484
2011-02-14 06:42:50 +00:00
Douglas Gregor 7115aee109 Add a __has_feature check for default template arguments in function
templates, a C++0x feature.

llvm-svn: 124973
2011-02-05 20:35:30 +00:00
Douglas Gregor 7c60768590 Add __has_feature() for each of the type traits
llvm-svn: 124820
2011-02-03 21:57:35 +00:00
Jeffrey Yasskin f66a5283ed Document how to add an attribute to clang. This should be reviewed by someone
who actually knows how it works.

llvm-svn: 124506
2011-01-28 23:41:54 +00:00
Jeffrey Yasskin bbc4eea2c2 Revert r124217 because it didn't catch the actual error case it was trying to
catch:

  lock_guard(my_mutex);

declares a variable instead of creating a temporary.

llvm-svn: 124398
2011-01-27 19:17:54 +00:00
Douglas Gregor 56d5f0abaa Add __has_feature(cxx_reference_qualified_functions); update tests and
documentation.

llvm-svn: 124322
2011-01-26 21:25:54 +00:00
Jeffrey Yasskin 08a4f8f197 Add an attribute to forbid temporary instances of a type. This allows class
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
2011-01-25 20:08:12 +00:00
John McCall 46669c0996 Document the ns_returns_retained, ns_consumed, etc. attributes.
llvm-svn: 124176
2011-01-25 04:26:21 +00:00
Douglas Gregor fa69024463 Eliminate the last reference to concepts, from Jean-Daniel Dupas
llvm-svn: 124118
2011-01-24 15:22:41 +00:00
Anders Carlsson 3bbfb7f64b Fix the __has_attribute example; we don't have an override attribute anymore.
llvm-svn: 124106
2011-01-24 03:54:51 +00:00
Chris Lattner c2989b3718 fix some typos, patch by Jonathan Wakely!
llvm-svn: 124105
2011-01-24 03:47:59 +00:00
Chris Lattner 7d29d4503a fix a broken example, PR9005, patch by Jonathan Wakely!
llvm-svn: 124104
2011-01-24 03:47:34 +00:00
Chris Lattner d8d7543419 remove some crazy leftover thing.
llvm-svn: 124098
2011-01-24 02:53:58 +00:00
Douglas Gregor 312ab72dbd Eradicate any mention of C++0x concepts.
llvm-svn: 123860
2011-01-19 23:15:20 +00:00
Bob Wilson ce3ee6539e NEON vector support for ARM is in pretty good shape now. Update the docs.
llvm-svn: 123183
2011-01-10 17:55:14 +00:00
Douglas Gregor e350923a9b Fix documentation typo, from nobled.
llvm-svn: 121768
2010-12-14 16:21:49 +00:00
Eric Christopher b0fd4599de And more gzip goodness for clang.
llvm-svn: 121453
2010-12-10 01:59:28 +00:00
Chris Lattner 19e0fd0b2b fix typo
llvm-svn: 120254
2010-11-28 18:19:13 +00:00
Chris Lattner 2a6ee91619 move AdvanceToTokenCharacter and getLocForEndOfToken from
Preprocessor to Lexer where they make more sense.

llvm-svn: 119474
2010-11-17 07:05:50 +00:00
Chris Lattner e56c786f11 make the example a bit better, encouraging people to use "suggestions of what to use" in the message :)
llvm-svn: 118612
2010-11-09 19:43:35 +00:00
John McCall f71b45367f Document Clang's support for attributes on individual enumerators and
tweak the documentation for deprecation-with-message.  Provide __has_feature
tests for both.  rdar://problem/8605692

llvm-svn: 118435
2010-11-08 19:48:17 +00:00