Fixes a couple of bugs with the Allman brace breaking.

In particular, left braces after an enum declaration now occur on their
own line.  Further, when short ifs/whiles are allowed these no longer
cause the left brace to be on the same line as the if/while when a
brace is included.

Patch by Thomas Gibson-Robinson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187901 91177308-0d34-0410-b5e6-96231b3b80d8
[PCH] Fix a PCH serialization crash, with invalid code related to forward enum references.

The problem was that an enum without closing semicolon could be associated as a forward enum
in an erroneous declaration, leading to the identifier being associated with the enum decl but
without a declaration actually referencing it.
This resulted in not having it serialized before serializing the identifier that is associated with.

Also prevent the ASTUnit from querying the serialized DeclID for an invalid top-level decl; it may not
have been serialized.

rdar://14539667

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187914 91177308-0d34-0410-b5e6-96231b3b80d8
PR9992: Serialize and deserialize the token sequence for a function template in
-fdelayed-template-parsing mode. Patch by Will Wilson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187916 91177308-0d34-0410-b5e6-96231b3b80d8
Fix doxygen function name mismatch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187922 91177308-0d34-0410-b5e6-96231b3b80d8
DataFlowSanitizer; Clang changes.

DataFlowSanitizer is a generalised dynamic data flow analysis.

Unlike other Sanitizer tools, this tool is not designed to detect a
specific class of bugs on its own.  Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187925 91177308-0d34-0410-b5e6-96231b3b80d8
Support for double width characters.

Summary: Only works for UTF-8-encoded files.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187935 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: Support the run-time selection options (/MD, /MT et al.)

These flags set some preprocessor macros and injects a dependency
on the runtime library into the object file, which later is picked up
by the linker.

This also adds a new CC1 flag for adding a dependent library.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187945 91177308-0d34-0410-b5e6-96231b3b80d8
UBSan: Fix alignment checks emitted in downcasts.

Summary:
UBSan was checking for alignment of the derived class on the pointer to
the base class, before converting. With some class hierarchies, this could
generate false positives.

Added test-case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187948 91177308-0d34-0410-b5e6-96231b3b80d8
UBSan: Fix naming for IR variables in catch-undef-behavior.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187951 91177308-0d34-0410-b5e6-96231b3b80d8
catch-undefined-behavior.cpp: Remove names that don't appear in every build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187952 91177308-0d34-0410-b5e6-96231b3b80d8
Emit an error for enum increments and decrements in C++ mode.
Fixes PR16394.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187955 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r187935 "Support for double width characters."

It broke a public build bot.

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