Use the sys::ExecuteAndWait that takes StringRefs.

Also don't depend on Program.h including PathV1.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183935 91177308-0d34-0410-b5e6-96231b3b80d8
Followup to r183931 to fix the lambda conversion-to-block-pointer member.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183942 91177308-0d34-0410-b5e6-96231b3b80d8
Use the sys::RemoveFileOnSignal that takes a StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183944 91177308-0d34-0410-b5e6-96231b3b80d8
Don't depend on the transitive inclusion of PathV1.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183945 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the linkage of static locals inside a CapturedStmt.  (Found in the
process of trying to fix the related issue for block literals.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183951 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid fallthrough in header, to allow external users of Clang libraries to
build with Clang's -Wimplicit-fallthrough warning enabled. The fallthrough
was not making this code better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183952 91177308-0d34-0410-b5e6-96231b3b80d8
Remove implicit fallthrough from AArch64 to Mips in lib selection

Nothing useful to AArch64 will (should!) be found in any Mips-specific
directories.

Patch by Luke Zarko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183956 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] Fix wrong clang-format example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183963 91177308-0d34-0410-b5e6-96231b3b80d8
Emit initializers for static-storage-duration temporaries as constants where
possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183967 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the warning for divide by zero to be a bit more robust. ;]

Previously, it only ever fired for zeros which formed null pointers.
Now, hilariously, in C++98 this was almost anything. Including tricks
like warning on the divisor in this code:

typedef char c3[3];
size_t f(c3* ptr) {
  return (sizeof(ptr) / sizeof(*ptr)) / (size_t)(!(sizeof(ptr) % sizeof(*ptr)));
}

Why the RHS of the outer divide is a null pointer constant is a sordid
tale of sorrow. Anyways, the committee fixed this for C++11 and onward
as part of core isssue 903, and Richard recently implemented this fix
causing the warning to go away here (and elsewhere).

This patch restores the warning here and adds it for numerous other
somewhat obvious gaffes:

int g(int x) {
  return x / (int)(0.0);
}

The patch is essentially just using the full power of our constant
folding in Clang to produce the warning, but insisting that it must fold
to an *integer* which is zero so that we don't get false positives
anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183970 91177308-0d34-0410-b5e6-96231b3b80d8
Don't remove backslashes from block comments.

Summary:
Don't remove backslashes from block comments. Previously this
/* \    \ \ \ \ \
*/
would be turned to this:
/*
*/
which spoils some kinds of ASCII-art, people use in their comments. The behavior
was related to handling escaped newlines in block comments inside preprocessor
directives. This patch makes handling it in a more civilized way.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D979

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