Commit Graph

87 Commits

Author SHA1 Message Date
Alexander Kornienko 32718b6a0c Support language selection for \code blocks.
llvm-svn: 261644
2016-02-23 16:11:55 +00:00
Alexander Kornienko 370bfb4431 Allow running dump_format_style.py from any directory.
llvm-svn: 261642
2016-02-23 16:11:43 +00:00
Samuel Benzaquen 922bef4f38 [ASTMatchers] Add matcher hasAnyName.
Summary: Add matcher hasAnyName as an optimization over anyOf(hasName(),...)

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

llvm-svn: 261574
2016-02-22 21:13:02 +00:00
Yury Gribov 75118f5d3d [analyzer] dump_ast_matchers.py: fix replacement regexps
Patch by Alex Sidorin!

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

llvm-svn: 261219
2016-02-18 15:43:56 +00:00
Aaron Ballman 672dde2b3e Properly encode the < entity; it was missing the semicolon. Regenerating the AST matcher reference after fixing the issue. Thanks to Richard for noticing the issue and bringing it to my attention!
llvm-svn: 258579
2016-01-22 23:15:00 +00:00
Aaron Ballman c35724cc72 When dumping documentation for AST matchers, do something more useful with \see doxygen commands. Ideally this would link to the target of \see, but for now it translates \see into "See also: "
Regenerate the AST documentation for this new functionality.

llvm-svn: 258401
2016-01-21 15:18:25 +00:00
Benjamin Kramer 611d33a5a2 Fix ASTMatcher reference newlines and make the generator script windows-proof.
llvm-svn: 253653
2015-11-20 07:46:19 +00:00
Daniel Jasper 8e1ecca2ec clang-format: Hopefully fix code blocks in docs.
Otherwise I will have to install sphinx ;)..

llvm-svn: 249542
2015-10-07 13:02:45 +00:00
Daniel Jasper b5bda7c0b0 clang-format: Add empty line before code-blocks in Docs.
llvm-svn: 249394
2015-10-06 12:11:51 +00:00
Daniel Jasper 8ce1b8df76 clang-format: Make IncludeCategories configurable in .clang-format file.
This was made much easier by introducing an IncludeCategory struct to
replace the previously used std::pair.

Also, cleaned up documentation and added examples.

llvm-svn: 249392
2015-10-06 11:54:18 +00:00
Daniel Jasper c1bc38ed4f clang-format: Add a new brace style "custom" as well as flags to
control the individual braces. The existing choices for brace wrapping
are now merely presets for the different flags that get expanded upon
calling the reformat function.

All presets have been chose to keep the existing formatting, so there
shouldn't be any difference in formatting behavior.

Also change the dump_format_style.py to properly document the nested
structs that are used to keep these flags discoverable among all the
configuration flags.

llvm-svn: 248802
2015-09-29 14:57:55 +00:00
Manuel Klimek 5d093286f0 Fix AST matcher documentation.
Fix a bug in the matcher docs where callExpr(on(...)) was in the examples,
but didn't work (on() only works for memberCallExpr).

Fix a bug in the doc dump script that was introduced in r231575 when
removing a regexp capture without adapting the code that uses the
captures.

llvm-svn: 245040
2015-08-14 11:47:51 +00:00
Andrew Wilkins 6238c6f09a Sphinx-based clang man pages
Summary:
This diff introduces .rst files, Sphinx config, and a CMake target
for building clang man pages. This will deprecate the existing .pod-
based man page, and will integrate nicely with CMake. This diff does
not remove the existing man page; that will be done in a follow-up
once packagers have had a chance to react to the change.

For now, only clang(1) has been done; others can be added over time
by dropping additional files into the docs/CommandGuide directory.
The index page for CommandGuide has been copied from LLVM's
docs/CommandGuide.

The man page itself is mostly the same, with a few minor cosmetic
changes. The only major change is the SYNOPSIS section. I was unable
to get .rst/Sphinx produce the same style as in the existing man page.
Instead, I changed it to match the LLVM tools' relatively simple style.

To build the man pages, use the "docs-clang-man" target if building
with CMake. Otherwise, use "make -f Makefile.sphinx man".

Reviewers: cmatthews, silvas

Subscribers: dim, gaeke, beanz, cfe-commits

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

llvm-svn: 241037
2015-06-30 02:52:38 +00:00
Saleem Abdulrasool 28ff2317e5 docs: grammar adjustments in clang manpage
Fix a few typos and run-on sentences in the clang POD documentation.

Patch by Brian R. Gaeke!

llvm-svn: 239652
2015-06-13 01:21:58 +00:00
Benjamin Kramer 57dd9bd5cc ASTMatchers: Make AST_POLYMORPHIC_SUPPORTED_TYPES a variadic macro
C++11 finally allows us to use this C99 feature.

llvm-svn: 231575
2015-03-07 20:38:15 +00:00
Daniel Jasper 7f43266778 clang-format: Escape '*' in generated flag documentation.
llvm-svn: 223118
2014-12-02 14:21:16 +00:00
Adrian Prantl 4ad03dc355 Document Darwin-specific defaults.
llvm-svn: 210958
2014-06-13 23:35:54 +00:00
Daniel Jasper b55248278f clang-format: Update flag documentation, and generation script.
llvm-svn: 205853
2014-04-09 14:05:49 +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 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
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
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
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
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
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
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 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
Alexander Kornienko d278e0eee3 Added documentation for clang-format style options.
Summary:
The main contents is in the ClangFormatStyleOptions.rst, which can be
updated from the Format.h by the dump_format_style.py script.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 189946
2013-09-04 15:09:13 +00:00
Samuel Benzaquen 85ec25d21c Rewrite eachOf/allOf/anyOf to use a variadic operator.
Summary:
Rewrite eachOf/allOf/anyOf to use a variadic operator, instead of hand-written calls to Polymorphic matchers.
This simplifies their definition and future changes to add them to the dynamic registry.

Reviewers: klimek

CC: cfe-commits, revane

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

llvm-svn: 189357
2013-08-27 15:11:16 +00:00
Samuel Benzaquen bd7d887f18 Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
Summary:
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers.

Reviewers: klimek

CC: cfe-commits, revane

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

llvm-svn: 188560
2013-08-16 16:19:42 +00:00
Manuel Klimek dba64f1aff Fix incorrect documentation generation for type matchers.
llvm-svn: 187104
2013-07-25 06:05:50 +00:00
Samuel Benzaquen 79656e19c8 Add support for type traversal matchers.
Summary:
Fixup the type traversal macros/matchers to specify the supported types.
Make the marshallers a little more generic to support any variadic function.
Update the doc script.

Reviewers: klimek

CC: cfe-commits, revane

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

llvm-svn: 186340
2013-07-15 19:25:06 +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
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
Manuel Klimek 4feac28e0e Cleanup of ASTMatcher macros and adding support for overloaded matchers.
This is in preparation for adding other overloaded matchers. This change
alone is a net win in LOC.
I went through all matchers and looked whether we could now encode them
as macro, or simplify them with the matcher atoms that were not
available before.

llvm-svn: 174540
2013-02-06 20:36:22 +00:00
Ted Kremenek 653f523664 Revert "Remove sparse text on diagnostic options. These are not really documented anywhere, and they really aren't for normal users."
I changed my mind.  We should just document these in the man page.

llvm-svn: 174344
2013-02-05 06:33:47 +00:00
Ted Kremenek e2af9b5d2c Remove sparse text on diagnostic options. These are not really documented anywhere, and they really aren't for normal users.
llvm-svn: 174338
2013-02-05 05:55:21 +00:00
Manuel Klimek cdd5c2397a Fixes dump_ast_matchers to parse all matcher macros and updates the
docs.

llvm-svn: 171962
2013-01-09 09:38:21 +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
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 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
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
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
Benjamin Kramer a20863e67d Fix a typo (builting -> builtin).
Patch by Afriza N. Arief!

llvm-svn: 149822
2012-02-05 11:24:56 +00:00
Daniel Dunbar 0f41eee2a0 Driver: Add support for a new -nostdlibinc option.
- This disables the system include directories, but not the compiler builtin
   directories. Useful for projects that want to use things like the intrinsic
   headers, but are otherwise freestanding.

 - I'm willing to reconsider the option naming, I also considered providing an
   explicit -builtinc (which would match -nobuiltininc), but this is more
   consistent with existing options.

llvm-svn: 141692
2011-10-11 18:20:16 +00:00