[Windows] Fix __declspec(property) when the getter returns a ref

This fixes an issue when parsing atlbase.h.

Patch by Will Wilson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184319 91177308-0d34-0410-b5e6-96231b3b80d8
Enhancements for the DynTypedNode

Added ASTNodeKind as a standalone way to represent node kinds and their hierarchy.
This change is to support ongoing work on D815.

Reviewers: klimek

CC: cfe-commits

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184331 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed long-standing issue with incorrect length calculation of multi-line comments.

Summary:
A trailing block comment having multiple lines would cause extremely
high penalties if the summary length of its lines is more than the column limit.
Fixed by always considering only the last line of a multi-line block comment.
Removed a long-standing FIXME from relevant tests and added a motivating test
modelled after problem cases from real code.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184340 91177308-0d34-0410-b5e6-96231b3b80d8
Extra test for diagnostic in Sema::BuildCXXNestedNameSpecifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184381 91177308-0d34-0410-b5e6-96231b3b80d8
Add a testcase which uses an UnresolvedUsingTypenameDecl as the base of an NNS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184386 91177308-0d34-0410-b5e6-96231b3b80d8
Add a workaround for a libstdc++-4.2 <tr1/hashtable> bug. This header uses

  return false;

in a function returning a pointer. 'false' was a null pointer constant in C++98
but is not in C++11. Punch a very small hole in the initialization rules in
C++11 mode to allow this specific case in system headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184395 91177308-0d34-0410-b5e6-96231b3b80d8
PR16377: Allow evaluation of statement expressions in constant evaluation,
why not. Apparently GCC supports this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184396 91177308-0d34-0410-b5e6-96231b3b80d8
Use the same set of whitespace characters for all operations in BreakableToken.

Summary:
Fixes a problem where \t,\v or \f could lead to a crash when placed as
a first character in a line comment. The cause is that rtrim and ltrim handle
these characters, but our code didn't, so some invariants could be broken.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184425 91177308-0d34-0410-b5e6-96231b3b80d8
Adds the equalsBoundNode matcher.

Most of the tests contributed by Edwin Vane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184427 91177308-0d34-0410-b5e6-96231b3b80d8
Enhancements for the DynTypedMatcher system.
- Added conversion routines and checks in Matcher<T> that take a DynTypedMatcher.
- Added type information on the error messages for the marshallers.
- Allows future work on Polymorphic/overloaded matchers. We should be
  able to disambiguate at runtime and choose the appropriate overload.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184429 91177308-0d34-0410-b5e6-96231b3b80d8
Extend -Wnon-pod-varargs to check calls made from function pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184470 91177308-0d34-0410-b5e6-96231b3b80d8
Debug Info: Attempt to resolve forward declarations if we are not emitting
limited debug info.

This is another small addendum to r184252.

rdar://problem/14101097

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184473 91177308-0d34-0410-b5e6-96231b3b80d8
Lazily provide a __float128 dummy type in -std=gnu++11 mode.

This is needed to parse libstdc++ 4.7's type_traits, see PR13530.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184476 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid repeatedly evaluating subexpressions when checking for unsequenced
operations in the case where evaluating a subexpression fails. No functionality
change, but test/Sema/many-logical-ops.c gets ~100x faster with this change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184489 91177308-0d34-0410-b5e6-96231b3b80d8
Update a comment to clarify that searching the target triple bin
directory for programs used by the driver is actually the standard
behavior we want to be compatible with GCC cross compilers -- it isn't
specific to SUSE or any other distro.

Also start fleshing out testing of the different cross compilation
patterns, both with a new very bare-bones tree of cross compilers and by
extending the multilib trees. Currently, we don't correctly model doing
a cross compile using the non-triple target of a bi-arch GCC install,
but I'll add support for that (and tests) next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184499 91177308-0d34-0410-b5e6-96231b3b80d8
Bug Fix: Template explicit instantiations should not have definitions (FixIts yet to be tested.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184503 91177308-0d34-0410-b5e6-96231b3b80d8
Alternative fix for r184473.

This just seems a bit tidier/more principled. Based on a patch provided
by Adrian - with the only minor tweak that it needed to use
"getTypeOrNull" rather than "getCompletedTypeOrNull" since we don't
store declarations in the CompletedTypes cache.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184509 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Handle zeroing CXXConstructExprs.

Certain expressions can cause a constructor invocation to zero-initialize
its object even if the constructor itself does no initialization. The
analyzer now handles that before evaluating the call to the constructor,
using the same "default binding" mechanism that calloc() uses, rather
than simply ignoring the zero-initialization flag.

As a bonus, trivial default constructors are now no longer inlined; they
are instead processed explicitly by ExprEngine. This has a (positive)
effect on the generated path edges: they no longer stop at a default
constructor call unless there's a user-provided implementation.

<rdar://problem/14212563>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184511 91177308-0d34-0410-b5e6-96231b3b80d8
Fix all the silly things I committed in r184509

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184512 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: handle the DI asm printing change to reword '[fwd]' as '[decl]' and add '[def]' for non-decl tag types

This is to make test cases looking for definitions more legible by
making the definition explicit rather than just the absence of '[fwd]'.
This allowed the debug-info-record tests to be rephrased - and in the
interests of reducing the number of individual test cases/invocations we
have, I merged them into one file, separated them with namespaces (&
then moved them to C++ because namespaces are great). If they need to
remain 'C' only tests, they can be moved back. (I didn't group them with
'debug-info-class.cpp' because these tests only apply to
-fno-limit-debug-info)

I removed the pieces of code that would cause these tests to pass under
-flimit-debug-info to ensure the tests remain relevant to their fixes
should we ever improve -flimit-debug-info to catch that kind of code.

This commit is version locked with the corresponding change to
DebugInfo.h in LLVM. Except some transient buildbot fallout.

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