Commit Graph

1108 Commits

Author SHA1 Message Date
Daniel Jasper 553d4878da clang-format: Introduce style with spaces on both sides of */&.
Patch by Janusz Sobczak (slightly extended).
This fixes llvm.org/19929.

llvm-svn: 211098
2014-06-17 12:40:34 +00:00
Bob Wilson 3f2ed176a5 Add documentation for PGO with instrumentation to clang's User's Manual.
<rdar://problem/16771671>

llvm-svn: 211085
2014-06-17 00:45:30 +00:00
Sylvestre Ledru 06aebc4d69 One of our buildbot for FreeBSD does not support std::to_string.
Use stringstream instead to convert int to string

llvm-svn: 210972
2014-06-14 09:28:27 +00:00
Adrian Prantl 4ad03dc355 Document Darwin-specific defaults.
llvm-svn: 210958
2014-06-13 23:35:54 +00:00
Adrian Prantl f2d3e34e6f Make these two words equally bold.
llvm-svn: 210938
2014-06-13 21:31:55 +00:00
Adrian Prantl 36b8067317 Copy the documentation of -fstandalone-debug from the man page to the user
manual.

rdar://problem/17307006

llvm-svn: 210936
2014-06-13 21:12:31 +00:00
Alexey Samsonov e595e1ade0 Remove top-level Clang -fsanitize= flags for optional ASan features.
Init-order and use-after-return modes can currently be enabled
by runtime flags. use-after-scope mode is not really working at the
moment.

The only problem I see is that users won't be able to disable extra
instrumentation for init-order and use-after-scope by a top-level Clang flag.
But this instrumentation was implicitly enabled for quite a while and
we didn't hear from users hurt by it.

llvm-svn: 210924
2014-06-13 17:53:44 +00:00
Aaron Ballman 60e466f4d8 The automated server-side process isn't quite right yet, so this is a newly-generated attribute reference. Tanya is looking into the server process when she gets the chance.
llvm-svn: 210691
2014-06-11 19:11:24 +00:00
Samuel Benzaquen f56a29924f Add hasLocalStorage/hasGlobalStorage matchers.
Summary:
Add hasLocalStorage/hasGlobalStorage matchers for VarDecl nodes.
Update the doc. Also add them to the dynamic registry.

Reviewers: klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D4034

llvm-svn: 210278
2014-06-05 18:22:14 +00:00
Richard Smith 760520bcb7 Add __builtin_operator_new and __builtin_operator_delete, which act like calls
to the normal non-placement ::operator new and ::operator delete, but allow
optimizations like new-expressions and delete-expressions do.

llvm-svn: 210137
2014-06-03 23:27:44 +00:00
Diego Novillo 263ce21e05 Add documentation for -Rpass*
Summary:
This adds documentation for -Rpass, -Rpass-missed and -Rpass-analysis.
It also adds release notes for 3.5.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D3730

llvm-svn: 209841
2014-05-29 20:13:27 +00:00
Dario Domizioli 33c1787147 [DOC] Documentation for #pragma clang optimize on/off
llvm-svn: 209738
2014-05-28 14:06:38 +00:00
Manuel Klimek a2c2a4faa0 Make equalsNode work with pointers to subtypes.
llvm-svn: 209652
2014-05-27 12:31:10 +00:00
Manuel Klimek 909b5c94c0 Adds child traversal matchers for IfStmt's then and else branches.
llvm-svn: 209649
2014-05-27 10:04:12 +00:00
Manuel Klimek 2af0a91cc4 Allow hasBody on CXXForRangeStmt nodes and update the docs.
llvm-svn: 209647
2014-05-27 07:45:18 +00:00
Tim Northover 573cbee543 AArch64/ARM64: rename ARM64 components to AArch64
This keeps Clang consistent with backend naming conventions.

llvm-svn: 209579
2014-05-24 12:52:07 +00:00
Peter Collingbourne 786283734a Revert r209231, "Update AttributeReference.rst."
According to Aaron, this is being generated on the server now.

llvm-svn: 209232
2014-05-20 19:38:07 +00:00
Peter Collingbourne 450a0b1dc9 Update AttributeReference.rst.
llvm-svn: 209231
2014-05-20 19:27:39 +00:00
Eric Christopher c9e2a68905 Clean up language and grammar.
Based on a patch by jfcaron3@gmail.com!
PR19806

llvm-svn: 209215
2014-05-20 17:10:39 +00:00
Daniel Jasper c0be7604cf clang-format: Fix Sphinx build error.
Patch by Adam Strzelecki, thank you!

llvm-svn: 208882
2014-05-15 13:55:19 +00:00
Daniel Jasper 2e8600c02b clang-format: Add clang-format-diff usage examples for SVN.
llvm-svn: 208766
2014-05-14 09:36:11 +00:00
Daniel Jasper 17605d3961 clang-format: Add option to allow short blocks on a single line.
With AllowShortBlocksOnASingleLine, clang-format allows:
  if (a) { return; }

Based on patch by Gonzalo BG, thank you!

llvm-svn: 208765
2014-05-14 09:33:35 +00:00
Richard Smith 6d54014144 PR19698, PR19674: enable __has_feature checks for cxx_generic_lambdas and
cxx_decltype_auto, and fix documentation of cxx_generic_lambdas and
cxx_init_captures to specify the right feature-check name.

llvm-svn: 208445
2014-05-09 21:08:59 +00:00
Richard Smith 06900a0ffb Update documentation to match recent API change. newFrontendActionFactory now returns a unique_ptr.
llvm-svn: 207789
2014-05-01 20:04:39 +00:00
Diego Novillo 9e43084fb4 Review feedback.
llvm-svn: 206997
2014-04-23 15:21:23 +00:00
Diego Novillo 897c59ce09 Review feedback.
llvm-svn: 206996
2014-04-23 15:21:21 +00:00
Diego Novillo 8ebff32487 Review feedback
llvm-svn: 206995
2014-04-23 15:21:20 +00:00
Diego Novillo a5256bf9fd Add documentation for sample profiling support.
Summary:
This documents the usage of sample profilers with Clang and the
profile format expected by LLVM's optimizers. It also documents the
profile conversion tool used by Linux Perf.

Reviewers: doug.gregor

CC: cfe-commits

Differential Revision: http://reviews.llvm.org/D3402

llvm-svn: 206994
2014-04-23 15:21:07 +00:00
John Thompson 2255f2ce90 Initial implementation of -modules-earch-all option, for searching for symbols in non-imported modules.
llvm-svn: 206977
2014-04-23 12:57:01 +00:00
Reid Kleckner 230f662d12 Fix sphinx-build warnings in clang docs.
llvm-svn: 206661
2014-04-18 21:55:49 +00:00
Reid Kleckner 5d21c4990f Add support for building Sphinx documentation when being inside LLVM source tree and using CMake
Patch by Daniel Liew <daniel.liew@imperial.ac.uk>!

llvm-svn: 206660
2014-04-18 21:55:46 +00:00
Ben Langmuir 47d1ca4838 Rename lib/Headers/module.map to module.modulemap
Don't install a file using the legacy spelling.

llvm-svn: 206431
2014-04-17 00:52:48 +00:00
Yunzhong Gao a8c45c9f88 Add description about the __is_identifier() macro
llvm-svn: 206099
2014-04-12 02:25:32 +00:00
Daniel Jasper b55248278f clang-format: Update flag documentation, and generation script.
llvm-svn: 205853
2014-04-09 14:05:49 +00:00
Daniel Jasper e1e4319ab7 clang-format: Support configurable list of foreach-macros.
This fixes llvm.org/PR17242.

Patch by Brian Green, thank you!

llvm-svn: 205307
2014-04-01 12:55:11 +00:00
Tim Northover a2ee433c8d ARM64: initial clang support commit.
This adds Clang support for the ARM64 backend. There are definitely
still some rough edges, so please bring up any issues you see with
this patch.

As with the LLVM commit though, we think it'll be more useful for
merging with AArch64 from within the tree.

llvm-svn: 205100
2014-03-29 15:09:45 +00:00
Dmitri Gribenko 3be06ffcd8 Documentation: remove a spurious '1' and wrap to 80 columns
llvm-svn: 205035
2014-03-28 19:25:09 +00:00
Douglas Gregor b5ecb908af Document module.private.modulemap and module_private.map.
Requested in <rdar://problem/16188740>.

llvm-svn: 205030
2014-03-28 19:05:18 +00:00
Alexander Kornienko 18fa48c9f9 Move the -i[no-]system-prefix options from CC1Options.td to Options.td.
Summary:
This allows them to be used without -cc1 the same way as -I and -isystem.
Renamed the options to --system-header-prefix=/--no-system-header-prefix to avoid interference with -isystem and make the intent of the option cleaner.

Reviewers: rsmith

Reviewed By: rsmith

CC: cfe-commits

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

llvm-svn: 204775
2014-03-26 01:39:59 +00:00
Alexey Samsonov 997a923eeb Document removed flags in release notes
llvm-svn: 204438
2014-03-21 07:25:01 +00:00
Evgeniy Stepanov 2bfcaabdec [msan] -fsanitize-memory-track-origins=[level] flag and docs.
This change turns -fsanitize-memory-track-origins into
-fsanitize-memory-track-origins=[level] flag (keeping the old one for
compatibility). Possible levels are 0 (off), 1 (default) and 2 (incredibly
detailed). See docs (part of this patch) for more info.

llvm-svn: 204346
2014-03-20 14:58:36 +00:00
Alexey Samsonov cb3f812b6b Kill -faddress-sanitizer, -fthread-sanitizer and -fcatch-undefined-behavior flags.
These flags are deprecated since at least Clang 3.3. Users should instead
use -fsanitize= with appropriate values.

llvm-svn: 204330
2014-03-20 10:48:29 +00:00
Ben Langmuir 984e1df77a Add a new spelling for module map files 'module.modulemap'
This name, while more verbose, plays more nicely with tools that use
file extensions to determine file types. The existing spelling
'module.map' will continue to work, but the new spelling will take
precedence.

In frameworks, this new filename will only go in a new 'Modules'
sub-directory.

Similarly, add a module.private.modulemap corresponding to
module_private.map.

llvm-svn: 204261
2014-03-19 20:23:34 +00:00
Dmitri Gribenko 10e2a8f228 CMake: allow generation of a Qt Compressed Help file for Clang source
r203272 enables generation of a Qt Compressed Help file for the LLVM source
code.

As a consequence, this change brings the same capabilities to Clang while
reusing these two variables:

  LLVM_ENABLE_DOXYGEN_QT_HELP
  LLVM_DOXYGEN_QHELPGENERATOR_PATH

and adding

  CLANG_DOXYGEN_QCH_FILENAME="org.llvm.clang.qch"
  CLANG_DOXYGEN_QHP_NAMESPACE="org.llvm.clang"
  CLANG_DOXYGEN_QHP_CUST_FILTER_NAME="Clang ${CLANG_VERSION}"
  CLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS="Clang,${CLANG_VERSION}"

Patch by Konrad Kleine.

llvm-svn: 203801
2014-03-13 14:17:01 +00:00
Samuel Benzaquen a083935d0a Add loc() to the dynamic registry.
Summary:
Add loc() to the dynamic registry.
Other fixes:
 - Fix the polymorphic variant value to accept an exact match, even if
   there are other possible conversions.
 - Fix specifiesTypeLoc() to not crash on an empty
   NestedNameSpecifierLoc.

Reviewers: klimek

CC: cfe-commits, klimek

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

llvm-svn: 203467
2014-03-10 15:40:23 +00:00
Nico Weber c7cb940440 Add a note in the user manual that tsan is not supported on Mac.
Patch from Sean McBride <sean@rogue-research.com>!

llvm-svn: 203260
2014-03-07 18:11:40 +00:00
Nico Weber ab88f0b12f "Mac OS/X" -> "Mac OS X" spelling fixes for clang.
Patch from Sean McBride <sean@rogue-research.com>!

llvm-svn: 203259
2014-03-07 18:09:57 +00:00
Dmitri Gribenko d2bbdcfc0d ExternalClangExamples: add a link to ToyClangPlugin
Patch by Alexey Denisov.

llvm-svn: 203219
2014-03-07 09:06:12 +00:00
Rui Ueyama 1987d52691 [docs] s/cpp11-migrate/clang-modernize/
llvm-svn: 203158
2014-03-06 20:30:05 +00:00
Dmitri Gribenko 28bfb48fd0 Expand documentation section on comment parsing
Patch by Jonathan Sauer, with a little editing by me.

llvm-svn: 203128
2014-03-06 16:32:09 +00:00
Nico Weber fcf6128c71 Mention clang-cl in MSVCCompatibility.rst
llvm-svn: 203002
2014-03-05 20:18:59 +00:00
Reid Kleckner 77d7698709 Fix MSVCCompatibility doc ReST and wording.
llvm-svn: 202732
2014-03-03 18:22:25 +00:00
David Majnemer fc256c3952 AttributeReference: Use UNIX line endings
llvm-svn: 202656
2014-03-02 18:17:08 +00:00
Aaron Ballman b576a36c88 Adding some cross references to the sanitizer attribute documentation. Removes a Sphinx warning pointed out by Sean Silva.
llvm-svn: 202655
2014-03-02 17:48:20 +00:00
Richard Smith 7794486846 Add [extern_c] attribute for modules, allowing a C module to be imported within an extern "C" block in C++ code.
llvm-svn: 202615
2014-03-02 05:58:18 +00:00
Richard Smith 49f906a36f If a module A exports a macro M, and a module B imports that macro and #undef's
it, importers of B should not see the macro. This is complicated by the fact
that A's macro could also be visible through a different path. The rules (as
hashed out on cfe-commits) are included as a documentation update in this
change.

With this, the number of regressions in libc++'s testsuite when modules are
enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are
due to remaining bugs in this change (in particular, the handling of submodules
is imperfect).

llvm-svn: 202560
2014-03-01 00:08:04 +00:00
Reid Kleckner 49133948a9 Add Clang docs about MSVC compatibility
This documents some of the status of supported functionality in MSVC
quirks mode.  Some of this should be in
http://clang.llvm.org/compatibility.html instead when things have
stabilized.

llvm-svn: 202559
2014-02-28 23:46:04 +00:00
Tobias Grosser 741602461d Add 'remark' diagnostic type in 'clang'
A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.

A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.

This patch provides the initial implementation of 'remarks'. It includes the
actual definiton of the remark nodes, their printing as well as basic parameter
handling. We are reusing the existing diagnostic parameters which means a remark
can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to
an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade
remarks.

This patch is by intention minimal in terms of parameter handling. More
experience and more discussions will most likely lead to further enhancements
in the parameter handling.

llvm-svn: 202475
2014-02-28 09:11:08 +00:00
David Majnemer ae88b72ac8 AttributeReference: Document __single_inhertiance, __multiple_inheritance, __virtual_inheritance
Add documentation for these attributes, it includes:
- Motivation for their existence.
- Examples on how to use them.
- Examples on how to misuse them.

llvm-svn: 202121
2014-02-25 08:28:55 +00:00
David Majnemer 27d8b20ee5 Modules: Fix malformed reStructuredText
llvm-svn: 202117
2014-02-25 06:22:25 +00:00
David Majnemer 6fe8a7fe8a AttributeReference: Fix a typo
llvm-svn: 202112
2014-02-25 05:33:01 +00:00
Alp Toker f45fa3dca5 Fix typos
llvm-svn: 202108
2014-02-25 04:21:44 +00:00
Aaron Ballman c523dcff29 Clarifying the wording for the noduplicate attribute.
Patch by Marcello Maggioni!

llvm-svn: 202035
2014-02-24 13:46:15 +00:00
Manuel Klimek 0389269a7d Fix AST matcher documentation for overloaded matchers.
Before this patch we would only use the fist occurance of a matcher
function in the documentation, for example leaving out
hasType(Matcher<QualType>).

llvm-svn: 202019
2014-02-24 10:40:22 +00:00
Manuel Klimek 4f8f890ade Fix docs generation for the AST matchers:
1. Move internal functions into ASTMatchersInternal.
2. Adapt dump_ast_matchers.py to the new VariadicOperatorMatcherFunc
   signature.
3. Update the actual docs with the updated tool / code.

llvm-svn: 202017
2014-02-24 10:28:36 +00:00
Aaron Ballman 5afdd1d770 Fixing the indentation of the RST content in the release notes. Fixes two warnings when building the HTML content and improves the format of the resulting content.
llvm-svn: 201987
2014-02-23 16:27:21 +00:00
Saleem Abdulrasool 3aa840e685 Release Notes: document -f{,no-}integrate-as
Now that the integrated assembler is considered a first class feature of the
compiler and has a proper feature flag, document the change in the compiler
flags.  Ensure that we indicate that the legacy flags are still available, but,
encourage users to switch to the feature flags.

llvm-svn: 201964
2014-02-23 02:08:45 +00:00
Aaron Ballman 19c02d29f5 Adding manual headings to the new capability attributes' documentation.
llvm-svn: 201942
2014-02-22 19:04:55 +00:00
Aaron Ballman 7c19ab17c7 Exposing the noduplicate attribute within Clang, which marks functions so that the optimizer does not duplicate code.
Patch thanks to Marcello Maggioni!

llvm-svn: 201941
2014-02-22 16:59:24 +00:00
Aaron Ballman 5ee46d2a9e Moving the documentation for the format attribute into AttrDocs.
llvm-svn: 201857
2014-02-21 14:36:13 +00:00
Aaron Ballman ea6668c4e8 Moving the documentation for the type safety checking attributes into AttrDocs. If a custom heading is provided, do not automatically generate the alternate spelling list. This is necessary because some attributes have distinct semantic spellings and meanings, but use the same semantic attribute internally. Such attributes should have multiple elements in their documentation list, but not show all spellings. At some point, it would be nice to have a way to attach the documentation element to a specific spelling for these cases.
llvm-svn: 201851
2014-02-21 14:14:04 +00:00
Aaron Ballman 7803b888c4 Moving the documentation for the sanitizer negation attributes into AttrDocs.
llvm-svn: 201850
2014-02-21 13:44:43 +00:00
Aaron Ballman 68893db056 Doing some temporary touch-up on the gnu namespace attribute documentation, from a post-commit review comment.
Ideally, this content will eventually find a home with the rest of the attribute documentation.

llvm-svn: 201736
2014-02-19 23:21:40 +00:00
Aaron Ballman 5142a2c03a Until attribute documentation is implemented as a server-side feature, I will be manually committing AttributeReference.rst so that attribute documentation can be on the live server instead of simply disappearing from the language extensions page without obvious replacement.
This is a temporary stop-gap solution until server-side generation is implemented, at which point the AttributeReference.rst will go back to holding placeholder text.

llvm-svn: 201733
2014-02-19 23:09:37 +00:00
Aaron Ballman 4de1b584cd Refactored the way attribute category headers are handled so that it is possible to use custom categories. This allows for moving the consumable attributes (consumable, callable_when, return_typestate, etc) to be grouped together, with a content heading, like they were in the language extensions documentation. Moved the consumable attribute documentation from the language extensions into the attribute documentation table.
llvm-svn: 201732
2014-02-19 22:59:32 +00:00
Aaron Ballman 0e4aa52e88 Moving the documentation for the ARM interrupt attribute into AttrDocs.
llvm-svn: 201716
2014-02-19 21:12:23 +00:00
Aaron Ballman 896bace47f Moving the documentation for the clang::fallthrough attribute into AttrDocs.
llvm-svn: 201715
2014-02-19 20:56:51 +00:00
Aaron Ballman 0580cd4ff5 Some of these headings had the incorrect number of "underlines" and so would get warnings when generating the content from Sphinx. No functional changes intended.
llvm-svn: 201713
2014-02-19 20:43:58 +00:00
Aaron Ballman 9751a7285e Moving the documentation for the availability attribute into AttrDocs.
llvm-svn: 201712
2014-02-19 20:39:48 +00:00
Alexander Kornienko aa7bca15f0 Updated tutorial code according to the changes in r197139.
Thanks to Konrad Kleine for reporting the inconsistency!

llvm-svn: 201693
2014-02-19 16:11:38 +00:00
Aaron Ballman 840cef3e0d Moving the documentation for the objc_requires_super attribute into AttrDocs.
llvm-svn: 201687
2014-02-19 15:45:13 +00:00
Aaron Ballman c0331f5fe0 Moving the documentation for the objc_method_family attribute into AttrDocs.
llvm-svn: 201686
2014-02-19 15:38:02 +00:00
Aaron Ballman 683ea9cb12 Moving the documentation for the overloadable attribute into AttrDocs.
llvm-svn: 201678
2014-02-19 14:53:20 +00:00
Aaron Ballman 20750f591d Moving the documentation for the enable_if attribute into AttrDocs. Removed the "clang introduces" phrase for style consistency, but otherwise the documentation is identical.
llvm-svn: 201677
2014-02-19 14:48:31 +00:00
DeLesley Hutchins c51e08c7ea Updated documentation for Thread Safety Analysis.
llvm-svn: 201598
2014-02-18 19:42:01 +00:00
Aaron Ballman 97dba048a3 Implements a declarative approach to documenting individual attributes in Clang via a Documentation tablegen class. Also updates the internals manual with information about how to use this new, required, documentation feature.
This patch adds some very, very sparse initial documentation for some attributes. Additional effort from attribute authors is greatly appreciated.

llvm-svn: 201515
2014-02-17 15:27:10 +00:00
Daniel Jasper ee107adb7d clang-format: Improve documentation of DerivePointerBinding.
For reference: llvm.org/PR18690.

Also updated generated help page and page creation script.

llvm-svn: 201323
2014-02-13 12:51:50 +00:00
James Dennett 2220dfadda Fix indentation of a code example in LibTooling's documentation.
llvm-svn: 200944
2014-02-06 20:16:05 +00:00
Alexander Kornienko 4fa81df455 Changed OptionCategory variables to be static.
llvm-svn: 200876
2014-02-05 21:28:03 +00:00
Kostya Serebryany 870baf8cb3 [sanitizer] update the list of supported platforms in the docs
llvm-svn: 200529
2014-01-31 10:49:34 +00:00
Nick Lewycky 8993f26550 Clarify. Thanks to Sean Silva and Warren Hunt for help wordsmithing!
llvm-svn: 200292
2014-01-28 07:03:46 +00:00
Nick Lewycky b05a8440cc Fix always-false conditional thinko in documentation.
llvm-svn: 200289
2014-01-28 06:20:56 +00:00
Alp Toker 4af8fa9ae4 Remove buggy example code from the documentation
Instead point readers to the latest, correct example code in SVN until we find
a way to automatically include example sources into the documentation (or until
someone steps up to maintain these actively).

This ensures that the examples are up-to-date, buildable, and most of all that
readers don't pick up incorrect usage.

llvm-svn: 200125
2014-01-26 05:08:07 +00:00
Richard Trieu c158c5a029 Remove HTML codes from a .rst file. The proper HTML code will be added back
when the .html file is generated.

llvm-svn: 200060
2014-01-25 01:32:39 +00:00
Amara Emerson 05d816d0e2 [AArch64] Replace underscores with dashes in -mgeneral_regs_only.
This should now match the equivalent gcc option.

llvm-svn: 200008
2014-01-24 15:15:27 +00:00
Richard Smith 81830b204b Remove outdated documentation suggesting we don't support the C++1y lambda extensions.
llvm-svn: 199964
2014-01-24 02:12:28 +00:00
Amara Emerson 04e2ecfda2 [AArch64] Add -mgeneral_regs_only option.
llvm-svn: 199904
2014-01-23 15:48:30 +00:00
David Woodhouse ddf8985325 Add documentation for -m16 option on X86, fix typo
llvm-svn: 199894
2014-01-23 14:32:46 +00:00
Aaron Ballman b39a9b8b0c Adding a bit of documentation that was missed with r198883 (when ParseArgumentsAsUnevaluated was added).
llvm-svn: 199679
2014-01-20 18:42:10 +00:00
Aaron Ballman b9023ed0f6 Exposed a declarative way to specify that an attribute can be duplicated when merging attributes on a declaration. This replaces some hard-coded functionality from Sema.
llvm-svn: 199677
2014-01-20 18:07:09 +00:00
Alp Toker 73287bfe40 MSVC 2013 type trait support
Implement type trait primitives used in the latest edition of the Microsoft
standard C++ library type_traits header.

With this change we can parse much of the Visual Studio 2013 standard headers,
particularly anything that includes <type_traits>.

Fully implemented, available in all language modes:

 * __is_constructible()
 * __is_nothrow_constructible()
 * __is_nothrow_assignable()

Partially implemented, semantic analysis WIP, available as MS extensions:

 * __is_destructible()
 * __is_nothrow_destructible()

llvm-svn: 199619
2014-01-20 00:24:09 +00:00
Alp Toker 64197b9eb9 docs: clarify the role of compiler-builtin type trait primitives
Update the documentation to clarify the intent of clang's built-in type trait
facilities, their relation to user-facing C++ type traits and means to check
for availability.

Also explain that __has_feature() is not currently up to date and should not
generally be used in user code (there's a proposal to provide more consistent
checks via __has_builtin(), see cfe-dev).

llvm-svn: 199562
2014-01-18 21:49:02 +00:00
Nick Lewycky ed91da719e Try to fix this link.
llvm-svn: 199538
2014-01-18 02:29:10 +00:00
Alexander Potapenko f47e667c05 [ASan] Enough to have llvm-symbolizer in $PATH.
llvm-svn: 199388
2014-01-16 14:01:39 +00:00
Alexander Potapenko 108bc0311f [ASan] Typo fix (symbolize=0 disables online symbolization)
llvm-svn: 199385
2014-01-16 13:48:16 +00:00
Alexander Potapenko c7549007c9 [ASan] Describe online/offline symbolization of reports, mention dsymutil.
llvm-svn: 199383
2014-01-16 13:46:29 +00:00
Nick Lewycky 9c8754f56b This code block wasn't showing up in the html. Try this?
llvm-svn: 199306
2014-01-15 08:33:00 +00:00
Nick Lewycky b9737cd0bc Fix the attribute enable_if example in the docs to be 100% real-world, instead of merely being close to the real world to mislead people. This now matches the test.
llvm-svn: 199298
2014-01-15 06:34:12 +00:00
Alp Toker a8bb9c97c6 Fix cxx_variable_templates feature check and documentation
This C++ feature has been marked complete since r191549, but the documentation
claimed it wasn't supported at all and the extension check misreported it as
being available in C.

No regression test; this was a short-lived typo.

llvm-svn: 199292
2014-01-15 04:11:24 +00:00
Tim Northover 9778348172 Driver: clarify help string for "-###"
Someone recently wasted some time not realising that "-###" didn't
actually execute the commands it printed, and suggested a
documentation tweak.

Having made the same mistake myself on at least one occasion, I
sympathise. So here it is. Any kibitzing on an even better text
welcome.

llvm-svn: 199256
2014-01-14 20:49:19 +00:00
Eli Bendersky aa2e61f3fc Clarify the LibTooling.rst a bit
The ClangCheck tool has changed and no longer is exactly equivalent to the
code pasted in the doc.

llvm-svn: 199215
2014-01-14 14:29:19 +00:00
Nick Lewycky 7dae818117 Whoops! Fix major think-o in the first example in the documentation that I edited at 3am.
llvm-svn: 198997
2014-01-11 02:55:22 +00:00
Nick Lewycky 35a6ef4c35 Add a new attribute 'enable_if' which can be used to control overload resolution based on the values of the function arguments at the call site.
llvm-svn: 198996
2014-01-11 02:50:57 +00:00
Aaron Ballman a4bb4b9f0b Updating documentation for the __has_attribute changes landed in r198897.
llvm-svn: 198899
2014-01-09 23:11:13 +00:00
Aaron Ballman 92e28e876d Updating the documentation about how to add attributes based on the rather extensive refactorings that have happened over the past several months.
llvm-svn: 198705
2014-01-07 20:12:20 +00:00
Adrian Prantl a763447124 Implement a new -fstandalone-debug option. rdar://problem/15685848
It controls everything that -flimit-debug-info used to, plus the
vtable type optimization. The old -fno-limit-debug-info option is now an
alias to -fstandalone-debug and vice versa.

Standalone is the default on Darwin until dtrace is updated to work with
non-standalone debug info (rdar://problem/15758808).

Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind
because NoStandaloneDebugInfo sounded even more confusing.

llvm-svn: 198655
2014-01-07 01:19:08 +00:00
NAKAMURA Takumi d40d387fb1 Update the copyright credits -- Happy new year 2014!
FIXME: Dragonegg may be updated at non-trivial changes.
llvm-svn: 198274
2014-01-01 08:27:31 +00:00
Adrian Prantl 4efc805402 Remove an outdated statement about debugging optimized code.
llvm-svn: 197820
2013-12-20 17:39:42 +00:00
Adrian Prantl f418b10972 Document the -fno-limit-debug-info switch in the man page.
llvm-svn: 197819
2013-12-20 17:39:35 +00:00
Renato Golin f2fcddb967 Move comment to its rightful place
llvm-svn: 197219
2013-12-13 09:27:34 +00:00
Rafael Espindola 3497069784 Switch to the new MingW ABI.
GCC 4.7 changed the MingW ABI. On the clang side this means that methods now
have the thiscall calling convention by default.

llvm-svn: 197164
2013-12-12 16:07:11 +00:00
Alexander Kornienko a818200efb Fixed a typo
llvm-svn: 197142
2013-12-12 10:08:54 +00:00
Alexander Kornienko b5e774eb2c Filter-out irrelevant command-line options in CommonOptionsParser.
Summary:
Leave only -help, -version and options from the specified category.
Updated clang-check and clang-tidy. As clang-tidy is in a separate repository,
here's the diff:

  Index: tools/extra/clang-tidy/tool/ClangTidyMain.cpp
  ===================================================================
  --- tools/extra/clang-tidy/tool/ClangTidyMain.cpp       (revision 197024)
  +++ tools/extra/clang-tidy/tool/ClangTidyMain.cpp       (working copy)
  @@ -39,7 +39,7 @@
   // FIXME: Add option to list name/description of all checks.
   
   int main(int argc, const char **argv) {
  -  CommonOptionsParser OptionsParser(argc, argv);
  +  CommonOptionsParser OptionsParser(argc, argv, ClangTidyCategory);
   
     SmallVector<clang::tidy::ClangTidyError, 16> Errors;
     clang::tidy::runClangTidy(Checks, OptionsParser.getCompilations(),

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits, revane, klimek

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

llvm-svn: 197139
2013-12-12 09:59:42 +00:00
Richard Smith 48d1b65541 Update user manual to note that implementation for C++11 and C++1y is complete, and fix a bunch of other issues here.
llvm-svn: 197120
2013-12-12 02:42:17 +00:00
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