Emit forward decls for structs with declarations only when we are
limiting debug info.

FIXME: There is still work left to do here, the testcase should work even with -flimit-debug-info.

rdar://problem/14101097

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184252 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Do not report uninitialized value warnings inside swap functions.

This silences warnings that could occur when one is swapping partially initialized structs. We suppress
not only the assignments of uninitialized members, but any values inside swap because swap could
potentially be used as a subroutine to swap class members.

This silences a warning from std::try::function::swap() on partially initialized objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184256 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Do not create a CompoundVal for lvalue InitListExprs.

These should be treated like scalars. This fixes a crash reported in radar://14164698.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184257 91177308-0d34-0410-b5e6-96231b3b80d8
Add some comments to r184252.

rdar://problem/14101097

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184259 91177308-0d34-0410-b5e6-96231b3b80d8
Add test coverage for serialization of dependent function template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184275 91177308-0d34-0410-b5e6-96231b3b80d8
Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4

These options will add a module flag with name "Dwarf Version".
The behavior flag is currently set to Warning, so when two values disagree,
a warning will be emitted.


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184277 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r184249, "doc. parsing: Allow parameter name "..." for variadic functions/methods."

It crashes in the case;

/// Without any "param"s in the description.
int printf(const char *format, ...);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184283 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a warning. [-Wunused-variable]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184284 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a crash in the static analyzer (bug #16307)

Summary:
When processing a call to a function, which got passed less arguments than it
expects, the analyzer would crash.

I've also added a test for that and a analyzer warning which detects these
cases.

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184288 91177308-0d34-0410-b5e6-96231b3b80d8
Use llvm::sys::fs::can_execute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184297 91177308-0d34-0410-b5e6-96231b3b80d8
Silence 'set but not used' warning when building in release mode using gcc.

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

We now reject things like

struct ABC {
  static double a;
};
register double ABC::a = 1.0;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184300 91177308-0d34-0410-b5e6-96231b3b80d8
Adds support for openSUSE ARM v5/v7 triples.

Patch by İsmail Dönmez

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184302 91177308-0d34-0410-b5e6-96231b3b80d8
Split long strings on word boundaries.

Summary: Split strings at word boundaries, when there are no spaces and slashes.

Reviewers: klimek

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184304 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r184302 on Renato's behalf - it broke the bots and he's asked me to revert as he's unavailable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184307 91177308-0d34-0410-b5e6-96231b3b80d8
[Driver] Don't forward source file input args to gcc

gcc's inputs are already added by the InputInfoList passed to
Action::ConstructJob.

Fixes a regression from r183989.  This was manifesting when targetting
mingw as an extra input argument to gcc when assembling.  It presumably
affects other situations where clang calls gcc.

Prior to r183989, forwardToGCC() was returning false because the INPUT
option defined in OptParser.td had the DriverOption flag set on it.
LLVM's Option library does not set this flag for INPUT.

Reviewers: espindola

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184308 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-cxxabi] Emit and install appropriately mangled vbtables

In Itanium, dynamic classes have one vtable with several different
address points for dynamic base classes that can't share vtables.

In the MS C++ ABI, each vbtable that can't be shared gets its own
symbol, similar to how ctor vtables work in Itanium.  However, instead
of mangling the subobject offset into the symbol, the unique portions of
the inheritance path are mangled into the symbol to make it unique.

This patch implements the MSVC 2012 scheme for forming unique vbtable
symbol names.  MSVC 2010 use the same mangling with a different subset
of the path.  Implementing that mangling and possibly others is TODO.

Each vbtable is an array of i32 offsets from the vbptr that points to it
to another virtual base subobject.  The first entry of a vbtable always
points to the base of the current subobject, implying that it is the
same no matter which parent class contains it.

Reviewers: rjmccall

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184309 91177308-0d34-0410-b5e6-96231b3b80d8
Don't depend on PathV1.h including set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184310 91177308-0d34-0410-b5e6-96231b3b80d8
Completely revamp node binding for AST matchers.

This is in preparation for the backwards references to bound
nodes, which will expose a lot more about how matches occur.  Main
changes:
- instead of building the tree of bound nodes, we build a "set" of bound
  nodes and explode all possible match combinations while running
  through the matchers; this will allow us to also implement matchers
  that filter down the current set of matches, like "equalsBoundNode"
- take the set of bound nodes at the start of the match into
  consideration when doing memoization; as part of that, reevaluated
  that memoization gives us benefits that are large enough (it still
  does - the effect on common match patterns is up to an order of
  magnitude)
- reset the bound nodes when a node does not match, thus never leaking
  information from partial sub-matcher matches for failing matchers

Effects:
- we can now correctly "explode" combinatorial matches, for example:
  allOf(forEachDescendant(...bind("a")),
  forEachDescendant(...bind("b"))) will now trigger matches for all
  combinations of matching "a" and "b"s.
- we now never expose bound nodes from partial matches in matchers that
  did not match in the end - this fixes a long-standing issue

FIXMEs:
- rename BoundNodesTreeBuilder to BoundNodesBuilder or
  BoundNodesSetBuilder, as we don't build a tree any more; this is out
  of scope for this change, though
- we're seeing some performance regressions (around 10%), but I expect
  some performance tuning will get that back, and it's easily worth
  the increase in expressiveness for now

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