Revert r153723, and its follow-ups r153728 and r153733.

These patches cause us to miscompile and/or reject code with static
function-local variables in an extern-C context. Previously, we were
papering over this as long as the variables are within the same
translation unit, and had not seen any failures in the wild. We still
need a proper fix, which involves mangling static locals inside of an
extern-C block (as GCC already does), but this patch causes pretty
widespread regressions. Firefox, and many other applications no longer
build.

Lots of test cases have been posted to the list in response to this
commit, so there should be no problem reproducing the issues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153768 91177308-0d34-0410-b5e6-96231b3b80d8
PR10217: Provide diagnostics explaining why an implicitly-deleted special
member function is deleted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153773 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Introduce clang_Cursor_getSpellingNameRange().

It retrieves a source range for a piece that forms the cursors spelling name.
Most of the times there is only one range for the complete spelling but for
objc methods and objc message expressions, there are multiple pieces for each
selector identifier.

Part of rdar://11113120

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153775 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure we unique static-local decls across multiple emissions of
the function body, but do so in a way that doesn't make any assumptions
about the static local actually having a proper, unique mangling,
since apparently we don't do that correctly at all.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153776 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a pair of invalidation bugs when emitting protocol definitions
in the fragile and non-fragile Mac ObjC runtimes.  No useful test
case.  Fixes rdar://problem/11072576.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153778 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Introduce clang_Cursor_getObjCSelectorIndex() function.

After getting a cursor with clang_getCursor for a particular source location,
allows querying the cursor in order to find out if the location points to a
selector identifier in an objc method or message expression, and which selector index it is.

rdar://11158946

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153781 91177308-0d34-0410-b5e6-96231b3b80d8
modern objective-c translator: writing container
literals. wip. // rdar://10803676


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153784 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Fix use-after-free bug when handling attributes indexing info.

When indexing a property with a getter/setter with attributes, the allocated memory
for AttrListInfo could get released before its destructor is run.

Fixes rdar://11113442.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153792 91177308-0d34-0410-b5e6-96231b3b80d8
[arcmt] When fixing the "unassigned init call" ARC error, make sure
to do a nil check for the result of the call.

rdar://10950973

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153793 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused but set variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153800 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed MacroInfo definition range for function like macros with empty body.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153819 91177308-0d34-0410-b5e6-96231b3b80d8
Analyzer: Store BugReports directly in a ilist instead of adding another layer of inderection with std::list

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153847 91177308-0d34-0410-b5e6-96231b3b80d8
Properly handle explicit constructors in list-initialization. Fixes PR12120.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153849 91177308-0d34-0410-b5e6-96231b3b80d8
Ignore unused --serialize-diagnostics option when using llvm-gcc.

llvm-gcc doesn't handle --serialize-diagnostics so when compiling i386
kernel/kext code with -Werror, you get an error about that option being
unused.  Claim the argument to prevent this from breaking builds.
<rdar://problem/11161933>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153854 91177308-0d34-0410-b5e6-96231b3b80d8
Basic semantic analysis support for inheriting constructor declarations in
dependent contexts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153858 91177308-0d34-0410-b5e6-96231b3b80d8
Fix build by passing in the needed variable after r153860.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153861 91177308-0d34-0410-b5e6-96231b3b80d8
Use -rewrite-legacy-objc as clang argument for translating 
objective-c's fragile abi, Use -rewrite-objc for translating 
objective-c's modern abi.  // rdar://11143173


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153877 91177308-0d34-0410-b5e6-96231b3b80d8
Implement DR1402: if a field or base class is not movable, the derived class's
move constructor/move assignment operator are not declared, rather than being
defined as deleted, so move operations on the derived class fall back to
copying rather than moving.

If a move operation on the derived class is explicitly defaulted, the
unmovable subobject will be copied instead of being moved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153883 91177308-0d34-0410-b5e6-96231b3b80d8
PR12438: Profile a reference to a type template parameter by depth and index,
not by canonical decl. This only matters for sizeof...(Pack) expressions; in
all other cases, we'd profile it as a type instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153884 91177308-0d34-0410-b5e6-96231b3b80d8
Silence -Wunused-variable in -Asserts build

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