Commit Graph

773 Commits

Author SHA1 Message Date
Anna Zaks
7925e3db63 [analyzer] Add a debug checker that prints Exploded Graph
Add a debug checker that is useful to understand how the ExplodedGraph is
built; it can be triggered using the following command:

 clang -cc1 -analyze -analyzer-checker=debug.ViewExplodedGraph my_program.c

A patch by Béatrice Creusillet!

llvm-svn: 184768
2013-06-24 18:12:12 +00:00
Sean Silva
4c280bd3de [docs] -fno-sanitize= is accepted too.
llvm-svn: 184611
2013-06-21 23:50:58 +00:00
Samuel Benzaquen
c6f2c9b566 Add support for polymorphic matchers. Use runtime type checking to determine the right polymorphic overload to use.
llvm-svn: 184558
2013-06-21 15:51:31 +00:00
Manuel Klimek
cd5e799833 Improve documentation for AST matchers.
llvm-svn: 184538
2013-06-21 09:59:59 +00:00
Sean Silva
8d5ec19730 [docs] Add link to presentation slides.
llvm-svn: 184518
2013-06-21 02:09:29 +00:00
Michael Gottesman
930ecdb77b [checked-arithmetic builtins] Added builtins to enable users to perform checked-arithmetic in c.
This will enable users in security critical applications to perform
checked-arithmetic in a fast safe manner that is amenable to c.

Tests/an update to Language Extensions is included as well.

rdar://13421498.

llvm-svn: 184497
2013-06-20 23:28:10 +00:00
Lawrence Crowl
b53e5483b0 This patch adds new private headers to the module map. Private
headers may be included from within the module, but not from outside
the module.

llvm-svn: 184471
2013-06-20 21:14:14 +00:00
Manuel Klimek
bbb758577f Adds the equalsBoundNode matcher.
Most of the tests contributed by Edwin Vane.

llvm-svn: 184427
2013-06-20 14:06:32 +00:00
Manuel Klimek
c16c652ca5 Implements declaratorDecl, parmVarDecl and hassTypeLoc matchers.
llvm-svn: 184419
2013-06-20 13:08:29 +00:00
Michael Gottesman
1534399059 [multiprecision-builtins] Added missing builtin __builtin_{add,sub}cb for {add,sub} with carry for bytes.
I have had several people ask me about why this builtin was not available in
clang (since it seems like a logical conclusion). This patch implements said
builtins.

Relevant tests are included as well. I also updated the Clang language extension reference.

rdar://14192664.

llvm-svn: 184227
2013-06-18 20:40:40 +00:00
Richard Smith
26eed76ec7 Point link at correct location for Clang 3.3 release notes.
llvm-svn: 184148
2013-06-17 23:53:08 +00:00
Rui Ueyama
a6239aef11 [docs] Fix wrong clang-format example.
llvm-svn: 183963
2013-06-14 02:12:06 +00:00
Manuel Klimek
f30b17d8c3 Fixes the comment for hasDeclaration.
llvm-svn: 183640
2013-06-10 08:52:15 +00:00
Bill Wendling
61f44ccc50 Reset the release notes for the 3.4 release.
llvm-svn: 183211
2013-06-04 06:17:46 +00:00
Richard Smith
b7f7faafd4 Document -fno-sanitize-recover and -fsanitize-undefined-trap-on-error and attempt to explain the difference between them.
llvm-svn: 182890
2013-05-29 22:57:31 +00:00
Tim Northover
bfe2e5f778 Add caveat to __builtin_readcyclecounter documentation.
The ARM cycle-counter can be restricted by the operating system; it's
worth warning potential users of this issue.

llvm-svn: 182604
2013-05-23 19:14:12 +00:00
Hans Wennborg
b3ad90d52d ReleaseNotes.rst: typo
llvm-svn: 182294
2013-05-20 15:59:04 +00:00
Hans Wennborg
3cb56a4f34 ReleaseNotes: add note about ASTContext::WCharTy and WideCharTy
llvm-svn: 182280
2013-05-20 14:53:06 +00:00
Alexander Kornienko
006b5c89ce Clang-format: allow -style="{yaml/json}" on command line
Summary: + improved handling of default style and predefined styles.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 182205
2013-05-19 00:53:30 +00:00
Manuel Klimek
bf2d568900 Add embedded video for the AST tutorial.
As asked for by Sean, putting the video into the docs.

llvm-svn: 182081
2013-05-17 08:40:22 +00:00
Sergey Matveev
f4633ac740 Add LeakSanitizer.rst to docs.
llvm-svn: 181798
2013-05-14 15:48:54 +00:00
Richard Smith
9155be1e54 C++1y: provide full 'auto' return type deduction for lambda expressions. This
completes the implementation of N3638.

llvm-svn: 181669
2013-05-12 03:09:35 +00:00
Alexander Kornienko
88a0d939de Reformat clang-format help strings, filter out irrelevant options.
Summary: +updated ClangFormat.rst

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 181617
2013-05-10 18:12:00 +00:00
Edwin Vane
fc4f7dc0a6 Adding isConst() ASTMatcher for CXXMethodDecl nodes
Updated reference and unit tests.

llvm-svn: 181522
2013-05-09 17:00:17 +00:00
Edwin Vane
c50e730d6e Updating LibASTMatchersReference to include namespaceDecl()
The namespaceDecl() ASTMatcher was added in r179027.

llvm-svn: 181519
2013-05-09 16:42:37 +00:00
Reid Kleckner
78fb10f194 Document Clang's support for #pragma comment(lib/linker) with -fms-extensions
As suggested by Dmitri Gribenko.

llvm-svn: 181433
2013-05-08 14:40:51 +00:00
Bill Wendling
3067ec8777 We're in 3.4 land now.
llvm-svn: 181351
2013-05-07 20:31:37 +00:00
Richard Smith
0a715429b9 C++1y: Update __cplusplus to temporary value 201305L to allow detection of provisional C++1y support.
Add __has_feature and __has_extension checks for C++1y features (based on the provisional names from
the C++ features study group), and update documentation to match.

llvm-svn: 181342
2013-05-07 19:32:56 +00:00
Daniel Jasper
5f99742632 Basic clang-format integration for BBEdit.
Thanks to Avi Drissman!

llvm-svn: 180933
2013-05-02 17:37:36 +00:00
Dmitri Gribenko
b8f9f3ef0b Documentation: Change UTF-8 ellipsis character to ASCII ... sequence
Patch by Dimitry Andric

llvm-svn: 180674
2013-04-27 16:26:29 +00:00
Dmitri Gribenko
d3c5a51e9d Documentation: add an idea for a cpp14-migrate transform for N3421
llvm-svn: 180672
2013-04-27 13:41:02 +00:00
Dmitri Gribenko
148fdf2ed1 Documentation: improve description of make_shared transformation, as suggested by David Blaikie
llvm-svn: 180627
2013-04-26 20:20:30 +00:00
Ted Kremenek
004e823539 Further wordsmith release notes for the static analyzer.
llvm-svn: 180585
2013-04-26 00:01:34 +00:00
Anna Zaks
b6219a9f0e Add Static Analyzer section to the Release Notes for clang 3.3
llvm-svn: 180582
2013-04-25 23:14:38 +00:00
Dmitri Gribenko
046a8ece54 Add an idea for cpp11-migrate and cpp14-migrate
llvm-svn: 180266
2013-04-25 16:07:10 +00:00
Ted Kremenek
3a2291b837 Release note the change to clang_CXCursorSet_contains().
llvm-svn: 180178
2013-04-24 07:33:52 +00:00
Richard Smith
25b555a6bf C++11 support is now feature-complete.
llvm-svn: 179861
2013-04-19 17:00:31 +00:00
Manuel Klimek
f5a0ae82e9 Multiple improvements to the AST matcher tutorial.
Patch by Jochen Eisinger.

llvm-svn: 179758
2013-04-18 14:30:45 +00:00
Bob Wilson
fd4f39e893 Add description of -Ofast optimization option to the man page. <rdar://13660458>
llvm-svn: 179733
2013-04-17 22:32:43 +00:00
Andy Gibbs
9c2ccd622f Implemented #pragma GCC warning/error in the same mould as #pragma message.
llvm-svn: 179687
2013-04-17 16:16:16 +00:00
Manuel Klimek
21ae2519bb This corrects problems in the LibASTMatchers tutorial.
Patch by Jochen Eisinger.

llvm-svn: 179683
2013-04-17 15:02:12 +00:00
Daniel Jasper
dd77743af8 Small improvements to clang-format documentation and integration
scripts.

llvm-svn: 179676
2013-04-17 07:55:02 +00:00
Daniel Dunbar
e246fbe40b [Modules] Convert module specific -fno-modules-autolink into -fno-autolink.
- There is no reason to have a modules specific flag for disabling
   autolinking. Instead, convert the existing flag into -fno-autolink (which
   should cover other autolinking code generation paths like #pragmas if and
   when we support them).

llvm-svn: 179612
2013-04-16 18:21:19 +00:00
Dmitri Gribenko
a7d16ceee6 Add an option to parse all comments as documentation comments
Patch by Amin Shali.

llvm-svn: 179180
2013-04-10 15:35:17 +00:00
Edwin Vane
9fbb842c6d Updating cpp11-migrate transform list in ClangTools docs
Author: Philip Dunstan <phil@phildunstan.com>
llvm-svn: 179128
2013-04-09 20:51:47 +00:00
Edwin Vane
37ee1d7b80 Adding new AST Matchers isVirtual and isOverride
isVirtual - matches CXXMethodDecl nodes for virtual methods
isOverride - matches CXXMethodDecl nodes for methods that override virtual methods from a base class.

Author: Philip Dunstan <phil@philipdunstan.com>
llvm-svn: 179126
2013-04-09 20:46:36 +00:00
Rafael Espindola
9ca6e810b7 Mention the changes in the handling of language linkage in the release notes.
llvm-svn: 179094
2013-04-09 12:51:24 +00:00
Peter Collingbourne
54d770cb1f If the user requested a zero-base-shadow sanitizer, infer -pie and -fPIC when appropriate.
Differential Revision: http://llvm-reviews.chandlerc.com/D502

llvm-svn: 179082
2013-04-09 04:35:11 +00:00
Jordan Rose
2de3daa0a2 [analyzer] Enable destructor inlining by default (c++-inlining=destructors).
This turns on not only destructor inlining, but inlining of constructors
for types with non-trivial destructors. Per r178516, we will still not
inline the constructor or destructor of anything that looks like a
container unless the analyzer-config option 'c++-container-inlining' is
set to 'true'.

In addition to the more precise path-sensitive model, this allows us to
catch simple smart pointer issues:

  #include <memory>

  void test() {
    std::auto_ptr<int> releaser(new int[4]);
  } // memory allocated with 'new[]' should not be deleted with 'delete'

<rdar://problem/12295363>

llvm-svn: 178805
2013-04-04 23:10:29 +00:00
Rafael Espindola
6ae7e50be4 Add 178663 back.
http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green
before it processed the reverted 178663, so it could not have been the culprit.

Revert "Revert 178663."

This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41.

llvm-svn: 178682
2013-04-03 19:27:57 +00:00