Commit Graph

884 Commits

Author SHA1 Message Date
Renato Golin 1588cdaa4b Turning IAS on by default on ARM/Thumb
This is an experimental feature, where -integrated-as will be
on by default on ARM/Thumb. We aim to detect the missing features
so that the next release is stable.

Updating the ReleaseNotes, too.

Also moving the AArch64 into the same place.

llvm-svn: 197024
2013-12-11 09:35:10 +00:00
Sergey Matveev ae5b1d4eac Mention LeakSanitizer in AddressSanitizer docs.
llvm-svn: 197022
2013-12-11 09:14:36 +00:00
Sergey Matveev 072db59483 Rewrite docs/LeakSanitizer.rst. Add it to index.
llvm-svn: 196957
2013-12-10 20:10:30 +00:00
Alp Toker 8c7cbdf53a clang-format-diff.py: Support -regex filter and more filename extensions
Add support for more filename extensions based on the list in the clang
plus JavaScript.

Also adds a -regex option so users can override defaults if they have unusual
file extensions or want to format everything in the diff.

Keeping with tradition the flag is modelled on Unix conventions, this time
matching the semantics of find(1).

llvm-svn: 196917
2013-12-10 13:51:53 +00:00
Alexander Kornienko fdca83d487 Support GNU style rule to put a space before opening parenthesis.
Summary:
The rule from the GNU style states:
"We find it easier to read a program when it has spaces before the open-parentheses and after the commas."

http://www.gnu.org/prep/standards/standards.html#index-spaces-before-open_002dparen

This patch makes clang-format adds an option to put spaces before almost all open parentheses, except the cases, where different behavior is dictated by the style rules or language syntax:
  * preprocessor:
    ** function-like macro definitions can't have a space between the macro name and the parenthesis;
    ** `#if defined(...)` can have a space, but it seems, that it's more frequently used without a space in GCC, for example;
  * never add spaces after unary operators;
  * adding spaces between two opening parentheses is controlled with the `SpacesInParentheses` option;
  * never add spaces between `[` and `(` (there's no option yet).

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 196901
2013-12-10 10:18:34 +00:00
Alp Toker f026635423 Remove old -fdiagnostics-show-name option
This had no effect since the feature was removed in r150612.

I actually miss this option, maybe we can bring it back some day.

llvm-svn: 196782
2013-12-09 14:34:53 +00:00
Alp Toker 0e7f6da674 clang-format-diff.py: Fix 'beintroduced' in help output
Also update docs to reflect recently changed -i inplace edit behaviour.

llvm-svn: 196336
2013-12-04 00:48:22 +00:00
Alp Toker 3b557ba3f6 Documentation typo corrections
llvm-svn: 196215
2013-12-03 06:53:39 +00:00
Sergey Matveev 3422543391 Update the LeakSanitizer documentation with a proper link.
llvm-svn: 195983
2013-11-30 21:54:43 +00:00
Gabor Greif 6ef70f957e fix a typo
llvm-svn: 195760
2013-11-26 13:28:51 +00:00
Bill Wendling 0a794a4b78 Update to next release numbers.
llvm-svn: 195236
2013-11-20 10:13:37 +00:00
Ted Kremenek f0834a8125 Remove clang man page reference to --analyze, and point people to the analyzer website.
llvm-svn: 195027
2013-11-18 18:53:37 +00:00
Samuel Benzaquen 464c1cbc3f Add partial support for the hasDeclaration() matcher in the dynamic layer.
Summary:
Add partial support for the hasDeclaration() matcher in the dynamic layer.
This matcher has some special logic to allow any type that has a getDecl() method.  We do not support this right now.

Reviewers: klimek

CC: cfe-commits, revane

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

llvm-svn: 195013
2013-11-18 14:53:42 +00:00
Sylvestre Ledru 5abf2ec12d Using an invalid -O falls back on -O3 instead of an error
Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
  Expected Passes    : 6721
  Expected Failures  : 20
  Unsupported Tests  : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

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

llvm-svn: 195009
2013-11-18 13:23:07 +00:00
Alp Toker 7874bdc6c1 Revert "Using an invalid -O falls back on -O3 instead of an error"
Trying to fix test failures since earlier today.

One of the tests added in this commit is outputting test/Driver/clang_f_opts.s
which the builders that build in-tree (eg. clang-native-arm-cortex-a9) are
trying to run as a test case, causing failures.

clang_f_opts.c:
  If -### doesn't emit the warning then this test probably shouldn't be in
  here in the first place. Frontend maybe?

invalid-o-level.c:
  Running %clang_cc1 in the Driver tests doesn't make sense because -cc1
  bypasses the driver. (I'm not reverting the commit that introduced this but
  please fix instead of keeping it this way.)

Reverting to fix the build failures and also so that the tests can be thought
out more thoroughly.

This reverts commit r194817.

llvm-svn: 194845
2013-11-15 20:40:58 +00:00
Sylvestre Ledru 6ae3980118 Using an invalid -O falls back on -O3 instead of an error
Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
  Expected Passes    : 6721
  Expected Failures  : 20
  Unsupported Tests  : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

Reviewers: chandlerc, rafael, rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits

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

llvm-svn: 194817
2013-11-15 15:39:14 +00:00
Sylvestre Ledru e19d5094ee Improve the documentation (bis) with Arthur and Chandler's comments
llvm-svn: 194412
2013-11-11 19:39:37 +00:00
Sylvestre Ledru fac93753b5 Improve the documentation of the optimization flags
Reviewers: rafael.espindola, rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits

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

llvm-svn: 194405
2013-11-11 19:04:47 +00:00
Erik Schnetter 489700d945 Describe OpenCL C changes
llvm-svn: 194368
2013-11-11 06:36:33 +00:00
Bill Wendling 56e82a080b Fix grammar-o.
llvm-svn: 194283
2013-11-08 22:15:02 +00:00
Chandler Carruth 601f382405 Add the fact that Clang too is planning to start using C++11 (in some
limited ways) after the next release. See the lengthy discussions (which
are on-going) and the corresponding commit to LLVM's release notes.
Nothing is actually changing at this point, this is just further
spreading the plan.

llvm-svn: 194184
2013-11-07 00:26:32 +00:00
Richard Smith 79c927bfe9 Add a limit to the length of a sequence of 'operator->' functions we will
follow when building a class member access expression. Based on a patch by
Rahul Jain!

llvm-svn: 194161
2013-11-06 19:31:51 +00:00
Bernard Ogden 18b5701a68 ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang
Allow users to disable or enable CRC subtarget feature.

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

llvm-svn: 193600
2013-10-29 09:47:51 +00:00
Richard Smith a3feee2ad6 Allow a new syntax in a module requires-declaration:
requires ! feature

The purpose of this is to allow (for instance) the module map for /usr/include
to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are
instead provided by the C++ standard library in this case, and the glibc C
<tgmath.h> header would otherwise try to include <complex.h>, resulting in a
module cycle).

llvm-svn: 193549
2013-10-28 22:18:19 +00:00
Bill Wendling 9020b43404 Add trunk revision number on the online HTML docs.
Patch by Vassil Vassilev.
PR13435

llvm-svn: 193495
2013-10-27 05:00:50 +00:00
Peter Collingbourne 6939d29eff Document that -fsanitize=function is Linux-only.
llvm-svn: 193452
2013-10-26 00:21:57 +00:00
Warren Hunt e0bc980500 Undoing accidental change to docs/LanguageExtensions.rst in my previous
patch.

llvm-svn: 193293
2013-10-24 00:59:24 +00:00
Warren Hunt 55d8e82f86 Implements 64 bit microsoft record layout and adds lit tests to cover
it.  Also removes all of the microsoft C++ ABI related code from the 
itanium layout builder.

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

llvm-svn: 193290
2013-10-23 23:53:07 +00:00
Ted Kremenek c95fe7ca31 More wordsmithing on objc_requires_super documentation.
llvm-svn: 193288
2013-10-23 23:30:08 +00:00
Ted Kremenek 7f7a483c75 Wordsmith text of objc_requires_super.
llvm-svn: 193283
2013-10-23 22:41:52 +00:00
Ted Kremenek 620cde38a2 Fix typo.
llvm-svn: 193281
2013-10-23 22:25:59 +00:00
Ted Kremenek f2ee81ddff Provide documentation on attribute((objc_requires_super)).
llvm-svn: 193278
2013-10-23 22:15:01 +00:00
Ted Kremenek c3481f4c41 Change title of section to reflect the concept, and not the mechanism.
llvm-svn: 193277
2013-10-23 22:14:59 +00:00
Chris Wailes 155df7143f Updated and added to the Consumed documentation.
llvm-svn: 193120
2013-10-21 20:54:06 +00:00
Silviu Baranga f9671dd09d Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior.
llvm-svn: 193074
2013-10-21 10:54:53 +00:00
Peter Collingbourne b453cd64a7 Implement function type checker for the undefined behavior sanitizer.
This uses function prefix data to store function type information at the
function pointer.

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

llvm-svn: 193058
2013-10-20 21:29:19 +00:00
Hans Wennborg 2c21f74f02 clang-cl: Add support for asm listings (/FA and /Fa)
This adds support for outputing the assembly to a file during compilation.
It does this by changing the compilation pipeling to not use the integrated
assembler, and keep the intermediate assembler file.

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

llvm-svn: 192902
2013-10-17 16:16:23 +00:00
Dmitry Vyukov ae4ea1d338 tsan: update docs
update docs for no_sanitize_thread attribute and blacklist

llvm-svn: 192872
2013-10-17 08:06:19 +00:00
Rafael Espindola 46a9c9cb1c Add a note about clang now rejecting unknown options.
llvm-svn: 192808
2013-10-16 16:32:17 +00:00
David Majnemer 6fcf92a21d docs: Remove incompatibility with Solaris shell
There doesn't seem to be a need in checking if a directory exists if we
will just rm -rf it once we affirm that it does.  Instead, just blindly
try to delete it.

This fixes PR17541.

llvm-svn: 192680
2013-10-15 08:33:43 +00:00
Ted Kremenek 84342d69b0 Document the presence of the new Objective-C++ mangling for qualified-id.
llvm-svn: 192670
2013-10-15 04:28:42 +00:00
Hans Wennborg 2a6e6bc41f Add a section about clang-cl to UsersManual.rst
Differential Revision: http://llvm-reviews.chandlerc.com/D1881

llvm-svn: 192337
2013-10-10 01:15:16 +00:00
Richard Smith 0ec313e9ec Suggest people use -Xclang not -cc1 when passing options to the frontend.
llvm-svn: 192222
2013-10-08 19:50:01 +00:00
Richard Smith d6739dca37 Remove documentation of removed -ast-dump-xml flag.
llvm-svn: 192221
2013-10-08 19:45:46 +00:00
Jordan Rose 9db2d9adef [analyzer] Add new debug helper clang_analyzer_warnIfReached.
This will emit a warning if a call to clang_analyzer_warnIfReached is
executed, printing REACHABLE. This is a more explicit way to declare
expected reachability than using clang_analyzer_eval or triggering
a bug (divide-by-zero or null dereference), and unlike the former will
work the same in inlined functions and top-level functions. Like the
other debug helpers, it is part of the debug.ExprInspection checker.

Patch by Jared Grubb!

llvm-svn: 191909
2013-10-03 16:57:03 +00:00
Tim Northover a77b7b8427 Typo in ARM __attribute__((interrupt)) documentation
llvm-svn: 191771
2013-10-01 14:39:43 +00:00
Tim Northover a484bc00ff Implement ARM GNU-style interrupt attribute
This attribute allows users to use a modified C or C++ function as an ARM
exception-handling function and, with care, to successfully return control to
user-space after the issue has been dealt with.

rdar://problem/14207019

llvm-svn: 191769
2013-10-01 14:34:25 +00:00
Manuel Klimek 7491eaa24d Add section on VS integration to the ClangFormat documentation.
llvm-svn: 191642
2013-09-29 17:49:50 +00:00
Douglas Gregor 30e9b6c47d Note that modules are supported for C/Objective-C, and have syntax in ObjC.
llvm-svn: 191562
2013-09-27 21:23:28 +00:00
Justin Bogner bb971c98ea docs: Document CXXLiteralOperatorName and CXXUsingDirective
llvm-svn: 191560
2013-09-27 21:10:54 +00:00