]> granicus.if.org Git - clang/log
clang
7 years agoMerging r302817:
Tom Stellard [Tue, 16 May 2017 13:33:48 +0000 (13:33 +0000)]
Merging r302817:

------------------------------------------------------------------------
r302817 | rsmith | 2017-05-11 14:58:24 -0400 (Thu, 11 May 2017) | 9 lines

PR22877: When constructing an array via a constructor with a default argument
in list-initialization, run cleanups for the default argument after each
iteration of the initialization loop.

We previously only ran the destructor for any temporary once, at the end of the
complete loop, rather than once per iteration!

Re-commit of r302750, reverted in r302776.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@303167 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r294313:
Tom Stellard [Tue, 16 May 2017 12:00:44 +0000 (12:00 +0000)]
Merging r294313:

------------------------------------------------------------------------
r294313 | stulova | 2017-02-07 11:09:41 -0500 (Tue, 07 Feb 2017) | 9 lines

[OpenCL] Accept logical NOT for pointer types in CL1.1

Fix for bug 30217 - incorrect error given for logical
NOT operation with a pointer type: corrected sema check
and improved related tests.

Review: D29038

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@303161 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r297098:
Brad Smith [Fri, 28 Apr 2017 00:36:13 +0000 (00:36 +0000)]
Merging r297098:

------------------------------------------------------------------------
r297098 | brad | 2017-03-06 18:48:31 -0500 (Mon, 06 Mar 2017) | 2 lines

Set the Int64Type / IntMaxType types correctly for OpenBSD/mips64
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@301605 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r299574:
Tom Stellard [Wed, 26 Apr 2017 20:48:39 +0000 (20:48 +0000)]
Merging r299574:

------------------------------------------------------------------------
r299574 | nico | 2017-04-05 14:10:42 -0400 (Wed, 05 Apr 2017) | 17 lines

clang-format: Support formatting utf-8 character literals in C++11+ mode.

clang-format <<END
auto c1 = u8'a';
auto c2 = u'a';
END

Before:
  auto c1 = u8 'a';
  auto c2 = u'a';

Now:
  auto c1 = u8'a';
  auto c2 = u'a';

Patch from Denis Gladkikh <llvm@denis.gladkikh.email>!

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@301463 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r299269:
Brad Smith [Sat, 22 Apr 2017 17:20:27 +0000 (17:20 +0000)]
Merging r299269:

------------------------------------------------------------------------
r299269 | brad | 2017-03-31 18:13:17 -0400 (Fri, 31 Mar 2017) | 2 lines

Add/update PIE defaults for OpenBSD.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@301087 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r296430:
Brad Smith [Sat, 22 Apr 2017 17:15:15 +0000 (17:15 +0000)]
Merging r296430:

------------------------------------------------------------------------
r296430 | brad | 2017-02-27 22:20:26 -0500 (Mon, 27 Feb 2017) | 2 lines

Set ABIs correctly for OpenBSD/arm; soft float and aapcs-linux.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@301086 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295786:
Brad Smith [Sat, 22 Apr 2017 17:05:51 +0000 (17:05 +0000)]
Merging r295786:

------------------------------------------------------------------------
r295786 | brad | 2017-02-21 18:13:09 -0500 (Tue, 21 Feb 2017) | 2 lines

Hook up OpenBSD AArch64 support
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@301085 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295635:
Brad Smith [Sat, 22 Apr 2017 16:53:19 +0000 (16:53 +0000)]
Merging r295635:

------------------------------------------------------------------------
r295635 | brad | 2017-02-19 22:18:15 -0500 (Sun, 19 Feb 2017) | 5 lines

Enable support for __float128 in Clang on OpenBSD/X86

/usr/local/include/c++/4.9.4/type_traits:279:39: error: __float128 is not
supported on this target
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@301084 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295614:
Brad Smith [Sat, 22 Apr 2017 16:45:56 +0000 (16:45 +0000)]
Merging r295614:

------------------------------------------------------------------------
r295614 | brad | 2017-02-19 15:11:48 -0500 (Sun, 19 Feb 2017) | 2 lines

Always use --eh-frame-hdr on OpenBSD, even for -static
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@301083 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r299347:
Craig Topper [Tue, 4 Apr 2017 00:31:22 +0000 (00:31 +0000)]
Merging r299347:
------------------------------------------------------------------------
r299347 | ctopper | 2017-04-02 20:51:57 -0700 (Sun, 02 Apr 2017) | 1 line

[AVX-512] Fix a couple more intrinsic macros I missed in r299346.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@299405 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r299346:
Craig Topper [Tue, 4 Apr 2017 00:28:56 +0000 (00:28 +0000)]
Merging r299346:
------------------------------------------------------------------------
r299346 | ctopper | 2017-04-02 20:41:29 -0700 (Sun, 02 Apr 2017) | 3 lines

[AVX-512] Fix some intrinsic macros that use the wrong macro parameter names and don't have parentheses around them.

Thanks to Matthew Barr for reporting this issue.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@299404 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r296656:
Hans Wennborg [Thu, 2 Mar 2017 16:47:48 +0000 (16:47 +0000)]
Merging r296656:
------------------------------------------------------------------------
r296656 | bruno | 2017-03-01 11:18:42 -0800 (Wed, 01 Mar 2017) | 34 lines

[PCH] Avoid VarDecl emission attempt if no owning module avaiable

This is a stopgap fix for PR31863, a regression introduced in r276159.

Consider this snippet:

struct FVector;
struct FVector {};
struct FBox {
  FVector Min;
  FBox(int);
};
namespace {
FBox InvalidBoundingBox(0);
}

While parsing the DECL_VAR for 'struct FBox', clang recursively read all the
dep decls until it finds the DECL_CXX_RECORD forward declaration for 'struct
FVector'. Then, it resumes all the way up back to DECL_VAR handling in
`ReadDeclRecord`, where it checks if `isConsumerInterestedIn` for the decl.

One of the condition for `isConsumerInterestedIn` to return false is if the
VarDecl is imported from a module `D->getImportedOwningModule()`, because it
will get emitted when we import the relevant module. However, before checking
if it comes from a module, clang checks if `Ctx.DeclMustBeEmitted(D)`, which
triggers the emission of 'struct FBox'. Since one of its fields is still
incomplete, it crashes.

Instead, check if `D->getImportedOwningModule()` is true before calling
`Ctx.DeclMustBeEmitted(D)`.

Differential Revision: https://reviews.llvm.org/D29753

rdar://problem/30173654
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296762 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRelaseNotes: tweaks
Hans Wennborg [Fri, 24 Feb 2017 23:35:04 +0000 (23:35 +0000)]
RelaseNotes: tweaks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296197 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReleaseNotes: drop dead sections
Hans Wennborg [Fri, 24 Feb 2017 23:29:12 +0000 (23:29 +0000)]
ReleaseNotes: drop dead sections

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296195 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReleaseNotes: tweaks
Hans Wennborg [Fri, 24 Feb 2017 23:27:41 +0000 (23:27 +0000)]
ReleaseNotes: tweaks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296194 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReleaseNotes: drop in-progress warning
Hans Wennborg [Fri, 24 Feb 2017 23:23:34 +0000 (23:23 +0000)]
ReleaseNotes: drop in-progress warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296192 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r293604:
Hans Wennborg [Fri, 24 Feb 2017 18:49:54 +0000 (18:49 +0000)]
Merging r293604:
------------------------------------------------------------------------
r293604 | sammccall | 2017-01-30 21:23:20 -0800 (Mon, 30 Jan 2017) | 12 lines

In VirtualCallChecker, handle indirect calls

Summary:
In VirtualCallChecker, handle indirect calls.

getDirectCallee() can be nullptr, and dyn_cast(nullptr) is UB

Reviewers: bkramer

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D29303
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296154 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r296063:
Hans Wennborg [Fri, 24 Feb 2017 18:46:08 +0000 (18:46 +0000)]
Merging r296063:
------------------------------------------------------------------------
r296063 | hans | 2017-02-23 17:16:34 -0800 (Thu, 23 Feb 2017) | 4 lines

Revert r291477 "[Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin"

It caused PR31864. There is a patch in progress to fix that, but let's
revert in the meantime.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296152 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295474:
Hans Wennborg [Fri, 24 Feb 2017 18:44:42 +0000 (18:44 +0000)]
Merging r295474:
------------------------------------------------------------------------
r295474 | hahnfeld | 2017-02-17 10:32:58 -0800 (Fri, 17 Feb 2017) | 6 lines

[OpenMP] Fix cancellation point in task with no cancel

With tasks, the cancel may happen in another task. This has a different
region info which means that we can't find it here.

Differential Revision: https://reviews.llvm.org/D30091
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296151 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r296139; it accidentally merged multiple things
Hans Wennborg [Fri, 24 Feb 2017 18:42:59 +0000 (18:42 +0000)]
Revert r296139; it accidentally merged multiple things

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296150 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295474:
Hans Wennborg [Fri, 24 Feb 2017 17:26:20 +0000 (17:26 +0000)]
Merging r295474:
------------------------------------------------------------------------
r295474 | hahnfeld | 2017-02-17 10:32:58 -0800 (Fri, 17 Feb 2017) | 6 lines

[OpenMP] Fix cancellation point in task with no cancel

With tasks, the cancel may happen in another task. This has a different
region info which means that we can't find it here.

Differential Revision: https://reviews.llvm.org/D30091
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296139 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295843:
Hans Wennborg [Thu, 23 Feb 2017 18:36:11 +0000 (18:36 +0000)]
Merging r295843:
------------------------------------------------------------------------
r295843 | jvesely | 2017-02-22 07:01:42 -0800 (Wed, 22 Feb 2017) | 3 lines

[OpenCL] r600 needs OpenCL kernel calling convention

Differential Revision: https://reviews.llvm.org/D30236
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296001 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295473:
Hans Wennborg [Thu, 23 Feb 2017 18:33:45 +0000 (18:33 +0000)]
Merging r295473:
------------------------------------------------------------------------
r295473 | hahnfeld | 2017-02-17 10:32:51 -0800 (Fri, 17 Feb 2017) | 13 lines

[OpenMP] Remove barriers at cancel and cancellation point

This resolves a deadlock with the cancel directive when there is no explicit
cancellation point. In that case, the implicit barrier acts as cancellation
point. After removing the barrier after cancel, the now unmatched barrier for
the explicit cancellation point has to go as well.

This has probably worked before rL255992: With the calls for the explicit
barrier, it was sure that all threads passed a barrier before exiting.

Reported by Simon Convent and Joachim Protze!

Differential Revision: https://reviews.llvm.org/D30088
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@296000 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r294954 and r295592:
Hans Wennborg [Tue, 21 Feb 2017 19:55:46 +0000 (19:55 +0000)]
Merging r294954 and r295592:
------------------------------------------------------------------------
r294954 | chapuni | 2017-02-13 06:59:53 -0800 (Mon, 13 Feb 2017) | 5 lines

Fix r291495 -- Normalize LLVM_CMAKE_PATH in clang standalone build.

CMake handles paths with slashes. It caused cmake/install failure on msbuild.exe.

Note, Other llvm-config-oriented variables have been normalized since they are stored in the cache attributed with PATH.
------------------------------------------------------------------------

------------------------------------------------------------------------
r295592 | chapuni | 2017-02-18 19:17:31 -0800 (Sat, 18 Feb 2017) | 1 line

clang/CMakeLists.txt: Rework r294954 -- use file(TO_CMAKE_PATH).
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295760 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295610:
Hans Wennborg [Tue, 21 Feb 2017 19:11:22 +0000 (19:11 +0000)]
Merging r295610:
------------------------------------------------------------------------
r295610 | brad | 2017-02-19 11:33:26 -0800 (Sun, 19 Feb 2017) | 4 lines

Link static PIE programs against rcrt0.o on OpenBSD

Patch by Stefan Kempf.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295752 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReleaseNotes: static analyzer; by Anna Zaks
Hans Wennborg [Tue, 21 Feb 2017 18:27:27 +0000 (18:27 +0000)]
ReleaseNotes: static analyzer; by Anna Zaks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295742 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295224:
Hans Wennborg [Thu, 16 Feb 2017 21:13:06 +0000 (21:13 +0000)]
Merging r295224:
------------------------------------------------------------------------
r295224 | rsmith | 2017-02-15 11:57:10 -0800 (Wed, 15 Feb 2017) | 2 lines

PR24440: Do not silently discard a fold-expression appearing as the operand of a cast-expression.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295375 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295313:
Hans Wennborg [Thu, 16 Feb 2017 17:10:08 +0000 (17:10 +0000)]
Merging r295313:
------------------------------------------------------------------------
r295313 | stulova | 2017-02-16 04:49:29 -0800 (Thu, 16 Feb 2017) | 9 lines

[OpenCL][Doc] Added OpenCL vendor extension description to user manual doc

Added description of a new feature that allows to specify
vendor extension in flexible way using compiler pragma instead
of modifying source code directly (committed in clang@r289979).

Review: D29829

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295340 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[OpenCL][Doc] Relase 4.0 notes for OpenCL
Anastasia Stulova [Thu, 16 Feb 2017 12:55:39 +0000 (12:55 +0000)]
[OpenCL][Doc] Relase 4.0 notes for OpenCL

Review: D29830

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295315 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295150:
Hans Wennborg [Wed, 15 Feb 2017 20:51:59 +0000 (20:51 +0000)]
Merging r295150:
------------------------------------------------------------------------
r295150 | ahatanak | 2017-02-14 21:15:28 -0800 (Tue, 14 Feb 2017) | 13 lines

[Sema] Disallow returning a __block variable via a move.

r274291 made changes to prefer calling a move constructor to calling a
copy constructor when returning from a function. This caused programs to
crash when a __block variable in the heap was moved out and used later.

This commit fixes the bug by disallowing moving out of __block variables
implicitly.

rdar://problem/28181080

Differential Revision: https://reviews.llvm.org/D29908

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295234 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r295149:
Hans Wennborg [Wed, 15 Feb 2017 20:49:39 +0000 (20:49 +0000)]
Merging r295149:
------------------------------------------------------------------------
r295149 | rsmith | 2017-02-14 20:18:23 -0800 (Tue, 14 Feb 2017) | 2 lines

Fix assertion failure due to implicit special member lookup lacking a source location.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295233 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r294800:
Hans Wennborg [Tue, 14 Feb 2017 19:03:31 +0000 (19:03 +0000)]
Merging r294800:
------------------------------------------------------------------------
r294800 | gbiv | 2017-02-10 14:52:29 -0800 (Fri, 10 Feb 2017) | 10 lines

Don't let EvaluationModes dictate whether an invalid base is OK

What we want to actually control this behavior is something more local
than an EvalutationMode. Please see the linked revision for more
discussion on why/etc.

This fixes PR31843.

Differential Revision: https://reviews.llvm.org/D29469

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295087 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r294855:
Hans Wennborg [Tue, 14 Feb 2017 17:35:55 +0000 (17:35 +0000)]
Merging r294855:
------------------------------------------------------------------------
r294855 | compnerd | 2017-02-11 09:24:09 -0800 (Sat, 11 Feb 2017) | 3 lines

docs: update docs for objc_storeStrong behaviour

objc_storeStrong does not return a value.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@295076 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoDocs: drop minor version
Hans Wennborg [Wed, 8 Feb 2017 17:27:55 +0000 (17:27 +0000)]
Docs: drop minor version

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@294481 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r294008:
Hans Wennborg [Fri, 3 Feb 2017 22:23:11 +0000 (22:23 +0000)]
Merging r294008:
------------------------------------------------------------------------
r294008 | arphaman | 2017-02-03 06:22:33 -0800 (Fri, 03 Feb 2017) | 14 lines

[Sema][ObjC++] Typo correction should handle ivars and properties

After r260016 and r260017 disabled typo correction for ivars and properties
clang didn't report errors about unresolved identifier in the base of ivar and
property ref expressions. This meant that clang invoked CodeGen on invalid AST
which then caused a crash.

This commit re-enables typo correction for ivars and properites, and fixes the
PR25113 & PR26486 (that were originally fixed in r260017 and r260016) in a
different manner by transforming the Objective-C ivar reference expression with
'IsFreeIvar' preserved.

rdar://30310772

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@294059 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r293043:
Hans Wennborg [Fri, 3 Feb 2017 21:45:29 +0000 (21:45 +0000)]
Merging r293043:
------------------------------------------------------------------------
r293043 | dergachev | 2017-01-25 02:21:45 -0800 (Wed, 25 Jan 2017) | 12 lines

[analyzer] Fix MacOSXAPIChecker fp with static locals seen from nested blocks.

This is an attempt to avoid new false positives caused by the reverted r292800,
however the scope of the fix is significantly reduced - some variables are still
in incorrect memory spaces.

Relevant test cases added.

rdar://problem/30105546
rdar://problem/30156693
Differential revision: https://reviews.llvm.org/D28946

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@294050 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r293787:
Hans Wennborg [Wed, 1 Feb 2017 18:45:31 +0000 (18:45 +0000)]
Merging r293787:
------------------------------------------------------------------------
r293787 | arphaman | 2017-02-01 09:37:28 -0800 (Wed, 01 Feb 2017) | 5 lines

[CodeGen][ObjC] Avoid asserting on block pointer types in
isPointerZeroInitializable

rdar://30111891

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293797 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r293360:
Hans Wennborg [Wed, 1 Feb 2017 17:13:26 +0000 (17:13 +0000)]
Merging r293360:
------------------------------------------------------------------------
r293360 | gbiv | 2017-01-27 18:19:40 -0800 (Fri, 27 Jan 2017) | 11 lines

Change how we handle diagnose_if attributes.

This patch changes how we handle argument-dependent `diagnose_if`
attributes. In particular, we now check them in the same place that we
check for things like passing NULL to Nonnull args, etc. This is
basically better in every way than how we were handling them before. :)

This fixes PR31638, PR31639, and PR31640.

Differential Revision: https://reviews.llvm.org/D28889

------------------------------------------------------------------------
Merging r293369:
------------------------------------------------------------------------
r293369 | gbiv | 2017-01-27 20:16:32 -0800 (Fri, 27 Jan 2017) | 7 lines

Attempt to unbreak buildbots.

r293360 broke some ARM bots, because size_t on those targets is
apparently `unsigned int`, not `unsigned long`. `sizeof(whatever)`
should to give us a `size_t`, so we can just use the type of that
instead.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293784 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291963:
Hans Wennborg [Wed, 1 Feb 2017 17:10:26 +0000 (17:10 +0000)]
Merging r291963:
------------------------------------------------------------------------
r291963 | ericwf | 2017-01-13 14:11:40 -0800 (Fri, 13 Jan 2017) | 9 lines

[clang] Emit `diagnose_if` warnings from system headers

Summary: In order for libc++ to meaningfully use `diagnose_if` warnings they need to be emitted from system headers by default. This patch changes the `diagnose_if` warning diagnostic to be shown in system headers.

Reviewers: george.burgess.iv, rsmith, aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D28703
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293783 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r293678:
Hans Wennborg [Wed, 1 Feb 2017 16:59:51 +0000 (16:59 +0000)]
Merging r293678:
------------------------------------------------------------------------
r293678 | ahatanak | 2017-01-31 11:53:32 -0800 (Tue, 31 Jan 2017) | 9 lines

[Sema] Transform a templated name before looking it up in
FindInstantiatedDecl or passing it to RebuildMemberExpr.

This fixes PR30361.

rdar://problem/17341274

Differential Revision: https://reviews.llvm.org/D24969

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293782 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292194:
Hans Wennborg [Tue, 31 Jan 2017 22:31:45 +0000 (22:31 +0000)]
Merging r292194:
------------------------------------------------------------------------
r292194 | majnemer | 2017-01-16 20:14:25 -0800 (Mon, 16 Jan 2017) | 8 lines

[AST] AttributedType should derive type properties from the EquivalentType

Using the canonical type instead of the equivalent type can result in
insufficient template instantiations.

This fixes PR31656.

Differential Revision: https://reviews.llvm.org/D28788
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293702 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r293596:
Hans Wennborg [Tue, 31 Jan 2017 17:27:07 +0000 (17:27 +0000)]
Merging r293596:
------------------------------------------------------------------------
r293596 | ahatanak | 2017-01-30 18:31:39 -0800 (Mon, 30 Jan 2017) | 7 lines

Handle ObjCEncodeExpr in extractStringLiteralCharacter.

This fixes an assertion failure that occurs later in the function when
an ObjCEncodeExpr is cast to StringLiteral.

rdar://problem/30111207

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293653 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r293134:
Hans Wennborg [Fri, 27 Jan 2017 16:56:16 +0000 (16:56 +0000)]
Merging r293134:
------------------------------------------------------------------------
r293134 | akirtzidis | 2017-01-25 18:11:50 -0800 (Wed, 25 Jan 2017) | 4 lines

[index] When indexing an ObjC method declaration use its base name for the location.

Instead of using the location of the beginning '-'/'+'.
This is consistent with location used for function decls and ObjC method calls where we use the base name as the location as well.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293303 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292590:
Hans Wennborg [Fri, 27 Jan 2017 16:45:42 +0000 (16:45 +0000)]
Merging r292590:
------------------------------------------------------------------------
r292590 | abataev | 2017-01-20 00:57:28 -0800 (Fri, 20 Jan 2017) | 6 lines

[OPENMP] Fix for PR31643: Clang crashes when compiling code on Windows
with SEH and openmp

In some cituations (during codegen for Windows SEH constructs)
CodeGenFunction instance may have CurFn equal to nullptr. OpenMP related
code does not expect such situation during cleanup.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293302 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292561:
Hans Wennborg [Fri, 27 Jan 2017 16:26:10 +0000 (16:26 +0000)]
Merging r292561:
------------------------------------------------------------------------
r292561 | rsmith | 2017-01-19 17:19:46 -0800 (Thu, 19 Jan 2017) | 3 lines

PR31701: Fix crash on invalid caused by parsing a dependent initializer when we
don't know we're in a dependent context.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293297 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292991:
Hans Wennborg [Wed, 25 Jan 2017 17:04:26 +0000 (17:04 +0000)]
Merging r292991:
------------------------------------------------------------------------
r292991 | rsmith | 2017-01-24 15:18:28 -0800 (Tue, 24 Jan 2017) | 3 lines

PR31742: Don't emit a bogus "zero size array" extwarn when initializing a
runtime-sized array from an empty list in an array new.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@293072 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292874:
Hans Wennborg [Tue, 24 Jan 2017 16:53:43 +0000 (16:53 +0000)]
Merging r292874:
------------------------------------------------------------------------
r292874 | dcoughlin | 2017-01-23 18:10:59 -0800 (Mon, 23 Jan 2017) | 6 lines

Revert "[analyzer] Fix memory space of static locals seen from nested blocks."

This reverts commit r292800.

It is causing null pointer dereference false positives when a block that
captures a static local is evaluated at the top level.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292947 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292847:
Hans Wennborg [Tue, 24 Jan 2017 00:14:31 +0000 (00:14 +0000)]
Merging r292847:
------------------------------------------------------------------------
r292847 | rsmith | 2017-01-23 15:14:23 -0800 (Mon, 23 Jan 2017) | 2 lines

PR31692: Don't mark a declaration as invalid if we haven't necessarily emitted a (user-visible) error.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292859 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292800:
Hans Wennborg [Tue, 24 Jan 2017 00:08:26 +0000 (00:08 +0000)]
Merging r292800:
------------------------------------------------------------------------
r292800 | dergachev | 2017-01-23 08:57:11 -0800 (Mon, 23 Jan 2017) | 13 lines

[analyzer] Fix memory space of static locals seen from nested blocks.

When a block within a function accesses a function's static local variable,
this local is captured by reference rather than copied to the heap.

Therefore this variable's memory space is known: StaticGlobalSpaceRegion.
Used to be UnknownSpaceRegion, same as for stack locals.

Fixes a false positive in MacOSXAPIChecker.

rdar://problem/30105546
Differential revision: https://reviews.llvm.org/D28946

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292858 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292497:
Hans Wennborg [Mon, 23 Jan 2017 17:59:45 +0000 (17:59 +0000)]
Merging r292497:
------------------------------------------------------------------------
r292497 | arphaman | 2017-01-19 09:17:57 -0800 (Thu, 19 Jan 2017) | 6 lines

[Sema] Fix PR28181 by avoiding calling BuildOverloadedBinOp in C mode

rdar://28532840

Differential Revision: https://reviews.llvm.org/D25213

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292808 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292555, r292558 and r292559:
Hans Wennborg [Mon, 23 Jan 2017 17:55:50 +0000 (17:55 +0000)]
Merging r292555, r292558 and r292559:
------------------------------------------------------------------------
r292555 | rsmith | 2017-01-19 16:45:35 -0800 (Thu, 19 Jan 2017) | 6 lines

P0426: Make the library implementation of constexpr char_traits a little easier
by providing a memchr builtin that returns char* instead of void*.

Also add a __has_feature flag to indicate the presence of constexpr forms of
the relevant <string> functions.

------------------------------------------------------------------------

------------------------------------------------------------------------
r292558 | rsmith | 2017-01-19 16:57:59 -0800 (Thu, 19 Jan 2017) | 2 lines

Add documentation for constexpr string builtin support.

------------------------------------------------------------------------

------------------------------------------------------------------------
r292559 | rsmith | 2017-01-19 17:08:15 -0800 (Thu, 19 Jan 2017) | 2 lines

Fix documentation typo.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292807 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291955:
Hans Wennborg [Thu, 19 Jan 2017 01:51:39 +0000 (01:51 +0000)]
Merging r291955:
------------------------------------------------------------------------
r291955 | rsmith | 2017-01-13 12:46:54 -0800 (Fri, 13 Jan 2017) | 3 lines

PR31606: Generalize our tentative DR resolution for inheriting copy/move
constructors to better match the pre-P0136R1 behavior.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292463 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292119:
Joerg Sonnenberger [Thu, 19 Jan 2017 00:10:50 +0000 (00:10 +0000)]
Merging r292119:
------------------------------------------------------------------------
r292119 | joerg | 2017-01-16 15:07:24 +0100 (Mo, 16. Jan 2017) | 3 Zeilen

Ensure that clang -pthread creates the right macro. -D_POSIX_THREADS
seems to have been a C&P error from old GCC specs for OpenBSD.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292451 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292247:
Hans Wennborg [Wed, 18 Jan 2017 04:45:43 +0000 (04:45 +0000)]
Merging r292247:
------------------------------------------------------------------------
r292247 | jbcoe | 2017-01-17 12:03:54 -0800 (Tue, 17 Jan 2017) | 14 lines

Fix Python 3 language issues and add an explicit check for Python version == 2.

Summary:
Python bindings cannot support Python 3 without work being done to fix Unicode c-string conversion.

This was attempted in https://reviews.llvm.org/D26082. That patch was reverted due to memory access issues on Linux.

This revision fixes enough language compatibility issues for the clang module to be loaded and raise an error if the Python version is not 2.

Reviewers: mgorny, MathieuDuponchelle, rengolin, compnerd

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D28682
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292339 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292183:
Hans Wennborg [Wed, 18 Jan 2017 04:36:52 +0000 (04:36 +0000)]
Merging r292183:
------------------------------------------------------------------------
r292183 | rsmith | 2017-01-16 18:14:37 -0800 (Mon, 16 Jan 2017) | 14 lines

Partial revert of r290511.

The rules around typechecking deduced template arguments during partial
ordering are not clear, and while the prior behavior does not seem to be
correct (it doesn't follow the general model of partial ordering where each
template parameter is replaced by a non-dependent but unique value), the new
behavior is also not clearly right and breaks some existing idioms.

The new behavior is retained for dealing with non-type template parameters
with 'auto' types, as without it even the most basic uses of that feature
don't work. We can revisit this once CWG has come to an agreement on how
partial ordering with 'auto' non-type template parameters is supposed to
work.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292338 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292052:
Hans Wennborg [Wed, 18 Jan 2017 00:24:13 +0000 (00:24 +0000)]
Merging r292052:
------------------------------------------------------------------------
r292052 | akirtzidis | 2017-01-14 22:11:04 -0800 (Sat, 14 Jan 2017) | 1 line

[code-completion] Fix crash when trying to do postfix completion of instance member inside a static function.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292313 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292032:
Hans Wennborg [Wed, 18 Jan 2017 00:16:39 +0000 (00:16 +0000)]
Merging r292032:
------------------------------------------------------------------------
r292032 | yrnkrn | 2017-01-14 13:12:08 -0800 (Sat, 14 Jan 2017) | 4 lines

Fix PR31644 introduced by r287138 and add a regression test.
Thanks Dimitry Andric for the report and fix!

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292311 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMake the -fstrict-vtable-pointers link relative
Hans Wennborg [Tue, 17 Jan 2017 21:33:39 +0000 (21:33 +0000)]
Make the -fstrict-vtable-pointers link relative

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292267 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r292265:
Hans Wennborg [Tue, 17 Jan 2017 21:32:31 +0000 (21:32 +0000)]
Merging r292265:
------------------------------------------------------------------------
r292265 | hans | 2017-01-17 13:31:57 -0800 (Tue, 17 Jan 2017) | 1 line

UsersManual.rst: add missing newline
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292266 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix -fstrict-vtable-pointers link
Hans Wennborg [Tue, 17 Jan 2017 21:29:52 +0000 (21:29 +0000)]
Fix -fstrict-vtable-pointers link

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292264 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix docs build
Hans Wennborg [Tue, 17 Jan 2017 21:26:58 +0000 (21:26 +0000)]
Fix docs build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292262 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRegenerate AttributeReference.rst
Hans Wennborg [Tue, 17 Jan 2017 21:20:45 +0000 (21:20 +0000)]
Regenerate AttributeReference.rst

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292259 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd -fstrict-vtable-pointers to UsersManual
Piotr Padlewski [Mon, 16 Jan 2017 13:24:50 +0000 (13:24 +0000)]
Add -fstrict-vtable-pointers to UsersManual

In order to have link from ReleaseNotes working
this needs to have -fstrict-vtable-pointers
option.

There is also one small typo fix (overridden)
y

https://reviews.llvm.org/D28727

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292113 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMention Devirtualization and ThinLTO in ReleaseNotes
Piotr Padlewski [Sun, 15 Jan 2017 22:38:15 +0000 (22:38 +0000)]
Mention Devirtualization and ThinLTO in ReleaseNotes

This might require some small fixits after generating
doc

Devirtualization:
https://reviews.llvm.org/D28606

ThinLTO:
https://reviews.llvm.org/D28746

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292080 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291964:
Hans Wennborg [Fri, 13 Jan 2017 23:47:08 +0000 (23:47 +0000)]
Merging r291964:
------------------------------------------------------------------------
r291964 | rsmith | 2017-01-13 14:16:41 -0800 (Fri, 13 Jan 2017) | 2 lines

PR31631: fix bad CFG (and bogus warnings) when an if-statement has an init-statement and has binary operator as its condition.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291978 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291879:
Hans Wennborg [Fri, 13 Jan 2017 19:40:22 +0000 (19:40 +0000)]
Merging r291879:
------------------------------------------------------------------------
r291879 | echristo | 2017-01-12 17:52:04 -0800 (Thu, 12 Jan 2017) | 1 line

Add a necessary newline for diagnose_if documentation.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291952 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291881:
Hans Wennborg [Fri, 13 Jan 2017 19:37:35 +0000 (19:37 +0000)]
Merging r291881:
------------------------------------------------------------------------
r291881 | chandlerc | 2017-01-12 18:47:34 -0800 (Thu, 12 Jan 2017) | 3 lines

Another fix for r291850 because there are apparently targets which add
"-mllvm" flags to the CC1 invocation (notably, Hexagon seems to hit
this).
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291951 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291907:
Hans Wennborg [Fri, 13 Jan 2017 19:33:59 +0000 (19:33 +0000)]
Merging r291907:
------------------------------------------------------------------------
r291907 | jbcoe | 2017-01-13 08:06:59 -0800 (Fri, 13 Jan 2017) | 6 lines

Revert "Support for Python 3 in libclang python bindings"

This reverts commit 4464581bb63e9789e9ee231a8c8800be5f614743.

Memory access issues on Linux were reported by Mathieu Duponchelle and
discussed here: https://reviews.llvm.org/D26082.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291950 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291877:
Hans Wennborg [Fri, 13 Jan 2017 19:11:01 +0000 (19:11 +0000)]
Merging r291877:
------------------------------------------------------------------------
r291877 | smeenai | 2017-01-12 17:28:34 -0800 (Thu, 12 Jan 2017) | 13 lines

[Sema] Restrict explicit instantation definition dllexport

In the case where the template class itself is already `dllexport`, the
implicit instantiation will have already emitted all members. When we
check the explicit instantiation definition, the `Specialization` will
have inherited the `dllexport` attribute, so we'll attempt to emit all
members for a second time, which causes an assertion failure. Restrict
the exporting to when the `dllexport` attribute is newly introduced by
the explicit instantiation definition.

Fixes PR31608.

Differential Revision: https://reviews.llvm.org/D28590
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291943 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291871:
Hans Wennborg [Fri, 13 Jan 2017 16:52:17 +0000 (16:52 +0000)]
Merging r291871:
------------------------------------------------------------------------
r291871 | rsmith | 2017-01-12 16:57:54 -0800 (Thu, 12 Jan 2017) | 10 lines

Update C++ status pages for Clang 4 branch:

 * Update version number in DR tests from 4.0 to 4
 * Teach make_cxx_dr_status script about version numbers that don't contain a
   period.
 * Update cxx_status.html and cxx_dr_status.html to list Clang 4 features as
   "Clang 4" rather than "SVN"

Clang 4 features are still listed in yellow rather than green until release.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291913 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291865:
Hans Wennborg [Fri, 13 Jan 2017 16:47:33 +0000 (16:47 +0000)]
Merging r291865:
------------------------------------------------------------------------
r291865 | rsmith | 2017-01-12 16:43:31 -0800 (Thu, 12 Jan 2017) | 15 lines

Improve handling of instantiated thread_local variables in Itanium C++ ABI.

 * Do not initialize these variables when initializing the rest of the
   thread_locals in the TU; they have unordered initialization so they can be
   initialized by themselves.

   This fixes a rejects-valid bug: we would make the per-variable initializer
   function internal, but put it in a comdat keyed off the variable, resulting
   in link errors when the comdat is selected from a different TU (as the per
   TU TLS init function tries to call an init function that does not exist).

 * On Darwin, when we decide that we're not going to emit a thread wrapper
   function at all, demote its linkage to External. Fixes a verifier failure
   on explicit instantiation of a thread_local variable on Darwin.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291912 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r291850 and r291853:
Hans Wennborg [Thu, 12 Jan 2017 23:30:04 +0000 (23:30 +0000)]
Merging r291850 and r291853:
------------------------------------------------------------------------
r291850 | chandlerc | 2017-01-12 14:40:13 -0800 (Thu, 12 Jan 2017) | 9 lines

Address review comments on r290392:
- Don't break using '-mllvm -disable-llvm-optzns' (yet).
- Don't add support for '-mllvm -disable-llvm-passes'.

This is important for LLVM 4 as we haven't yet really told folks this is
coming. I'll add release notes about this.

I've also added some explicit testing of this so its more obvious what
is happening here.
------------------------------------------------------------------------

------------------------------------------------------------------------
r291853 | chandlerc | 2017-01-12 14:48:28 -0800 (Thu, 12 Jan 2017) | 1 line

Fix two test cases I missed updating in r291850. Sorry for the noise.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291860 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReleaseNotes: remove 'if you're reading on trunk' warning
Hans Wennborg [Thu, 12 Jan 2017 22:51:23 +0000 (22:51 +0000)]
ReleaseNotes: remove 'if you're reading on trunk' warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291855 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoGenerate docs/AttributeReference.rst
Hans Wennborg [Thu, 12 Jan 2017 22:26:52 +0000 (22:26 +0000)]
Generate docs/AttributeReference.rst

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291848 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoCreating release_40 branch off revision 291814
Hans Wennborg [Thu, 12 Jan 2017 21:25:25 +0000 (21:25 +0000)]
Creating release_40 branch off revision 291814

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_40@291817 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd entry for -MJ.
Joerg Sonnenberger [Thu, 12 Jan 2017 21:11:55 +0000 (21:11 +0000)]
Add entry for -MJ.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291814 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoclang-format: Fix regression introduced by r291801.
Daniel Jasper [Thu, 12 Jan 2017 20:06:28 +0000 (20:06 +0000)]
clang-format: Fix regression introduced by r291801.

Uncovered by polly tests.

Before:
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaa,
                                 {}, aaaaaaaaaaaaaaaaaaaaaaa);

After:
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaa, {},
                                 aaaaaaaaaaaaaaaaaaaaaaa);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291807 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd additional testcases for nsw markings on ++ and --.
Eli Friedman [Thu, 12 Jan 2017 19:51:44 +0000 (19:51 +0000)]
Add additional testcases for nsw markings on ++ and --.

clang has generated correct IR for char/short decrement since r126816,
but we didn't have any test coverage for decrement.

Patch by Andrew Rogers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291805 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoclang-format: Treat braced lists like other complex parameters.
Daniel Jasper [Thu, 12 Jan 2017 19:35:26 +0000 (19:35 +0000)]
clang-format: Treat braced lists like other complex parameters.

Specifically, wrap before them if they are multi-line so that we don't
create long hanging indents. This prevents having a lot of code
indented a lot in some cases.

Before:
  someFunction(Param, {List1, List2,
                       List3});

After:
  someFunction(Param,
               {List1, List2,
                List3});

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291801 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUsersManual.rst: Update clang-cl options list again
Hans Wennborg [Thu, 12 Jan 2017 19:26:54 +0000 (19:26 +0000)]
UsersManual.rst: Update clang-cl options list again

This time, make ignored options, such as /utf-8, show up as well if they
have help text.

Also, since we're now exposing -fdelayed-template-parsing, add help text
to the -fno version so that shows up as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291798 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Modules] Fix misleading warning about missing textual header in umbrella header
Bruno Cardoso Lopes [Thu, 12 Jan 2017 19:15:33 +0000 (19:15 +0000)]
[Modules] Fix misleading warning about missing textual header in umbrella header

When a textual header is present inside a umbrella dir but not in the
header, we get the misleading warning:

warning: umbrella header for module 'FooFramework' does not include
header 'Baz_Private.h'

The module map in question:

framework module FooFramework {
    umbrella header "FooUmbrella.h"

    export *
    module * { export * }

    module Private {
        textual header "Baz_Private.h"
    }
}

Fix this by taking textual headers into account.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291794 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUsersManual.rst: Update clang-cl options list
Hans Wennborg [Thu, 12 Jan 2017 18:15:06 +0000 (18:15 +0000)]
UsersManual.rst: Update clang-cl options list

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291783 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[analyzer] Don't dereference the array value when binding it to a reference.
Artem Dergachev [Thu, 12 Jan 2017 18:00:03 +0000 (18:00 +0000)]
[analyzer] Don't dereference the array value when binding it to a reference.

This replaces the hack in r291754, which was fixing pr31592, which was
caused by r291754, with a more appropriate solution.

rdar://problem/28832541
Differential revision: https://reviews.llvm.org/D28602

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291781 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Docs][OpenCL] Added OpenCL feature description to Clang documentation.
Anastasia Stulova [Thu, 12 Jan 2017 17:52:22 +0000 (17:52 +0000)]
[Docs][OpenCL] Added OpenCL feature description to Clang documentation.

Updated index and UsersManual with OpenCL description.

Review: https://reviews.llvm.org/D28080

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291780 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r291774 which caused buildbot failure.
Dehao Chen [Thu, 12 Jan 2017 16:56:18 +0000 (16:56 +0000)]
Revert r291774 which caused buildbot failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291775 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoPass -fprofile-sample-use to lto backends.
Dehao Chen [Thu, 12 Jan 2017 16:29:25 +0000 (16:29 +0000)]
Pass -fprofile-sample-use to lto backends.

Summary: LTO backend will not invoke SampleProfileLoader pass even if -fprofile-sample-use is specified. This patch passes the flag down so that pass manager can add the SampleProfileLoader pass correctly.

Reviewers: mehdi_amini, tejohnson

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D28588

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291774 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTracking exception specification source locations
Malcolm Parsons [Thu, 12 Jan 2017 16:11:28 +0000 (16:11 +0000)]
Tracking exception specification source locations

Summary:
We do not currently track the source locations for exception specifications such
that their source range can be queried through the AST. This leads to trying to
write more complex code to determine the source range for uses like FixItHints
(see D18575 for an example). In addition to use within tools like clang-tidy, I
think this information may become more important to track as exception
specifications become more integrated into the type system.

Patch by Don Hinton.

Reviewers: rsmith

Subscribers: malcolm.parsons, sbarzowski, alexfh, hintonda, cfe-commits

Differential Revision: https://reviews.llvm.org/D20428

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291771 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAvoid multiple -Wunreachable-code diagnostics that are triggered by
Alex Lorenz [Thu, 12 Jan 2017 10:48:03 +0000 (10:48 +0000)]
Avoid multiple -Wunreachable-code diagnostics that are triggered by
the same source range and use the unary operator fixit only when it
actually silences the warning.

rdar://24570531

Differential Revision: https://reviews.llvm.org/D28231

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291757 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[analyzer] Avoid a crash in DereferenceChecker on string literal initializers.
Artem Dergachev [Thu, 12 Jan 2017 09:46:16 +0000 (09:46 +0000)]
[analyzer] Avoid a crash in DereferenceChecker on string literal initializers.

A hotfix for pr31592 that fixes the crash but not the root cause of the problem.
We need to update the analyzer engine further to account for AST changes
introduced in r289618. At the moment we're erroneously performing a redundant
lvalue-to-rvalue cast in this scenario, and squashing the rvalue of the object
bound to the reference into the reference itself.

rdar://problem/28832541

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291754 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoPR31469: Don't add friend template class decls to redecl chain in dependent contexts.
Vassil Vassilev [Thu, 12 Jan 2017 09:16:26 +0000 (09:16 +0000)]
PR31469: Don't add friend template class decls to redecl chain in dependent contexts.

Fixes a crash in modules where the template class decl becomes the most recent
decl in the redeclaration chain and forcing the template instantiator try to
instantiate the friend declaration, rather than the template definition.

In practice, A::list<int> produces a TemplateSpecializationType
A::__1::list<int, allocator<type-parameter-0-0> >' failing to replace to
subsitute the default argument to allocator<int>.

Kudos Richard Smith (D28399).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291753 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove redundant passing around of a "ContainsAutoType" flag.
Richard Smith [Thu, 12 Jan 2017 02:27:38 +0000 (02:27 +0000)]
Remove redundant passing around of a "ContainsAutoType" flag.

This flag serves no purpose other than to prevent us walking through a type to
check whether it contains an 'auto' specifier; this duplication of information
is error-prone, does not appear to provide any performance benefit, and will
become less practical once we support C++1z deduced class template types and
eventually constrained types from the Concepts TS.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291737 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[index] Introduce symbol subkinds to mark an accessor getter or setter.
Argyrios Kyrtzidis [Wed, 11 Jan 2017 21:42:48 +0000 (21:42 +0000)]
[index] Introduce symbol subkinds to mark an accessor getter or setter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291707 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[index] Ignore invalid ObjC categories.
Argyrios Kyrtzidis [Wed, 11 Jan 2017 21:08:31 +0000 (21:08 +0000)]
[index] Ignore invalid ObjC categories.

We currently are unable to get a USR for those and it doesn't seem useful to try to index them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291705 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[index] Add 'IBTypeOf' relation for ObjC methods marked with IBAction and properties...
Argyrios Kyrtzidis [Wed, 11 Jan 2017 21:01:07 +0000 (21:01 +0000)]
[index] Add 'IBTypeOf' relation for ObjC methods marked with IBAction and properties with IBOutletCollection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291703 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PowerPC] Fix the wrong implementation of builtin vec_rlnm.
Tony Jiang [Wed, 11 Jan 2017 20:59:42 +0000 (20:59 +0000)]
[PowerPC] Fix the wrong implementation of builtin vec_rlnm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291702 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[index] Add 'contained-by' relation between references and their lexical container.
Argyrios Kyrtzidis [Wed, 11 Jan 2017 20:51:10 +0000 (20:51 +0000)]
[index] Add 'contained-by' relation between references and their lexical container.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291700 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoModule: Do not add any link flags when an implementation TU of a module imports
Manman Ren [Wed, 11 Jan 2017 18:47:38 +0000 (18:47 +0000)]
Module: Do not add any link flags when an implementation TU of a module imports
a header of that same module.

This fixes a regression caused by r280409.
rdar://problem/29930553

This is an updated version for r291628 (which was reverted in r291688).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291689 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoThis reverts r291628. As suggested by Richard, we can simply
Manman Ren [Wed, 11 Jan 2017 18:32:30 +0000 (18:32 +0000)]
This reverts r291628. As suggested by Richard, we can simply
filter out the implicilty imported modules at CodeGen instead of removing the
implicit ImportDecl when an implementation TU of a module imports a header of
that same module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291688 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoUnbreak the clang-fuzzer build after r291184.
Benjamin Kramer [Wed, 11 Jan 2017 16:42:26 +0000 (16:42 +0000)]
Unbreak the clang-fuzzer build after r291184.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291681 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove repeated word in comment (NFC)
Malcolm Parsons [Wed, 11 Jan 2017 11:23:22 +0000 (11:23 +0000)]
Remove repeated word in comment (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291667 91177308-0d34-0410-b5e6-96231b3b80d8