Revert r170806, "Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member."

It broke stage2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170835 91177308-0d34-0410-b5e6-96231b3b80d8
Reinstate r170806, reverted in r170835, with a fix use i1 instead of i8 for a value-initialized bool!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170837 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor checkUnsafeAssigns() to avoid code duplication with while loop.

This is just a minor bit of refactoring, but it is nice cleanup for
the subsequent patch that adds warning support for assigning literals
to weak variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170863 91177308-0d34-0410-b5e6-96231b3b80d8
Extend checkUnsafeAssigns() to also handle assigning an object literal to a weak reference.

Thanks to Jordan Rose and John McCall for their sage code review.

Fixes <rdar://problem/12569201>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170864 91177308-0d34-0410-b5e6-96231b3b80d8
Fix regression in r170489: when instantiating a direct initializer which is a
CXXScalarValueInitExpr (or an ImplicitValueInitExpr), strip it back down to an
empty pair of parentheses so that the initialization code can tell that we're
performing value-initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170867 91177308-0d34-0410-b5e6-96231b3b80d8
Remove the working that ThreadSanitizer is *experimental*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170868 91177308-0d34-0410-b5e6-96231b3b80d8
Formatting fixes for PR14680

Also, some (automated) formatting fixes and slight cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170873 91177308-0d34-0410-b5e6-96231b3b80d8
Use OperatorPrecedence.h in clang-format

No indented functional changes other than handling more operators
correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170875 91177308-0d34-0410-b5e6-96231b3b80d8
User manual chapter on MemorySanitizer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170879 91177308-0d34-0410-b5e6-96231b3b80d8
Slight rewording of -fsanitize=memory docs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170880 91177308-0d34-0410-b5e6-96231b3b80d8
Temporary fix of tests to make buildbots happy.

Permanent solution coming up after checking back with Fariborz/Douglas.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170890 91177308-0d34-0410-b5e6-96231b3b80d8
Basic support for formatting for-loops.

We used to not really format them. Now we do:

  for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(),
                                        SE = BB->succ_end();
       SI != SE; ++SI) {

This is just one example and I am sure we still mess some of them up, but it
is a step forward.

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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170904 91177308-0d34-0410-b5e6-96231b3b80d8
Sort the includes according to the coding standard.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170905 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Re-apply r170826 and make the dumping of the GallGraph
deterministic.

Commit message for r170826:

[analyzer] Traverse the Call Graph in topological order.

Modify the call graph by removing the parentless nodes. Instead all
nodes are children of root to ensure they are all reachable. Remove the
tracking of nodes that are "top level" or global. This information is
not used and can be obtained from the Decls stored inside
CallGraphNodes.

Instead of existing ordering hacks, analyze the functions in topological
order over the Call Graph.

Together with the addition of devirtualizable ObjC message sends and
blocks to the call graph, this gives around 6% performance improvement
on several large ObjC benchmarks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170906 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix typos.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170907 91177308-0d34-0410-b5e6-96231b3b80d8
Add ARM cortex-r5 subtarget as available mcpu

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170909 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: No spaces around directory specifiers

This fixes PR14683. We used to format like this:
  #include <a / b>

And this patch changes this to:
  #include <a/b>

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