Commit Graph

689 Commits

Author SHA1 Message Date
Dmitry Vyukov be66bf152e tsan: update docs
llvm-svn: 170311
2012-12-17 07:16:54 +00:00
Chandler Carruth 1aa9f173fc Clean up a small (messy) section of Clang's release notes for 3.2.
llvm-svn: 170309
2012-12-17 06:24:36 +00:00
Dmitri Gribenko 544bd61989 Documentation: add a missing word
llvm-svn: 170296
2012-12-16 19:55:39 +00:00
Dmitri Gribenko 2d1fa58fa9 Clang ReleaseNotes: add information about documentation comments support
llvm-svn: 170294
2012-12-16 17:38:09 +00:00
Dmitri Gribenko 7730cf0b62 Documentation: AutomaticReferenceCounting.rst: use CSS section numbering.
This enables us to use the same document structure as in other files.

llvm-svn: 170283
2012-12-16 11:25:45 +00:00
Sean Silva 55b7cbe8ed docs: Fix completely broken adornment structure.
The adornment:

===
Foo
===

is for titles, not sections.

llvm-svn: 170278
2012-12-16 00:23:40 +00:00
Dmitri Gribenko 7ac0cc3698 Documentation: random cleanups. Use monospaced font where appropriate,
highlight console output with "code-block:: console", etc.

llvm-svn: 170276
2012-12-15 21:10:51 +00:00
Dmitri Gribenko d9d26072d6 Documentation: convert InternalsManual.html to reST
Patch by Anastasi Voitova with with small fixes by me.

llvm-svn: 170275
2012-12-15 20:41:17 +00:00
Dmitri Gribenko ace09a2466 Documentation: LanguageExtensions.rst: convert link to :doc: style and fix up
heading underline.

llvm-svn: 170272
2012-12-15 14:25:25 +00:00
Jordan Rose 32e9489058 Docs: redirect "static analysis extensions" section to the analyzer site.
The notes on the objc_method_family and ns_returns_retained-type attributes
have been moved to the Objective-C section, since both are used by ARC.
The notes on analyzer_noreturn are now only on the analyzer site.

The inadequacy of these docs was noticed months ago by Jonathan Sauer;
I'm only just now getting around to cleaning them up.

llvm-svn: 170261
2012-12-15 00:37:01 +00:00
Jordan Rose ba8307d2e5 Remove old description of analyzer internals from public docs.
The file still exists in docs/analyzer/, but it won't be linked to from
clang.llvm.org or processed as part of the default Sphinx doc-build.
RegionStore has changed a lot from what Ted and Zhongxing describe here!

llvm-svn: 170260
2012-12-15 00:36:53 +00:00
Edwin Vane 524741fbbd Style and Doc fix for CommonOptionsParser
- Renaming GetCompilations() and GetSourcePathList() to follow LLVM
  style.
- Updating docs to reflect name change.
- Also updating help text to not mention clang-check since this class
  can be used by any tool.

Reviewed By: Alexander Kornienko

llvm-svn: 170229
2012-12-14 18:58:25 +00:00
Dmitri Gribenko 795774018e Documentation: add AutomaticReferenceCounting.rst to the toctree
llvm-svn: 170133
2012-12-13 16:06:00 +00:00
Dmitri Gribenko 6c48a8c4ee Documentation: convert AutomaticReferenceCounting.html to reST
Patch by Anastasi Voitova with with small fixes by me.

llvm-svn: 170132
2012-12-13 16:04:37 +00:00
Richard Smith bb741f4552 Point a hyperlink back to where it was before it got reStructured.
llvm-svn: 170110
2012-12-13 07:29:23 +00:00
Richard Smith 1629da95fe ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of
bit-patterns which are not valid values for enumerated or boolean types.
These checks are the ubsan analogue of !range metadata.

llvm-svn: 170108
2012-12-13 07:11:50 +00:00
Sean Silva bf9b4cd596 docs: More reST conversion.
Sorry for the large commit, but it is much faster to convert in batches.

llvm-svn: 170067
2012-12-13 01:10:46 +00:00
Sean Silva 709c44d1f1 docs: Convert some docs to reST.
Converts:
    LanguageExtensions
    LibASTMatchers
    LibTooling
    PCHInternals
    ThreadSanitizer
    Tooling

Patch by Mykhailo Pustovit!
(with minor edits by Dmitri Gribenko and Sean Silva)

llvm-svn: 170048
2012-12-12 23:44:55 +00:00
Daniel Dunbar e50a92f754 docs: Another test commit (sphinx autoupdating).
llvm-svn: 170047
2012-12-12 23:35:03 +00:00
Daniel Dunbar e6daf69f8b docs: Test commit (sphinx autoupdating).
llvm-svn: 170046
2012-12-12 23:33:24 +00:00
Sean Silva 99b51c48cc docs: Initial Sphinx setup for Clang.
I don't think this will be visible just yet on <clang.llvm.org/docs/>
since I don't think that the necessary server-side setup has taken
place.

Don't shoot me over the theme. I don't want to duplicate LLVM's theme
into the clang repo at the moment, so I just used one of Sphinx's
default themes.

llvm-svn: 170042
2012-12-12 23:02:30 +00:00
Daniel Jasper 4ec32d3d90 AST matcher tutorial (Part I)
This an AST matcher tutorial based on Sam Panzer's document
(https://docs.google.com/a/google.com/document/d/1oTkVLhCdRJUEH1_LDaQdXqe8-aOqT5GLDL9e4MhoFF8/edit).

Checking in now although some parts might be a bit rough so others can
help improving it.

llvm-svn: 169632
2012-12-07 20:34:49 +00:00
Richard Smith 39dd38c061 Add extra truthiness.
llvm-svn: 169555
2012-12-06 22:40:09 +00:00
Daniel Jasper f9ae1527c7 Update matcher documentation with script.
We still need to make the python script understand some of the new
matchers, but this should be an improvement.

llvm-svn: 169258
2012-12-04 12:08:08 +00:00
Richard Smith 35d8629906 Document the existence of -fsanitize=bounds.
llvm-svn: 169207
2012-12-04 02:48:16 +00:00
Alexey Samsonov 0e96becfb1 This patch exposes to Clang users three more sanitizers are experimental features of ASan:
1) init-order sanitizer: initialization-order checker.
Status: usable, but may produce false positives w/o proper blacklisting.
2) use-after-return sanitizer
Status: implemented, but heavily understed.
Should be optional, as it significanlty slows program down.
3) use-after-scope sanitizer
Status: in progress.

llvm-svn: 168950
2012-11-29 22:36:21 +00:00
Will Dietz 1897cb3b9c Add -fsanitize=integer for reporting suspicious integer behaviors.
Introduces new sanitizer "unsigned-integer-overflow".

llvm-svn: 168701
2012-11-27 15:01:55 +00:00
Richard Smith d902b34e66 Updates to user's manual and release notes for -fsanitize= options.
llvm-svn: 167479
2012-11-06 19:23:14 +00:00
Alexey Samsonov 33bfe09c34 Use -fsanitize= flag in docs for ASan/TSan
llvm-svn: 167465
2012-11-06 16:19:11 +00:00
Kostya Serebryany 508a128f74 [asan docs] explain why asan exits on the first error
llvm-svn: 167004
2012-10-30 05:07:05 +00:00
Daniel Jasper 89cf9370bf Remove clang-fixit from tools page as it is currently not planned as a
separate tool.

Review: http://llvm-reviews.chandlerc.com/D81
llvm-svn: 166766
2012-10-26 10:25:13 +00:00
Alexey Samsonov 78d1210f38 Update docs about TSan availability in CMake build
llvm-svn: 166558
2012-10-24 13:34:53 +00:00
Alexey Samsonov 2e3c6e2e40 Fix some wordings in AddressSanitizer docs.
llvm-svn: 166557
2012-10-24 13:21:51 +00:00
Andy Gibbs 0fea04509a Change VerifyDiagnosticConsumer so that it *must* contain at least one "expected-*" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other "expected-*" directive.
This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file.

Patch reviewed by David Blaikie.

llvm-svn: 166281
2012-10-19 12:49:32 +00:00
Kostya Serebryany e0fc42580b [asan] update asan docs to explain more about linking and to mention full support for i386 Linux
llvm-svn: 166271
2012-10-19 07:00:46 +00:00
Richard Smith b815525223 PR14004: Fix typo in documentation.
llvm-svn: 165158
2012-10-03 21:02:25 +00:00
John McCall d014c9e6f7 Update the block specification for some long-settled subleties.
llvm-svn: 165090
2012-10-03 04:57:59 +00:00
John McCall bf4a7d7193 Add the Microsoft __is_interface_class type trait.
Patch by Andy Gibbs!

llvm-svn: 164591
2012-09-25 07:32:49 +00:00
Douglas Gregor 55023de547 Fix a typo in the PCH internals documentation
llvm-svn: 164409
2012-09-21 20:16:09 +00:00
Alexander Kornienko 66fb1fb073 Added link to HowToSetupToolingForLLVM.html. Added missing #include to the example.
llvm-svn: 164226
2012-09-19 15:17:49 +00:00
Alexander Kornienko f90e2435ba Added an example of an empty case label to avoid confusion.
llvm-svn: 164055
2012-09-17 21:45:21 +00:00
Douglas Gregor 8743b4eece Update the PCH internals documentation to cover chained precompiled
headers and modules in more detail. I'd still like to expand on some
of the modules-related issues further, but this is a decent start.

llvm-svn: 163989
2012-09-16 01:44:02 +00:00
Ted Kremenek efc32c0857 Fix copy-paste error in manpage. Should be -stdlib=library.
llvm-svn: 163914
2012-09-14 17:20:56 +00:00
Ted Kremenek eedc12a140 Revert "Remove clang man page reference to -Oz. It's not an option we want people to use, and is around for historical reasons."
This should be discussed more first.

llvm-svn: 163560
2012-09-10 22:50:05 +00:00
Jordan Rose c6fcbf06a6 [analyzer] Make the defaults explicit for each of the new config options.
Also, document both new inlining options in IPA.txt.

llvm-svn: 163551
2012-09-10 21:54:24 +00:00
Ted Kremenek 8ba803d8d3 Remove clang man page reference to -Oz. It's not an option we want people to use, and is around for historical reasons.
llvm-svn: 163538
2012-09-10 20:10:37 +00:00
Manuel Klimek cc0637c2b6 Adds a first iteration of the basic AST matcher documentation landing page.
llvm-svn: 163387
2012-09-07 13:13:53 +00:00
Manuel Klimek 8bad94765a Introduces anchors into LibASTMatchersReference.html.
This allows linking to LibASTMatchersRefernce.html#<matcher><N>Anchor to
link to the N'the declaration of a matcher and automatically expand
its documentation.

llvm-svn: 163386
2012-09-07 13:10:32 +00:00
Alexey Samsonov 0fcf09ede6 Update AddressSanitizer docs
llvm-svn: 163303
2012-09-06 09:49:03 +00:00
Jordan Rose 6912a326b3 Fix a mistake in an HTML example code snippet.
Caught by Kurt Arnlund!

llvm-svn: 163286
2012-09-06 02:19:13 +00:00
Alexander Kornienko 087f198893 New clang-check vim integration script
Summary: New clang-check vim integration with the 're-run the last invocation when executed from .h file' feature.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D35

llvm-svn: 163211
2012-09-05 12:11:13 +00:00
Jordan Rose 219c9d0dd3 [analyzer] Though C++ inlining is enabled, don't inline ctors and dtors.
More generally, this adds a new configuration option 'c++-inlining', which
controls which C++ member functions can be considered for inlining. This
uses the new -analyzer-config table, so the cc1 arguments will look like this:

... -analyzer-config c++-inlining=[none|methods|constructors|destructors]

Note that each mode implies that all the previous member function kinds
will be inlined as well; it doesn't make sense to inline destructors
without inlining constructors, for example.

The default mode is 'methods'.

llvm-svn: 163004
2012-08-31 17:06:49 +00:00
Dmitri Gribenko 9fc8b9c156 Documentation: correct a typo introduced in r162971.
llvm-svn: 162975
2012-08-31 03:19:55 +00:00
Dmitri Gribenko c872c92d8c Documentation: add missing word "accepts".
llvm-svn: 162971
2012-08-31 02:39:31 +00:00
Anna Zaks e9b0231152 [analyzer] Make analyzer-ipa=dynamic-bifurcate the default.
There are two tests regressions that come from the fact that the Retain
Count checker does not cancel out inlining of ObjC methods.

llvm-svn: 162950
2012-08-30 22:42:59 +00:00
Ted Kremenek 60993a35e6 Fix missing 'clang' in pragma example in ARC doc.
llvm-svn: 162933
2012-08-30 19:26:58 +00:00
John McCall 9d2f0e34fe Clarify the point at which ARC destroys ivars vis-à-vis
[super dealloc].  rdar://problem/11141872

llvm-svn: 162833
2012-08-29 08:32:30 +00:00
Manuel Klimek de06338a08 This is a temporary solution until we have a better way to
parse doxygen comments for macros with libclang.

I'm not entirely happy about this script, but as it saves
a lot of work in keeping the docs up to date with the
actual code I think checking it in makes sense.

llvm-svn: 162690
2012-08-27 18:49:12 +00:00
Jordan Rose 561919e5bd [analyzer] Don't inline constructors for objects allocated with operator new.
Because the CXXNewExpr appears after the CXXConstructExpr in the CFG, we don't
actually have the correct region to construct into at the time we decide
whether or not to inline. The long-term fix (discussed in PR12014) might be to
introduce a new CFG node (CFGAllocator) that appears before the constructor.

Tracking the short-term fix in <rdar://problem/12180598>.

llvm-svn: 162689
2012-08-27 18:39:22 +00:00
Jordan Rose 39fbb023d3 [analyzer] Update inlining design notes for r162681.
llvm-svn: 162688
2012-08-27 18:39:16 +00:00
Manuel Klimek 0fd1106229 Update reference docs to latest changes.
llvm-svn: 162650
2012-08-26 23:55:24 +00:00
Richard Smith cb889d8737 Stub out a release notes section on -fcatch-undefined-behavior.
llvm-svn: 162636
2012-08-25 00:47:19 +00:00
Richard Smith f994353801 Update the user's manual for some of the new -fcatch-undefined-behavior features.
llvm-svn: 162635
2012-08-25 00:44:02 +00:00
Alexander Kornienko 4bcd58b87d Updated LibTooling.html, minor improvements in CommonOptionsParser
llvm-svn: 162521
2012-08-24 00:39:14 +00:00
Jordan Rose 40dd4d9bf3 [analyzer] Restructure discussion of DynamicTypeInfo and RuntimeDefinition.
Since DynamicTypeInfo is not inherently related to inlining or to dynamic
calls, it makes more sense (to me) to discuss it first.

Also fix some typos, massage some grammar, and (hopefully) improve precision
and clarity.

llvm-svn: 162365
2012-08-22 17:13:27 +00:00
Jordan Rose d3d6ac65f8 [analyzer] Per feedback, re-structure the docs for ExprInspection checks.
Also, remove the FIXME about merging -analyzer-stats and the debug.Stats
checker. This would be a bad idea because simply running debug.Stats can
affect the output of -analyzer-stats.

llvm-svn: 162364
2012-08-22 17:13:22 +00:00
Anna Zaks 545588f9ed [analyzer] IPA document: address Ted's review comments (path
bifurcation)

llvm-svn: 162343
2012-08-22 05:38:38 +00:00
Ted Kremenek 98b771ecc2 Review, comment, and reformat IPA.txt, including feedback comments.
Formatting includes:

- removing line wraps (Emacs Cmd-Q), to make text easier to read
- provide useful indentation
- call out caveats and notes more explictly

Stylistically, I prefer the document talk in 3rd person instead of "we".  The
term "we" is unambiguous, and sometimes refers to different things.  I've passed
over the existing paragraphs and made them speak more about specific entities
that compose the analyzer and what they do (e.g., ExprEngine) instead of "we"
referring to the analyzer.

Further, I have substituted some vague concepts such as "state" or "program
state" and replaced them with their precise implementation counterparts (e.g.,
ProgramState).  This makes the document more technically precise throughout the
entire narrative, which would sometimes use vague terms and other times precise
terms.

I've placed several comments within the document, which can be seen with
***TMK/COMMENT***, which indicate places that need to be enhanced or clarified,
or called out as questions about intended bheavior.

llvm-svn: 162338
2012-08-22 01:20:05 +00:00
Jordan Rose 6faff2e7bd [analyzer] Document our debug checkers and ExprInspection's "builtins".
llvm-svn: 162336
2012-08-22 01:03:39 +00:00
Jordan Rose e3e95cdf27 [analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++.
Under -analyzer-ipa=basic-inlining, only C functions, blocks, and C++ static
member functions are inlined -- essentially, the calls that behave like simple
C function calls. This is essentially the behavior in Xcode 4.4.

C++ support still has some rough edges, and we don't want users to be worried
about them if they download and run their own checker. (In particular, the
massive number of false positives for analyzing LLVM comes from inlining
defensively-written code in contexts where more aggressive assumptions are
implicitly made. This problem is not unique to C++, but it is exacerbated by
the higher proportion of code that lives in header files in C++.)

The eventual goal is to be comfortable enough with C++ support (and simple
Objective-C support) to advance to -analyzer-ipa=inlining as the default
behavior. See the IPA design notes for more details.

llvm-svn: 162318
2012-08-21 21:44:21 +00:00
John McCall d8561f058d Fix a pair of bugs relating to properties in ARC.
First, when synthesizing an explicitly strong/retain/copy property
of Class type, don't pretend during compatibility checking that the
property is actually assign.  Instead, resolve incompatibilities
by secretly changing the type of *implicitly* __unsafe_unretained
Class ivars to be strong.  This is moderately evil but better than
what we were doing.

Second, when synthesizing the setter for a strong property of
non-retainable type, be sure to use objc_setProperty.  This is
possible when the property is decorated with the NSObject
attribute.  This is an ugly, ugly corner of the language, and
we probably ought to deprecate it.

The first is rdar://problem/12039404;  the second was noticed by
inspection while fixing the first.

llvm-svn: 162244
2012-08-20 23:36:59 +00:00
Manuel Klimek c40c9851b1 Adds the most requested doc for the AST matchers: a reference
of matchers, categorized by type and fully expanded for the
context in which they can be used.

I used a script to generate this documentation which I'll want
to be scrunitized by a code review before checking it in.

llvm-svn: 162225
2012-08-20 20:54:03 +00:00
Dmitri Gribenko 546481170c Add release notes for type safety attributes.
llvm-svn: 162102
2012-08-17 16:01:54 +00:00
Jordan Rose 0564c75e7b [analyzer] Add an internal reference document describing IPA and CallEvent.
This attempts to be a higher-level description of our inlining heuristics
and decision trees than the source, where the work is spread out between
ExprEngine (mostly in ExprEngineCallAndReturn.cpp) and CallEvent, with a
few other classes participating as well.

llvm-svn: 162073
2012-08-17 02:11:35 +00:00
Dmitri Gribenko e4a5a90e8d Add support for "type safety" attributes that allow checking that 'void *'
function arguments and arguments for variadic functions are of a particular
type which is determined by some other argument to the same function call.

Usecases include:
* MPI library implementations, where these attributes enable checking that
  buffer type matches the passed MPI_Datatype;
* for HDF5 library there is a similar usecase as MPI;
* checking types of variadic functions' arguments for functions like
  fcntl() and ioctl().

llvm-svn: 162067
2012-08-17 00:08:38 +00:00
Alexander Kornienko 64361e3c8b Added description of clang-check -ast-dump* options.
llvm-svn: 161861
2012-08-14 08:31:51 +00:00
Chandler Carruth ebbc0c93c9 Emphasize that clang-fixit is planned but not yet contributed. I should
really just push the initial version....

llvm-svn: 161858
2012-08-14 07:36:05 +00:00
Chandler Carruth b8f67ad768 Fix some of my terrible spelling.
llvm-svn: 161856
2012-08-14 07:21:00 +00:00
Chandler Carruth 72af8c3c6f Add initial documentation about the new tools repository and the
structure of how we're building concrete tools as well as tooling
infrastructure as part of the Clang project.

This documentation is definitely still rough. If anyone can improve it,
flesh it out, or help structure it in a more natural way, please, help!
=] This is not my forte, and patches here are more than welcome!

llvm-svn: 161855
2012-08-14 07:19:09 +00:00
Marshall Clow 35a5f3e539 Minor rework of code example for clarity. No functionality change
llvm-svn: 161776
2012-08-13 18:56:38 +00:00
Hal Finkel 3fadbb54fd Add __builtin_readcyclecounter() to produce the @llvm.readcyclecounter() intrinsic.
llvm-svn: 161310
2012-08-05 22:03:08 +00:00
Sylvestre Ledru a5202660fb Fix some minor typos
llvm-svn: 161036
2012-07-31 06:56:50 +00:00
Sylvestre Ledru 2aa45cf43e Fix two typos in the doc
llvm-svn: 160763
2012-07-25 22:02:37 +00:00
Manuel Klimek 587bcca66d Adds a introductionary document to the Clang AST.
Next steps are adding information about types & source location handling.

llvm-svn: 160708
2012-07-25 07:28:11 +00:00
Sylvestre Ledru 830885ca64 Fix a typo (the the => the)
llvm-svn: 160622
2012-07-23 08:59:39 +00:00
Jordan Rose 9dd82c1d94 Re-apply r160319 "Don't crash when emitting fixits following Unicode chars"
This time, make sure we don't try to print fixits with newline characters,
since they don't have a valid column width, and they don't look good anyway.

PR13417 (and originally <rdar://problem/11877454>)

llvm-svn: 160561
2012-07-20 18:50:51 +00:00
Nico Weber cd8a546b6c Revert r160319, it caused PR13417. Add a test for PR13417.
llvm-svn: 160542
2012-07-20 06:44:52 +00:00
Dmitri Gribenko 831c1e0819 Minor cleanups and additions to the users manual. UsersManual.html now validates as HTML 4.01 Strict.
Patch by Jonathan Sauer!  (With minor edits from me.)

llvm-svn: 160386
2012-07-17 18:51:47 +00:00
Jordan Rose fb12a53d5d Don't crash when emitting fixits following Unicode characters.
This code is very sensitive to the difference between "columns" as printed
and "bytes" (SourceManager columns). All variables are now named explicitly
and our assumptions are (hopefully) documented as both comment and assertion.

Whether parseable fixits should use byte offsets or Unicode character counts
is pending discussion on the mailing list; currently the implementation uses
bytes (and has no problems on lines containing multibyte characters).
This has been added to the user manual.

<rdar://problem/11877454>

llvm-svn: 160319
2012-07-16 20:52:12 +00:00
Hans Wennborg 04f5eacaf4 Mention -ftls-model in release notes and manual.
llvm-svn: 160169
2012-07-13 12:47:15 +00:00
Manuel Klimek 05b56315d5 Updates the example to the latest incarnation of clang-check and
adds a paragraph on builtin headers.

llvm-svn: 160138
2012-07-12 18:32:50 +00:00
Nico Weber 50661442a9 Mention -fms-compatibility and -fdelayed-template-parsing in UsersManual.
Also mention that -std=c++11 is now on by default on windows.

llvm-svn: 160054
2012-07-11 16:56:28 +00:00
Alexander Kornienko 442b55fc28 How to set up clang tools for llvm
Summary: How to guide for setting up clang tooling for llvm repo.

Test Plan: this is untested

Reviewers: klimek, djasper

Reviewed By: klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D3

llvm-svn: 160047
2012-07-11 14:27:44 +00:00
Manuel Klimek af18d52c09 Update the docs with specifics about escaping of compile commands.
llvm-svn: 159987
2012-07-10 08:05:54 +00:00
Chris Lattner 209ad6baa0 Jordan points out that this was incorrect: clang should recover from
*errors* with fixits on them by following the recovery advised by the
fixit, but if it is a fixit on a warning, then obviously the AST 
should be for the code as-written.

llvm-svn: 159980
2012-07-10 05:03:05 +00:00
Jordan Rose 6ea25fe9ce Add an explanation of -Wobjc-literal-compare to the "Objective-C Literals" page
(per Jean-Daniel's suggestion to keep around an explanation of why
direct comparisons on ObjC literals are a bad idea)

llvm-svn: 159972
2012-07-10 00:20:57 +00:00
Jordan Rose f919803001 Downgrade the "direct comparison" error for ObjC literals to a warning.
Chris pointed out that while the comparison is certainly problematic
and does not have well-defined behavior, it isn't any worse than some
of the other abuses that we merely warn about and doesn't need to make
the compilation fail.

Revert the release notes change (r159766) now that this is just a new warning.

llvm-svn: 159939
2012-07-09 16:54:44 +00:00
Manuel Klimek c508a742f7 Links to the python CXCompilationDatabase documentation.
Patch contributed by David Roethlisberger.

llvm-svn: 159923
2012-07-09 05:17:45 +00:00
Jordan Rose 2783b6c0e5 Release notes for r158230 "Disallow using ObjC literals in direct comparisons"
This may turn out to be a controversial change, due to string literals being
uniqued at link time, but Apple's docs only say "The compiler makes such
object constants unique on a per-module basis..."[1] without actually saying
what a "module" is. (It's not a clang module.) Furthermore, this uniqueness
guarantee often can't be guaranteed once the string has been passed through
framework code.

If this does turn out very controversial, we could downgrade this to a
DefaultError warning for strings, and leave it as a true Error for other
kinds of literals.

(<rdar://problem/11300873>)

[1]: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/CreatingStrings.html

llvm-svn: 159766
2012-07-05 18:48:30 +00:00
Kostya Serebryany 41a83c84f6 [asan] update docs: mention MacOS 10.7 and correct the ifdef sample for __has_feature
llvm-svn: 159521
2012-07-02 11:00:33 +00:00
Richard Trieu c605844510 Update the %diff modifer to have an alternate string print when a template tree
is selected.  This will allow more flexibility when converting diagnostics to
use template type diffing.

Also updated the internal manual and test cases for correctly keeping the bold
attribute and for tree printing.

llvm-svn: 159463
2012-06-29 21:12:16 +00:00
Hans Wennborg f60f6af9e8 Add -ftls-model command-line flag.
This allows for setting the default TLS model. (PR9788)

llvm-svn: 159336
2012-06-28 08:01:44 +00:00
Richard Trieu 65ce36b45f Add missing words to manual.
llvm-svn: 159251
2012-06-27 02:36:34 +00:00
Richard Trieu e753f4bebd Update documentation with regards to template type diffing.
llvm-svn: 159249
2012-06-27 02:00:20 +00:00
Hans Wennborg d3b01bc7c6 Support the tls_model attribute (PR9788)
This adds support for the tls_model attribute. This allows the user to
choose a TLS model that is better than what LLVM would select by
default. For example, a variable might be declared as:

  __thread int x __attribute__((tls_model("initial-exec")));

if it will not be used in a shared library that is dlopen'ed.

This depends on LLVM r159077.

llvm-svn: 159078
2012-06-23 11:51:46 +00:00
Alexey Samsonov caef7e813b Add release note about -gline-tables-only flag
llvm-svn: 158989
2012-06-22 11:18:10 +00:00
Fariborz Jahanian 9563a053de document _has_feature(objc_default_synthesize_properties).
// rdar://11676972

llvm-svn: 158665
2012-06-18 17:13:17 +00:00
Anna Zaks f5cad928f5 Make the analyzer site a single point of reference for info
on controlling diagnostics.

llvm-svn: 158581
2012-06-16 00:30:21 +00:00
Richard Smith 8acadcb84b Add -isystem-prefix and -ino-system-prefix arguments, which can be used to
override whether headers are system headers by checking for prefixes of the
header name specified in the #include directive.

This allows warnings to be disabled for third-party code which is found in
specific subdirectories of include paths.

llvm-svn: 158418
2012-06-13 20:27:03 +00:00
Manuel Klimek b4603f4dc3 Doc fixed as proposed (and mostly contributed) by David Roethlisberger.
llvm-svn: 158415
2012-06-13 19:40:46 +00:00
Michael Han d17deb5bf6 Update clang attribute document.
Remove the instructions on manually adding boilerplate code of AttributeList::Kind and AttributeList::getKind().
Both are now generated by tblgen.

llvm-svn: 158386
2012-06-13 03:51:05 +00:00
Manuel Klimek 6d6baa88f6 Add documentation for the JSON compilation database format.
llvm-svn: 158365
2012-06-12 17:51:04 +00:00
Manuel Klimek 9cc3c0307d Puts the linktime dependencies into stupid-ld-required order, as proposed by Jordan Rose.
llvm-svn: 158113
2012-06-06 21:30:34 +00:00
Manuel Klimek a98032e4cf Documents linking requirements for libtooling.
llvm-svn: 158088
2012-06-06 17:51:31 +00:00
Nico Weber 4d2d33f3ba Document how fixits on errors and warnings must behave.
Review and wording tweaks by Richard.

llvm-svn: 157953
2012-06-04 21:56:14 +00:00
Benjamin Kramer 474261af7b Fix typos found by http://github.com/lyda/misspell-check
llvm-svn: 157886
2012-06-02 10:20:41 +00:00
Alexey Samsonov 731eb477c1 Clang docs update: list command-line flags that control the size of generated debug information. Reviewed by chandlerc@ and echristo@.
llvm-svn: 157681
2012-05-30 06:55:10 +00:00
Dmitri Gribenko 34983f25c6 Close HTML tag properly.
llvm-svn: 157533
2012-05-27 14:08:44 +00:00
Richard Smith 1bb8edb8ac In response to some discussions on IRC, tweak the wording of the new
-Wsometimes-uninitialized diagnostics to make it clearer that the cause
of the issue may be a condition which must always evaluate to true or
false, rather than an uninitialized variable.

To emphasize this, add a new note with a fixit which removes the
impossible condition or replaces it with a constant.

Also, downgrade the diagnostic from -Wsometimes-uninitialized to
-Wconditional-uninitialized when it applies to a range-based for loop,
since the condition is not written explicitly in the code in that case.

llvm-svn: 157511
2012-05-26 06:20:46 +00:00
Richard Smith cff136cda8 Release notes update for -Wsometimes-uninitialized.
llvm-svn: 157459
2012-05-25 02:35:34 +00:00
Manuel Klimek 24c4805b3b Adds menu sidebar to the docs.
llvm-svn: 157399
2012-05-24 17:16:23 +00:00
Manuel Klimek b76810fa94 Updates the tooling docs with the links to the tutorials and
adds the menu include.

llvm-svn: 157397
2012-05-24 17:09:10 +00:00
Manuel Klimek 3115e3d171 Adds a tutorial for how to write clang plugins.
llvm-svn: 157396
2012-05-24 17:07:18 +00:00
Bill Wendling 2495bca543 Remove 3.1 release notes to get ready for current development cycle.
llvm-svn: 157379
2012-05-24 06:42:56 +00:00
Kostya Serebryany eddc05abfc [tsan] grammar fixes
llvm-svn: 156984
2012-05-17 08:49:14 +00:00
Kostya Serebryany e8d0a0bf5c [tsan] fix typo
llvm-svn: 156912
2012-05-16 08:19:13 +00:00
Kostya Serebryany f30e08d218 [tsan] first version of ThreadSanitizer docs
llvm-svn: 156910
2012-05-16 08:14:36 +00:00
Argyrios Kyrtzidis da6d7679e8 Add documentation about boxing enum types and a codegen test to make
sure we pick up the underlying type, per suggestion by Fariborz.

No functionality change.

llvm-svn: 156851
2012-05-15 20:45:35 +00:00
David Chisnall ab5edc3e89 Add a note about atomic builtins to c11 section of release notes.
llvm-svn: 156820
2012-05-15 13:18:03 +00:00
Jean-Daniel Dupas a8bfc41ea7 Fix Xcode case (Upper X, lower c)
llvm-svn: 156742
2012-05-13 14:32:11 +00:00
Gregory Szorc dcbc96705d Add Python binding info to release notes
llvm-svn: 156721
2012-05-12 20:45:56 +00:00
Chris Lattner 40a97f48f7 remove something that is really old and out of date.
llvm-svn: 156206
2012-05-04 21:11:08 +00:00
Richard Smith 33c1cf9205 Fix typo and avoid layout issue with almost-but-not-quite-fixed-width fonts.
llvm-svn: 156095
2012-05-03 20:10:41 +00:00
Richard Smith dcfde13648 Minor copy-edits to clang::fallthrough attribute documentation.
llvm-svn: 156094
2012-05-03 20:05:46 +00:00
Richard Smith 84837d5b5a Add -Wimplicit-fallthrough warning flag, which warns on fallthrough between
cases in switch statements. Also add a [[clang::fallthrough]] attribute, which
can be used to suppress the warning in the case of intentional fallthrough.

Patch by Alexander Kornienko!

The handling of C++11 attribute namespaces in this patch is temporary, and will
be replaced with a cleaner mechanism in a subsequent patch.

llvm-svn: 156086
2012-05-03 18:27:39 +00:00
Richard Smith 641a87b983 The release notes are no place for modesty.
llvm-svn: 155681
2012-04-27 00:40:44 +00:00
Manuel Klimek 18ac56bc0f Adds a tutorial on how to write RAV based ASTFrontendActions.
llvm-svn: 155631
2012-04-26 08:49:54 +00:00
Manuel Klimek 34e0f6cba2 Reverted unintentional commit.
llvm-svn: 155629
2012-04-26 08:46:12 +00:00
Manuel Klimek c01d3fbe0f Adds a small tutorial on how to write RAV based ASTFrontendActions.
llvm-svn: 155627
2012-04-26 08:35:39 +00:00
Manuel Klimek 85e60b5dc9 Adds documentation for how to use the tooling library.
llvm-svn: 155550
2012-04-25 14:20:13 +00:00
Manuel Klimek 06b0a7369f Adds a document describing the various tooling approaches and their pros and
cons.

llvm-svn: 155549
2012-04-25 13:57:00 +00:00
Kostya Serebryany b90fe5c6ee [asan] fix typo
llvm-svn: 155345
2012-04-23 10:15:18 +00:00
Kostya Serebryany f43ce26688 [asan] update docs
llvm-svn: 155343
2012-04-23 09:05:50 +00:00
Patrick Beard 81a256a909 Added equivalent method calls in examples.
llvm-svn: 155155
2012-04-19 20:48:09 +00:00
Richard Smith 500ae098bb Formatting fix.
llvm-svn: 155141
2012-04-19 17:46:52 +00:00
David Blaikie c5caf7291c Fix a broken link. Patch by Nikola Smiljanic.
llvm-svn: 155139
2012-04-19 17:21:46 +00:00
Patrick Beard 2a4cfae1b3 Clarified encoding of boxed C strings, balanced all <p> with </p>.
llvm-svn: 155126
2012-04-19 14:33:55 +00:00
Patrick Beard 5890bc548b Changed title.
llvm-svn: 155088
2012-04-19 01:30:47 +00:00
Patrick Beard cbcacc6aa3 Changed wording of availability.
llvm-svn: 155086
2012-04-19 01:02:16 +00:00
Patrick Beard 0caa39474b Implements boxed expressions for Objective-C. <rdar://problem/10194391>
llvm-svn: 155082
2012-04-19 00:25:12 +00:00