Commit Graph

231 Commits

Author SHA1 Message Date
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
Blaine Garst cfdb75891d expand discussion of __block C++ on-stack objects
llvm-svn: 117618
2010-10-28 23:30:10 +00:00
Chris Lattner 4935b45d74 make it really clear that vla != flexible arrays
llvm-svn: 117522
2010-10-28 02:20:32 +00:00
Blaine Garst 03b99365e3 small tweaks to reflect statements of what really ever shipped. ABI is, and has been, accurate for what we ship.
llvm-svn: 117504
2010-10-27 22:59:01 +00:00
Blaine Garst 2314079ef0 reconcile missing typos & delete obsolete pre-SnowLeopard section w.r.t. prior repository for this document
llvm-svn: 117492
2010-10-27 21:22:46 +00:00
Douglas Gregor d2893dd0b9 Document how source ranges work
llvm-svn: 117450
2010-10-27 16:02:28 +00:00
Michael J. Spencer 4992ca4b17 Reorganize predefined macros for all Windows targets.
This adds an option to set the _MSC_VER macro without
recompiling. This is very useful when testing compatibility
with the Windows SDK and c++stdlib headers.

-fmsc-version=<version> (defaults to VS2003 (1300))

llvm-svn: 116999
2010-10-21 05:21:48 +00:00
Anders Carlsson 274a70ed7f Add a __has_attribute macro that works much like __has_feature and __has_builtin.
llvm-svn: 116906
2010-10-20 02:31:43 +00:00
Chris Lattner a09e8efd1f Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.

llvm-svn: 116191
2010-10-11 05:44:49 +00:00
Douglas Gregor 0bf3140424 Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
bit by me). 

llvm-svn: 116122
2010-10-08 23:50:27 +00:00
Douglas Gregor 63b0a1e9fb Fix a typo in the Clang man page, from Alexander Best.
llvm-svn: 116102
2010-10-08 21:03:07 +00:00
Fariborz Jahanian c74073cd20 Patch for adding message to unavailable attribute.
And its documentation.
Finishes off // rdar: // 6734520.

llvm-svn: 115862
2010-10-06 23:12:32 +00:00
Douglas Gregor 7fb25418ed Implement the C++0x "trailing return type" feature, e.g.,
auto f(int) -> int

from Daniel Wallin!

(With a few minor bug fixes from me).

llvm-svn: 115322
2010-10-01 18:44:50 +00:00
Douglas Gregor 3aa045491f Update Clang man page to say a little bit more about C++
llvm-svn: 114735
2010-09-24 17:26:14 +00:00
Daniel Dunbar c1dd0e97f3 Driver/Objective-C: Retool Objective-C ABI flags to be more usable, and actually
document behavior. Will wonders never cease.

llvm-svn: 114334
2010-09-20 18:19:55 +00:00
Daniel Dunbar 549decf4cc Update users manual comments on X86 and ARM support.
llvm-svn: 114311
2010-09-19 19:26:59 +00:00
Daniel Dunbar 092b6fb187 Driver: Add a -stdlib= argument which can be used to select the C++ standard
library to use.
 - This is currently useful for testing libc++; you can now use 'clang++
   -stdlib=libc++ t.cpp' to compile using it if installed.

 - In the future could also be used to select other standard library choices if
   alternatives become available (for example, to use an alternate C library).

llvm-svn: 113891
2010-09-14 23:12:40 +00:00
Argyrios Kyrtzidis 2716b9ae54 Update 'docs/PCHInternals.html' about how subexpressions are stored.
llvm-svn: 113760
2010-09-13 17:48:02 +00:00
Douglas Gregor c6876fe121 Document our extension to constant-fold __builtin_strlen and strlen
llvm-svn: 113699
2010-09-11 18:08:34 +00:00
John McCall e37a619715 Update the internals manual for the removal of Action, as well as other
changes that are much older.

llvm-svn: 112951
2010-09-03 05:07:55 +00:00
Dawn Perchik 68bb1b441f Add support for Borland extensions via option -fborland-extensions
(original patch r112791 was reverted due to a bug).

llvm-svn: 112915
2010-09-02 23:59:25 +00:00
Dawn Perchik f0882f90f3 Reverting rev 112791 - apparently -fborland-extensions is on all the time?!
llvm-svn: 112797
2010-09-02 02:18:55 +00:00
Dawn Perchik 1fcc18c7bc Add support for Borland extensions via option -fborland-extensions
llvm-svn: 112791
2010-09-02 01:12:01 +00:00
Sebastian Redl a93bb5b807 Implement __has_feature(cxx_inline_namespaces)
llvm-svn: 112671
2010-08-31 23:28:47 +00:00
Ted Kremenek 800ad06e8c Document '__clang_analyzer__'.
llvm-svn: 111935
2010-08-24 18:12:35 +00:00
Douglas Gregor 34a462538e Clarify documentation of escaping for backslash
llvm-svn: 111806
2010-08-23 14:03:03 +00:00
Douglas Gregor 12e2a06824 Eliminate some extraneous whitespace in the machine-parseable Fix-It output.
llvm-svn: 111610
2010-08-20 03:17:33 +00:00
Douglas Gregor a03c296e79 Fix some typos in the documentation of -fdiagnostics-parseable-fixits. Typos by me, patch by Eelis van der Weegen
llvm-svn: 111573
2010-08-19 23:31:13 +00:00
Douglas Gregor eec975ce5a Add machine-parseable Fix-It output as part of diagnostics, under the
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!

llvm-svn: 111557
2010-08-19 20:24:43 +00:00
Daniel Dunbar 71323e66b6 Remove a gratuitous lie.
llvm-svn: 111253
2010-08-17 17:34:48 +00:00
Daniel Dunbar 1b8842d981 Update UsersManual, we support '#pragma align' now.
llvm-svn: 110040
2010-08-02 15:36:37 +00:00
Douglas Gregor 137b27da2e Document -f{no-}color-diagnostics
llvm-svn: 107985
2010-07-09 16:31:58 +00:00
Sebastian Redl 595c51342c Some preparatory work for chained PCH. No functionality change.
llvm-svn: 107915
2010-07-08 22:01:51 +00:00