Граф коммитов

560 Коммитов

Автор SHA1 Сообщение Дата
Kostya Serebryany ecf7cc18ce [asan docs] explain why asan exits on the first error
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167004 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 05:07:05 +00:00
Daniel Jasper ea33b3f507 Remove clang-fixit from tools page as it is currently not planned as a
separate tool.

Review: http://llvm-reviews.chandlerc.com/D81

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166766 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 10:25:13 +00:00
Alexey Samsonov 5c51fc4ad9 Update docs about TSan availability in CMake build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166558 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 13:34:53 +00:00
Alexey Samsonov adea51733c Fix some wordings in AddressSanitizer docs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166557 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 13:21:51 +00:00
Andy Gibbs 266dba3661 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-19 12:49:32 +00:00
Kostya Serebryany 460e7a25da [asan] update asan docs to explain more about linking and to mention full support for i386 Linux
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166271 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-19 07:00:46 +00:00
Richard Smith 1a71112c56 PR14004: Fix typo in documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165158 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 21:02:25 +00:00
John McCall 4b70070dc5 Update the block specification for some long-settled subleties.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165090 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 04:57:59 +00:00
John McCall ea30e2f866 Add the Microsoft __is_interface_class type trait.
Patch by Andy Gibbs!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164591 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-25 07:32:49 +00:00
Douglas Gregor 0e6b15556a Fix a typo in the PCH internals documentation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164409 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-21 20:16:09 +00:00
Alexander Kornienko 1050966ea6 Added link to HowToSetupToolingForLLVM.html. Added missing #include to the example.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164226 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-19 15:17:49 +00:00
Alexander Kornienko 9d8c9d345a Added an example of an empty case label to avoid confusion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164055 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-17 21:45:21 +00:00
Douglas Gregor 72e4f25c06 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163989 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-16 01:44:02 +00:00
Ted Kremenek 7b7e2c4596 Fix copy-paste error in manpage. Should be -stdlib=library.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163914 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-14 17:20:56 +00:00
Ted Kremenek 8a198a078e 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163560 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 22:50:05 +00:00
Jordan Rose 978869aa6e [analyzer] Make the defaults explicit for each of the new config options.
Also, document both new inlining options in IPA.txt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163551 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 21:54:24 +00:00
Ted Kremenek db133151fc Remove clang man page reference to -Oz. It's not an option we want people to use, and is around for historical reasons.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163538 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10 20:10:37 +00:00
Manuel Klimek a4728e5572 Adds a first iteration of the basic AST matcher documentation landing page.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163387 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 13:13:53 +00:00
Manuel Klimek 67619ff51b 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163386 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07 13:10:32 +00:00
Alexey Samsonov a8ee4412e7 Update AddressSanitizer docs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163303 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06 09:49:03 +00:00
Jordan Rose a285e7d0af Fix a mistake in an HTML example code snippet.
Caught by Kurt Arnlund!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163286 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06 02:19:13 +00:00
Alexander Kornienko 3d35a54758 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163211 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-05 12:11:13 +00:00
Jordan Rose de5277fc55 [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'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163004 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31 17:06:49 +00:00
Dmitri Gribenko dfccbd95d8 Documentation: correct a typo introduced in r162971.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162975 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31 03:19:55 +00:00
Dmitri Gribenko a8ba40e5f8 Documentation: add missing word "accepts".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162971 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31 02:39:31 +00:00
Anna Zaks 3f2a55d819 [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162950 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30 22:42:59 +00:00
Ted Kremenek 9413dc04ff Fix missing 'clang' in pragma example in ARC doc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162933 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30 19:26:58 +00:00
John McCall 3bd27857bc Clarify the point at which ARC destroys ivars vis-à-vis
[super dealloc].  rdar://problem/11141872

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162833 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29 08:32:30 +00:00
Manuel Klimek 95a58d2f6e 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162690 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27 18:49:12 +00:00
Jordan Rose 6fe4dfbc9e [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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162689 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27 18:39:22 +00:00
Jordan Rose 7103d2debd [analyzer] Update inlining design notes for r162681.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162688 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27 18:39:16 +00:00
Manuel Klimek e44a006c49 Update reference docs to latest changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162650 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-26 23:55:24 +00:00
Richard Smith 3f9411a31a Stub out a release notes section on -fcatch-undefined-behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162636 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-25 00:47:19 +00:00
Richard Smith 23fee34bae Update the user's manual for some of the new -fcatch-undefined-behavior features.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162635 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-25 00:44:02 +00:00
Alexander Kornienko 6fbe982bb4 Updated LibTooling.html, minor improvements in CommonOptionsParser
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162521 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24 00:39:14 +00:00
Jordan Rose f01ef105f1 [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162365 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-22 17:13:27 +00:00
Jordan Rose 91b46cc65b [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162364 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-22 17:13:22 +00:00
Anna Zaks 2eed8ccb63 [analyzer] IPA document: address Ted's review comments (path
bifurcation)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162343 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-22 05:38:38 +00:00
Ted Kremenek 77df8d960e 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162338 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-22 01:20:05 +00:00
Jordan Rose a779e273b1 [analyzer] Document our debug checkers and ExprInspection's "builtins".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162336 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-22 01:03:39 +00:00
Jordan Rose c568e2f801 [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162318 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-21 21:44:21 +00:00
John McCall d64c2eb83d 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162244 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-20 23:36:59 +00:00
Manuel Klimek 1da79335fc 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162225 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-20 20:54:03 +00:00
Dmitri Gribenko 19d48ce424 Add release notes for type safety attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162102 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17 16:01:54 +00:00
Jordan Rose 25c040081c [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162073 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17 02:11:35 +00:00
Dmitri Gribenko 0d5a069f66 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().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162067 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17 00:08:38 +00:00
Alexander Kornienko 5d46db8882 Added description of clang-check -ast-dump* options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161861 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14 08:31:51 +00:00
Chandler Carruth 2372ffcdf4 Emphasize that clang-fixit is planned but not yet contributed. I should
really just push the initial version....

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161858 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14 07:36:05 +00:00
Chandler Carruth ec2d7b71c7 Fix some of my terrible spelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161856 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14 07:21:00 +00:00
Chandler Carruth e56f3a69c4 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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161855 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-14 07:19:09 +00:00