Objective-C ARC. Blocks that strongly capture themselves
to call themselves will get the warning:
"Capturing <itself> strongly in this block is likely to
lead to a retain cycle". Cut down on the amount of noise
by noticing that user at some point sets the captured variable
to null in order to release it (and break the cycle). 
// rdar://16944538


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

1. Having "get started", "get involved", and "hacking" makes it hard to find
   how to send patches, so add a link from "get involved" to "hacking".
2. Remove an almost 5 year old note on the test running meachanism changing
   soon.
3. Let "hacking" link to the LLVM developer policy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210826 91177308-0d34-0410-b5e6-96231b3b80d8
Prefix another use of error_code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210832 91177308-0d34-0410-b5e6-96231b3b80d8
s/pr2007/20007/ in a test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210834 91177308-0d34-0410-b5e6-96231b3b80d8
The Clang C API does not require C++. Thanks to Jordan Rose for pointing out this error!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210841 91177308-0d34-0410-b5e6-96231b3b80d8
Check the access of operator delete from the destructor context

Previously we would do the access check from the context of
MarkVTableUsed.

Also update this test to C++11, since that is typically used with the MS
C++ ABI.

Fixes PR20005.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210850 91177308-0d34-0410-b5e6-96231b3b80d8
Remove stale part of comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210851 91177308-0d34-0410-b5e6-96231b3b80d8
Recover from missing 'typename' in sizeof(T::InnerType)

Summary:
'sizeof' is a UnaryExprOrTypeTrait, and it can contain either a type or
an expression.  This change threads a RecoveryTSI parameter through the
layers between TransformUnaryExprOrTypeTrait the point at which we look
up the type.  If lookup finds a single type result after instantiation,
we now build TypeSourceInfo for it just like a normal transformation
would.

This fixes the last error in the hello world ATL app that I've been
working with, and it now links and runs with clang.  Please try it and
file bugs!

Reviewers: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210855 91177308-0d34-0410-b5e6-96231b3b80d8
Extend AST dump to include 'used' and 'referenced' flags, and put 'invalid' flag in the right place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210872 91177308-0d34-0410-b5e6-96231b3b80d8
Use dwarf-2 by default on OpenBSD and FreeBSD.

The Tools.cpp part of the patch partially based on a patch from
FreeBSD's LLVM tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210883 91177308-0d34-0410-b5e6-96231b3b80d8
Missed a space at the end of the line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210884 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Fix inheritance model calculation in CRTP

CRTP-like patterns involve a class which inherits from another class
using itself as a template parameter.

However, the base class itself may try to create a pointer-to-member
which involves the derived class.  This is problematic because we
may not have finished parsing the most derived classes' base specifiers
yet.

It turns out that MSVC simply uses the unspecified inheritance model
instead of doing anything fancy.

This fixes PR19987.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210886 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [JS] Understand named function literals.

Before:
  return {a: function SomeFunction(){// ...
                                     return 1;
  }
  }
  ;

After:
  return {
    a: function SomeFunction() {
      // ...
      return 1;
    }
  };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210887 91177308-0d34-0410-b5e6-96231b3b80d8
Do not store duplicate parents when memoization data is available.

Summary:
Do not store duplicate parents when memoization data is available.
This does not solve the duplication problem, but ameliorates it.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210902 91177308-0d34-0410-b5e6-96231b3b80d8
Tests: use CHECK-LABEL to help debugging failures

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210906 91177308-0d34-0410-b5e6-96231b3b80d8
IR-change: cmpxchg operations now return { iN, i1 }.

This is a minimal fix for clang. I'll soon add support for generating
weak variants when requested, but that's not really necessary for the
LLVM change in isolation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210907 91177308-0d34-0410-b5e6-96231b3b80d8
First commit. Modified FIXME comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210918 91177308-0d34-0410-b5e6-96231b3b80d8
Update for llvm api change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210921 91177308-0d34-0410-b5e6-96231b3b80d8
Remove top-level Clang -fsanitize= flags for optional ASan features.

Init-order and use-after-return modes can currently be enabled
by runtime flags. use-after-scope mode is not really working at the
moment.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210924 91177308-0d34-0410-b5e6-96231b3b80d8
Adds a Pragma spelling for attributes to tablegen and makes use of it for loop
hint attributes. Includes tests for pragma printing and for attribute order
which is incorrectly reversed by ParsedAttributes.

Reviewed by Aaron Ballman


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