Don't divide L and #x in macro definitions. Fixes http://llvm.org/PR17144

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190408 91177308-0d34-0410-b5e6-96231b3b80d8
Allow _clang-format as alternative to .clang-format config filename

Dotfiles are impractical on Windows. This makes clang-format search
for the style configuration file as '_clang-format' in addition to
the usual '.clang-format'. This is similar to how VIM searches for
'_vimrc' on Windows.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190413 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC migrator: rename inferred isXXX property,
with a suitable 'getter' attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190420 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-cxxabi] Implement guard variables for static initialization

Static locals requiring initialization are not thread safe on Windows.
Unfortunately, it's possible to create static locals that are actually
externally visible with inline functions and templates.  As a result, we
have to implement an initialization guard scheme that is compatible with
TUs built by MSVC, which makes thread safety prohibitively difficult.

MSVC's scheme is that every function that requires a guard gets an i32
bitfield.  Each static local is assigned a bit that indicates if it has
been initialized, up to 32 bits, at which point a new bitfield is
created.  MSVC rejects inline functions with more than 32 static locals,
and the externally visible mangling (?_B) only allows for one guard
variable per function.

On Eli's recommendation, I used MangleNumberingContext to track which
bit each static corresponds to.

Implements PR16888.

Reviewers: rjmccall, eli.friedman

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190427 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: Support building DLLs (PR17083)

This adds driver support for building DLLs (the /LD and /LDd flags).
It basically does two things: runtime selection and passing -dll and
-implib to the linker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190428 91177308-0d34-0410-b5e6-96231b3b80d8
Remove Windows line-endings in two clang-cl test files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190432 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-cxxabi] Mangle dynamic initializer stubs the same way MSVC does

Summary: Dynamic initializers are mangled as ??__E <name> YAXXZ.

Reviewers: timurrrr

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190434 91177308-0d34-0410-b5e6-96231b3b80d8
Fix cl-link.c test failure on Mac platforms

The test filename (%s) is easily confused with an option when
it starts with /Users...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190435 91177308-0d34-0410-b5e6-96231b3b80d8
Fix regression from r190382.

Make sure we perform the correct "referenced-but-not-used" check for
static member constants.

Fixes bug reported on cfe-commits by Alexey Samsonov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190437 91177308-0d34-0410-b5e6-96231b3b80d8
PR5683: Issue a warning when subtracting pointers to types of zero size, and
treat such subtractions as being non-constant. Patch by Serge Pavlov! With a
few tweaks by me.


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