Reapply r207477 and r207479 without cyclic dependency

Fixed by moving ProcessWarningOptions from Frontend into Basic. All of
the dependencies for ProcessWarningOptions were already in Basic, so
this was a small change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207549 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Don't assert when combining using .* on a temporary.

While we don't model pointer-to-member operators yet (neither .* nor ->*),
CallAndMessageChecker still checks to make sure the 'this' object is not
null or undefined first. However, it also expects that the object should
always have a valid MemRegion, something that's generally important elsewhere
in the analyzer as well. Ensure this is true ahead of time, just like we do
for member access.

PR19531

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207561 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Improve test from r207486.

The constructor that comes right before a variable declaration in the CFG might
not be the initialization of that variable. Previously, we just checked that
the variable's initializer expression was different from the construction
expression, but forgot to see whether the variable had an initializer expression
at all.

Thanks for the prompting, David.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207562 91177308-0d34-0410-b5e6-96231b3b80d8
Android uses -fpic for aarch64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207567 91177308-0d34-0410-b5e6-96231b3b80d8
[PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a driver only thing and doesn't affect any language/preprocessor/etc. semantics.

rdar://16714526

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207570 91177308-0d34-0410-b5e6-96231b3b80d8
scanf analysis: handle scanlists that start with ^] (PR19559)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207573 91177308-0d34-0410-b5e6-96231b3b80d8
Add test case for revision 207575 to verify that on Windows, clang doesn't
crash with an assertion failure when 'nul' is passed in input.

Modified clang/test/lit.py to add feature 'system-windows' if
`platform.system()` returns 'Windows'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207576 91177308-0d34-0410-b5e6-96231b3b80d8
Drop non-cfi assembly support from clang.

After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and
always print assembly that uses cfi directives.

In llvm, MC itself supports cfi since the end of 2010 (support started
in r119972, is reported in the 2.9 release notes).

In binutils the support has been around for much longer. It looks like
support started to be added in May 2003. It is available in 2.15
(31-Aug-2011, 2.14 is from 12-Jun-2003).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207602 91177308-0d34-0410-b5e6-96231b3b80d8
Defer loading any pending update records until we've finished deserializing.
This fixes a bug where an update record causes us to load an entity that refers
to an entity we've not finished loading yet, resulting in badness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207603 91177308-0d34-0410-b5e6-96231b3b80d8
Let stddef.h respect __need_{wchar_t, size_t, NULL, ptrdiff_t, wint_t}.

glibc expects that stddef.h only defines a single thing if either of these
defines is set.  For example, before this change, a C file containing

  #include <stdlib.h>
  int ptrdiff_t = 0;

would compile with gcc but not with clang. Now it compiles with clang too.

This also fixes PR12997, where older versions of the Linux headers would define
NULL incorrectly, and glibc would define __need_NULL and expect stddef.h to
redefine NULL with the correct definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207606 91177308-0d34-0410-b5e6-96231b3b80d8
Add a triple to new test.

NULL is just 0 on Windows, so the Wsentinel part of the test doesn't pass there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207607 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify test. No functional change intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207623 91177308-0d34-0410-b5e6-96231b3b80d8
[ARM64] Add arm64_be where it was accidentally missed from a bunch of if-conditions.

I think this is the last commit for ARM64 big endian in clang. This commit makes
arm_neon.h compile correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207624 91177308-0d34-0410-b5e6-96231b3b80d8
[ARM64] Port remaining relevant AArch64 clang tests over to ARM64

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207632 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test for big-endian NEON on ARM64.

The enabled test #includes <arm_neon.h>, which is sufficient to test all
the code in r207624.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207641 91177308-0d34-0410-b5e6-96231b3b80d8
Android uses -fpic for arm64 as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207642 91177308-0d34-0410-b5e6-96231b3b80d8
-Wunused-parameter: Don't fire on defaulted or deleted functions

Patch by Dinesh Dwivedi!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207672 91177308-0d34-0410-b5e6-96231b3b80d8
__thread: Move constant init check to CheckCompleteVariableDeclaration

We were emitting dynamic initializers for __thread variables if there
was no explicit initializer, as in this test case:

struct S { S(); };
__thread S s;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207675 91177308-0d34-0410-b5e6-96231b3b80d8
Fix crash if typo correction corrects a member using-declaration to a
non-member declaration. Patch by Dinesh Dwivedi!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207677 91177308-0d34-0410-b5e6-96231b3b80d8
When typo-correcting a member using-declaration, only consider members of base classes.


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