Commit Graph

1373 Commits

Author SHA1 Message Date
Peter Collingbourne 3afb266886 Re-apply r267784, r267824 and r267830.
I have updated the compiler-rt tests.

llvm-svn: 267903
2016-04-28 17:09:37 +00:00
Manuel Klimek 9db931021e Fix build.
llvm-svn: 267883
2016-04-28 14:28:19 +00:00
Manuel Klimek 13b7064b55 Fix spuriously dematerializing reference bug. Fixes PR26612.
llvm-svn: 267877
2016-04-28 13:37:45 +00:00
Benjamin Kramer 5556a5cf3b Revert r267784, r267824 and r267830.
It makes compiler-rt tests fail if the gold plugin is enabled.

Revert "Rework interface for bitset-using features to use a notion of LTO visibility."
Revert "Driver: only produce CFI -fvisibility= error when compiling."
Revert "clang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be non-cfi."

llvm-svn: 267871
2016-04-28 12:14:47 +00:00
Peter Collingbourne a8b2f7c0d7 Rework interface for bitset-using features to use a notion of LTO visibility.
Bitsets, and the compiler features they rely on (vtable opt, CFI),
only have visibility within the LTO'd part of the linkage unit. Therefore,
only enable these features for classes with hidden LTO visibility. This
notion is based on object file visibility or (on Windows)
dllimport/dllexport attributes.

We provide the [[clang::lto_visibility_public]] attribute to override the
compiler's LTO visibility inference in cases where the class is defined
in the non-LTO'd part of the linkage unit, or where the ABI supports
calling classes derived from abstract base classes with hidden visibility
in other linkage units (e.g. COM on Windows).

If the cross-DSO CFI mode is enabled, bitset checks are emitted even for
classes with public LTO visibility, as that mode uses a separate mechanism
to cause bitsets to be exported.

This mechanism replaces the whole-program-vtables blacklist, so remove the
-fwhole-program-vtables-blacklist flag.

Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the
support for the special attr:uuid blacklist entry is removed.

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

llvm-svn: 267784
2016-04-27 20:39:53 +00:00
George Burgess IV a17674b7cc [Docs] Fix indentation error introduced by r267447.
llvm-svn: 267501
2016-04-26 00:31:29 +00:00
George Burgess IV 58ebc66e98 [Docs] Clarify what the object-size sanitizer does.
Currently, the UBSan docs make it sound like the object-size sanitizer
will only detect out-of-bounds reads/writes. It also catches some
operations that don't necessarily access memory (invalid downcasts,
calls of methods on invalid pointers, ...). This patch adds a note
about this behavior in the docs.

llvm-svn: 267447
2016-04-25 19:21:45 +00:00
Kostya Serebryany 6453786b26 [sanitizer-coverage] better docs for -fsanitize-coverage=trace-bb
llvm-svn: 266672
2016-04-18 21:28:37 +00:00
Aaron Ballman 66eb58a756 Add typedefNameDecl() and typeAliasDecl() to the AST matchers; improves hasType() to match on TypedefNameDecl nodes.
Patch by Clement Courbet.

llvm-svn: 266331
2016-04-14 16:05:45 +00:00
Alexander Kornienko 7d20a5afdb Add AST Matchers for CXXConstructorDecl::isDelegatingConstructor and CXXMethodDecl::isUserProvided.
Summary: Added two AST matchers: isDelegatingConstructor for CXXConstructorDecl::IsDelegatingConstructor; and isUserProvided corresponding to CXXMethodDecl::isUserProvided.

Reviewers: aaron.ballman, alexfh

Subscribers: klimek, cfe-commits

Patch by Michael Miller!

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

llvm-svn: 266189
2016-04-13 11:13:08 +00:00
John Brawn 8e62db3247 Add a PragmaHandler Registry for plugins to add PragmaHandlers to
This allows plugins which add AST passes to also define pragmas to do things
like only enable certain behaviour of the AST pass in files where a certain
pragma is used.

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

llvm-svn: 265295
2016-04-04 14:22:58 +00:00
Paul Robinson 1c898c9e8c Docs: keep copyright years up-to-date.
llvm-svn: 264941
2016-03-30 22:24:57 +00:00
Gabor Horvath 1b654f2293 [ASTMatchers] Existing matcher hasAnyArgument fixed
Summary: A checker (will be uploaded after this patch) needs to check implicit casts. The checker needs matcher hasAnyArgument but it ignores implicit casts and parenthesized expressions which disables checking of implicit casts for arguments in the checker. However the documentation of the matcher contains a FIXME that this should be removed once separate matchers for ignoring implicit casts and parenthesized expressions are ready. Since these matchers were already there the fix could be executed. Only one Clang checker was affected which was also fixed (ignoreParenImpCasts added) and is separately uploaded. Third party checkers (not in the Clang repository) may be affected by this fix so the fix must be emphasized in the release notes.

Reviewers: klimek, sbenza, alexfh

Subscribers: alexfh, klimek, xazax.hun, cfe-commits

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

llvm-svn: 264855
2016-03-30 11:22:14 +00:00
Reid Kleckner 2a5d34b5ef Update the description of Clang's MSVC compatibility flags
llvm-svn: 264651
2016-03-28 20:42:41 +00:00
Aaron Ballman bcf13da98e Fix Sphinx errors with documentation build.
llvm-svn: 264263
2016-03-24 12:34:44 +00:00
Eric Christopher 37df19ebee Add release notes for the removal of the silent include of altivec.h.
llvm-svn: 264236
2016-03-24 01:28:25 +00:00
Matt Arsenault 08087c52eb Add missing __builtin_bitreverse8
Also add documentation for bitreverse builtins

llvm-svn: 264203
2016-03-23 22:14:43 +00:00
Alexander Kornienko 976921d4b4 [ASTMatchers] New matcher hasReturnValue added
Summary: A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has" ignores implicit casts and parenthesized expressions and no specific matcher for matching return value expression preexisted. The patch adds such a matcher (hasReturnValue).

Reviewers: klimek, sbenza

Subscribers: xazax.hun, klimek, cfe-commits

Patch by Ádám Balogh!

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

llvm-svn: 264037
2016-03-22 11:03:03 +00:00
Daniel Jasper 9c8ff3551a clang-format: Make include sorting's main include detection configurable.
This patch adds a regular expression to configure suffixes of an
included file to check whether it is the "main" include of the current
file. Previously, clang-format has allowed arbitrary suffixes on the
formatted file, which is still the case when no IncludeMainRegex is
specified.

llvm-svn: 263943
2016-03-21 14:11:27 +00:00
John Brawn 6c78974b29 Make it possible for AST plugins to enable themselves by default
Currently when an AST plugin is loaded it must then be enabled by passing
-plugin pluginname or -add-plugin pluginname to the -cc1 command line. This
patch adds a method to PluginASTAction which allows it to declare that the
action happens before, instead of, or after the main AST action, plus the
relevant changes to make the plugin action happen at that time automatically.

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

llvm-svn: 263546
2016-03-15 12:51:40 +00:00
Dmitry Polukhin 5af55b663c NFC fix documentation build by rL263015
This time I hope it will fix the build for real.

llvm-svn: 263052
2016-03-09 19:39:16 +00:00
Hans Wennborg b2ed61a611 ReleaseNotes: update 'you may prefer' link to 3.8
llvm-svn: 263031
2016-03-09 17:26:46 +00:00
Aaron Ballman a35b8fcef8 Adding new AST matchers for: addrLabelExpr, atomicExpr, binaryConditionalOperator, designatedInitExpr, designatorCountIs, hasSyntacticForm, implicitValueInitExpr, labelDecl, opaqueValueExpr, parenListExpr, predefinedExpr, requiresZeroInitialization, and stmtExpr.
Patch by Aleksei Sidorin.

llvm-svn: 263027
2016-03-09 17:11:51 +00:00
Dmitry Polukhin bc82e2635d NFC fix documentation build by rL263015
llvm-svn: 263023
2016-03-09 16:19:04 +00:00
Dmitry Polukhin bf17ecf59a [GCC] PR23529 Sema part of attrbute abi_tag support
Original patch by Stefan Bühler http://reviews.llvm.org/D12834

Difference between original and this one:
- fixed all comments in original code review
- added more tests, all new diagnostics now covered by tests
- moved abi_tag on re-declaration checks to Sema::mergeDeclAttributes
  where they actually may work as designed
- clang-format + other stylistic changes

Mangle part will be sent for review as a separate patch.

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

llvm-svn: 263015
2016-03-09 15:30:53 +00:00
Alexander Kornienko a079856a51 [docs] Add missing file
llvm-svn: 262604
2016-03-03 10:44:10 +00:00
Alexander Kornienko 33a03cd898 [docs] Updated doxygen files to work well with doxygen 1.8.11
Doxygen 1.8.11 doesn't seem to like files with ".intro" extension by default.

llvm-svn: 262603
2016-03-03 10:42:46 +00:00
Alexander Kornienko 70f97c9bfb Workaround doxygen bug https://bugzilla.gnome.org/show_bug.cgi?id=506243
llvm-svn: 262138
2016-02-27 14:02:08 +00:00
Matt Arsenault 2d9339890f Add __builtin_canonicalize
llvm-svn: 262122
2016-02-27 09:06:18 +00:00
Peter Collingbourne fb532b9a34 Add whole-program vtable optimization feature to Clang.
This patch introduces the -fwhole-program-vtables flag, which enables the
whole-program vtable optimization feature (D16795) in Clang.

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

llvm-svn: 261767
2016-02-24 20:46:36 +00:00
Alexander Kornienko ef10cd7f46 [docs] Change non-c++ code blocks to 'text' format to fix a sphinx warning.
llvm-svn: 261744
2016-02-24 15:07:48 +00:00
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