Commit Graph

1342 Commits

Author SHA1 Message Date
Alexander Kornienko e99a3a31ec Fix a typo. NFC
llvm-svn: 261646
2016-02-23 16:12:08 +00:00
Alexander Kornienko b00a7d2fec Clean up clang-format options documentation. NFC
Use uniform style for inline code blocks, specify language for YAML code blocks,
various formatting fixes etc.

llvm-svn: 261645
2016-02-23 16:12:00 +00:00
Alexander Kornienko 32718b6a0c Support language selection for \code blocks.
llvm-svn: 261644
2016-02-23 16:11:55 +00:00
Alexander Kornienko 1e048236b9 Update clang-format options docs.
llvm-svn: 261643
2016-02-23 16:11:51 +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
Aaron Ballman 0f6f82a3a8 Use an anonymous hyperlink reference to eliminate Sphinx warnings.
llvm-svn: 261523
2016-02-22 13:09:36 +00:00
Aaron Ballman eb7e5d9074 Add an AST matcher for real floating-point types. e.g., float, double, long double, but not complex.
llvm-svn: 261221
2016-02-18 16:36:01 +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
David Majnemer 597293981d [MSVC] Turn C++ EH on my default
Our support for C++ EH is sufficiently good that it makes sense to
enable support for it out of the box.

While we are here, update the MSVCCompatibility doc.

llvm-svn: 261195
2016-02-18 08:15:05 +00:00
Kostya Serebryany 52e86493e3 [sanitizer-coverage] allow -fsanitize-coverage=trace-pc w/o any other sanitizer and w/o ...=[func,bb,edge]. This makes this syntax a superset of the GCC's syntax
llvm-svn: 261182
2016-02-18 00:49:23 +00:00
Kostya Serebryany d4590c7304 [sanitizer-coverage] implement -fsanitize-coverage=trace-pc. This is similar to trace-bb, but has a different API. We already use the equivalent flag in GCC for Linux kernel fuzzing. We may be able to use this flag with AFL too
llvm-svn: 261159
2016-02-17 21:34:43 +00:00
Aaron Ballman 232e63d00b Add a nullPointerConstant() AST matcher to handle variations of null pointer constants in one matcher.
llvm-svn: 261008
2016-02-16 21:02:23 +00:00
Sylvestre Ledru be8f396bde Fix some typos in the clang doc
llvm-svn: 260856
2016-02-14 20:20:58 +00:00
Hans Wennborg e8178e8e8f UsersManual: update clang-cl commands
llvm-svn: 260637
2016-02-12 01:01:37 +00:00
Mike Aizatsky a731ee3a80 [sancov] improved object files handling.
Documentation change for: http://reviews.llvm.org/D17169

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

llvm-svn: 260630
2016-02-12 00:29:45 +00:00
NAKAMURA Takumi d8cd060422 Revert r260265, "clang-cl: Support loading plugins on Windows"
It causes memory exhaust on mingw-w64(x64). Investigating.

llvm-svn: 260536
2016-02-11 16:33:20 +00:00
Andrey Bokhanko 5dfd5b651a Partial revert of rL260506.
After some experiments I discovered that clang doesn't support static
initialization of flexible array members in full, so restored this paragraph in
"GCC extensions not implemented yet" list.

llvm-svn: 260519
2016-02-11 13:27:02 +00:00
Andrey Bokhanko e06d2ce369 Update of "GCC extensions not implemented yet" in Clang User's Manual
#pragma weak, global register variables and static initialization of flexible
array members are supported now, so they are removed from "GCC extensions not
implemented yet" list.

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

llvm-svn: 260506
2016-02-11 10:36:06 +00:00
Ehsan Akhgari 75b3a4b507 clang-cl: Support loading plugins on Windows
This builds on the support being added to LLVM to import and export
registries from DLLs.  This will allow us to pick up the registry
entries added in the DLL's copy of FrontendPluginRegistry.

This will allow us to use plugins on Windows using:
$ clang-cl -Xclang -load -Xclang plugin.dll \
           -Xclang -add-plugin -Xclang foo

llvm-svn: 260265
2016-02-09 19:43:11 +00:00
Manuel Klimek de99290e0a Add AST matcher reference to documentation directory when building HTML docs.
llvm-svn: 260218
2016-02-09 10:59:21 +00:00
Peter Collingbourne c8620dfd27 docs: Clarify that cfi-unrelated-cast is based on lifetime.
Also restore Makefile.sphinx which is needed to build the documentation.

llvm-svn: 259382
2016-02-01 18:55:50 +00:00
Aaron Ballman 7e7b7b2def Reapply r259210 with a fix for RegistryTest.cpp.
Patch by Richard Thomson.

llvm-svn: 259359
2016-02-01 14:11:47 +00:00
Alexey Samsonov 7f5b2d0ac8 [UBSan] Add documentation for runtime issue suppression.
llvm-svn: 259260
2016-01-29 23:07:14 +00:00
Hans Wennborg 2b79910d8b Revert r259210 "Extend hasType narrowing matcher for TypedefDecls, add functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes."
It didn't pass check-clang.

llvm-svn: 259218
2016-01-29 18:24:34 +00:00
Aaron Ballman fb9d0e354d Extend hasType narrowing matcher for TypedefDecls, add functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes.
Patch by Richard Thomson

llvm-svn: 259210
2016-01-29 17:03:11 +00:00
Mike Aizatsky 3828cbbf9f [sancov] sancov tool documentation
Differential Revision: http://reviews.llvm.org/D16432

llvm-svn: 259000
2016-01-27 23:56:12 +00:00
Chris Bieneman 2bf68c6c1c Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html

    "This is the way [autoconf] ends
    Not with a bang but a whimper."
    -T.S. Eliot

Reviewers: chandlerc, grosbach, bob.wilson, echristo

Subscribers: klimek, cfe-commits

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

llvm-svn: 258862
2016-01-26 21:30:40 +00:00
Ehsan Akhgari d851833c9a [MSVC Compat] Only warn for unknown clang-cl arguments
Summary:
MSVC's driver accepts all unknown arguments but warns about them.  clang
by default rejects all unknown arguments.  This causes issues
specifically with build systems such as autoconf which liberally pass
things such as $LDFLAGS to the compiler and expect everything to work.
This patch teaches clang-cl to ignore unknown driver arguments.

Reviewers: rnk

Subscribers: cfe-commits

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

llvm-svn: 258720
2016-01-25 21:14:52 +00:00
Aaron Ballman a681151ebd Improving documentation for the isMoveAssignmentOperator AST matcher.
Patch by Jonathan Coe.

llvm-svn: 258628
2016-01-23 17:49:18 +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 31bde8762e Add am AST matcher for isMoveAssignmentOperator.
Patch by Jonathan Coe.

llvm-svn: 258573
2016-01-22 22:37:09 +00:00
Alexey Samsonov 710d9f8385 [Docs] Slightly update LSan documentation.
llvm-svn: 258476
2016-01-22 01:35:45 +00:00
Nico Weber a415a1d0d7 Add an isVirtualAsWritten AST matcher.
http://reviews.llvm.org/D16394

llvm-svn: 258415
2016-01-21 17:56:24 +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
Aaron Ballman 2b6963fce9 Add AST matcher support for FunctionDecls with the hasBody matcher.
Patch by Aleksei Sidorin.

llvm-svn: 258322
2016-01-20 16:26:48 +00:00
Aaron Ballman e8295d7980 Add AST matcher for paren expressions.
Patch by Adrian Zgorzałek.

llvm-svn: 258321
2016-01-20 16:17:39 +00:00
Aaron Ballman eb85b04c7e Add an AST matcher for checking whether a function is defaulted.
Patch by Jonathan Coe.

llvm-svn: 258072
2016-01-18 20:37:44 +00:00
Aaron Ballman d7b18b9f2f Augments r258042; changes the AST matcher tests to use matchesNot and EXPECT_TRUE instead of EXPECT_FALSE. Adds a matcher test to ensure that static member functions are properly handled. Generates the documentation from the matcher.
llvm-svn: 258070
2016-01-18 20:28:57 +00:00
NAKAMURA Takumi 33ff1dda6a [Cygwin] Use -femulated-tls by default since r257718 introduced the new pass.
FIXME: Add more targets to use emutls into clang/test/Driver/emulated-tls.cpp.
FIXME: Add cygwin tests into llvm/test/CodeGen/X86. Working in progress.
llvm-svn: 257984
2016-01-16 03:44:52 +00:00
Peter Collingbourne dc13453128 Introduce -fsanitize-stats flag.
This is part of a new statistics gathering feature for the sanitizers.
See clang/docs/SanitizerStats.rst for further info and docs.

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

llvm-svn: 257971
2016-01-16 00:31:22 +00:00
Artem Dergachev 895242f9fb [analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion, v2.
Provide separate visitor templates for the three hierarchies, and also
the `FullSValVisitor' class, which is a union of all three visitors.

Additionally, add a particular example visitor, `SValExplainer', in order to
test the visitor templates. This visitor is capable of explaining the SVal,
SymExpr, or MemRegion in a natural language.

Compared to the reverted r257605, this fixes the test that used to fail
on some triples, and fixes build failure under -fmodules.

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

llvm-svn: 257893
2016-01-15 15:22:05 +00:00
Hans Wennborg ac3ddfffd7 Update version to 3.9
llvm-svn: 257628
2016-01-13 17:32:59 +00:00
Artem Dergachev 26ec8acc84 Revert "[analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion."
This reverts commit r257605.

The test fails on architectures that use unsigned int as size_t.
SymbolManager.h fails with compile errors on some platforms.

llvm-svn: 257608
2016-01-13 15:52:25 +00:00
Artem Dergachev beb02b5b8f [analyzer] Provide .def-files and visitors for SVal/SymExpr/MemRegion.
Provide separate visitor templates for the three hierarchies, and also
the `FullSValVisitor' class, which is a union of all three visitors.

Additionally, add a particular example visitor, `SValExplainer', in order to
test the visitor templates. This visitor is capable of explaining the SVal,
SymExpr, or MemRegion in a natural language.

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

llvm-svn: 257605
2016-01-13 15:13:48 +00:00
Adrian Prantl a7f56ab893 Document that we recommend to turn off -gmodules when building a static
library for distribution to other machines on the clang man page.

llvm-svn: 256287
2015-12-22 22:37:22 +00:00
Samuel Benzaquen 30747f72eb [ASTMatchers] Fix typo in booleanType() doc.
Fix typo in booleanType() doc and recreate the
LibASTMatchersReference.html reference document.

llvm-svn: 256284
2015-12-22 21:06:36 +00:00
Paul Robinson 0334a047df Driver part of debugger tuning.
Adds driver options named -glldb and -gsce to mean -g plus tuning for
lldb and SCE debuggers respectively; the existing -ggdb option does
the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into
-ggdb -g<N>.  (There will not be -glldb<N> or -gsce<N> options.) The
tuning gets a target-specific default in the driver, and is passed
into cc1 with the new -debugger-tuning option.

As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part
on Linux.

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

llvm-svn: 256104
2015-12-19 19:41:48 +00:00
Zachary Turner 448592eeac Support AlwaysBreakAfterReturnType
This changes the behavior of AlwaysBreakAfterDeclarationReturnType
so that it supports breaking after declarations, definitions, or
both.

Differential Revision: http://reviews.llvm.org/D10370
Reviewed By: Daniel Jasper

llvm-svn: 256046
2015-12-18 22:20:15 +00:00
Evgeniy Stepanov fd6f92d5cb Cross-DSO control flow integrity (Clang part).
Clang-side cross-DSO CFI.

* Adds a command line flag -f[no-]sanitize-cfi-cross-dso.
* Links a runtime library when enabled.
* Emits __cfi_slowpath calls is bitset test fails.
* Emits extra hash-based bitsets for external CFI checks.
* Sets a module flag to enable __cfi_check generation during LTO.

This mode does not yet support diagnostics.

llvm-svn: 255694
2015-12-15 23:00:20 +00:00