Parser/Registry argument enhancements.

Summary:
 Parser/Registry argument enhancements.
  - 2 argument support.
  - unsigned values support.

Reviewers: klimek

CC: cfe-commits, revane

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183231 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C encoding. Fixes up encodeing for
arrays of empty structs. // rdar://14053082
(also pr13062).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183234 91177308-0d34-0410-b5e6-96231b3b80d8
Added Lexer::getBufferEnd().

Summary:
There's Lexer::getBufferStart(), and we need getBufferEnd() to access
the whole input buffer in clang::format::reformat. We don't want to
rely on the fact that the Lexer::BufferEnd always points to '\0', as there can
be embedded '\0's as well.

Reviewers: jordan_rose

Reviewed By: jordan_rose

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183236 91177308-0d34-0410-b5e6-96231b3b80d8
Analysis: Add a CFG successor to a SwitchStmt if it is both empty and fully covered

Consider the case where a SwitchStmt satisfied isAllEnumCasesCovered()
as well as having no cases at all (i.e. the enum it covers has no
enumerators).

In this case, we should add a successor to repair the CFG.

This fixes PR16212.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183237 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] When annotating tokens, don't override a property annotation with a getter/setter method annotation.

rdar://13764549

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183242 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-cxxabi] Factor out some loops into helpers for readability

No functionality change, covered by the existing virtual base adjustment
tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183251 91177308-0d34-0410-b5e6-96231b3b80d8
Model temporary lifetime-extension explicitly in the AST. Use this model to
handle temporaries which have been lifetime-extended to static storage duration
within constant expressions. This correctly handles nested lifetime extension
(through reference members of aggregates in aggregate initializers) but
non-constant-expression emission hasn't yet been updated to do the same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183283 91177308-0d34-0410-b5e6-96231b3b80d8
Heed ABIArgInfo::getInReg() for return values.

The 'inreg' attribute can also be applied to function return values in
LLVM IR. The SPARC v9 backend is using the flag when returning structs
containing 32-bit floats.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183290 91177308-0d34-0410-b5e6-96231b3b80d8
Fix CoerceIntOrPtrToIntOrPtr on big-endian targets.

Type coercion for argument passing is equivalent to storing the source
type and loading the destination type from the same pointer. On
big-endian targets, this means that the high bits of integers are
preserved.

This patch fixes the CoerceIntOrPtrToIntOrPtr() function on big-endian
targets by inserting the required shift instructions to preserve the
high bits instead of the low bits.

This is used by SparcABIInfo when passing small structs in the high bits
of registers.

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

This could actually be implemented with the LLVM IR va_arg instruction,
but it doesn't seem to offer any advantages over accessing the va_list
pointer directly.

Using the va_list pointer directly makes it possible to perform type
coercion directly from the argument array, and the va_list updates are
exposed to the optimizers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183292 91177308-0d34-0410-b5e6-96231b3b80d8
Default to PIE and using stack protection on OpenBSD.

Patch by Matthew Dempsky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183295 91177308-0d34-0410-b5e6-96231b3b80d8
PR16214: Debug Info: -flimit-debug-info doesn't omit definitions for types used via typedefs

In an effort to make -flimit-debug-info more consistent I over-shot the
mark & made types used via typedefs never produce definitions in the
debug info (even if the type was used in a way that would require a
definition).

The fix for this is to do exactly what I was hoping to do at some point
- plumb the declaration/definition choice through the various layers of
"CreateType" in CGDebugInfo. In this way we can produce declarations
whenever they are sufficient & definitions otherwise - including when
qualifiers are used, for example (discovered in PR14467). This may not
be complete (there may be other types/situations where we need to
propagate the "declaration/definition" choice) but it lays the basic
foundation which we can enhance in future iterations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183296 91177308-0d34-0410-b5e6-96231b3b80d8
Get rid of VTableContext::ComputeMethodVTableIndices() and VTableContext::getNumVirtualFunctionPointers(); also add some tests for the VTable indices output to make sure we don't regress

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183298 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the DUMP_OVERRIDERS macro in the VTableBuilder.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183299 91177308-0d34-0410-b5e6-96231b3b80d8
Fix fallout from r183298, unused function (CollectPrimaryBases) causing the -Werror build to fail

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183300 91177308-0d34-0410-b5e6-96231b3b80d8
ASTTests/DeclTest.cpp: Tweak on msvc target to add "-fno-ms-extensions".

MS extensions don't prefer imaginary suffix even with -std=c++11.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183301 91177308-0d34-0410-b5e6-96231b3b80d8
Make clang tools ignore -fcolor-diagnostics and -fdiagnostics-color retrieved from the compilation database.

Summary:
Clang tools' diagnostic output could be force colored when a command
line from the compilation database contains -fcolor-diagnostics or
-fdiagnostics-color. This is not what we want e.g. for vim integration.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits, revane, jordan_rose

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183304 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r183298 and r183300 as the former broke the virtual function lookup in libcxx __locale

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183305 91177308-0d34-0410-b5e6-96231b3b80d8
Unrevert the tests from r183298 as they pass with both old and new code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183306 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test for the breakage from r183298

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