Cast to remove the narrowing conversion error in c++11.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173978 91177308-0d34-0410-b5e6-96231b3b80d8
TableGen backends: use emitSourceFileHeader() to emit the warning about
file contents being autogenerated


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173979 91177308-0d34-0410-b5e6-96231b3b80d8
Changed to static_cast, due to post-commit review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173980 91177308-0d34-0410-b5e6-96231b3b80d8
Diagnostics: Clarify name of line-length-limiting constant in r173976.

Thanks, Sean.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173981 91177308-0d34-0410-b5e6-96231b3b80d8
Reinstate r173952, this time limiting it to exactly the form

  #define X X

for which there is no point warning, ever.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173991 91177308-0d34-0410-b5e6-96231b3b80d8
Fix unused variable warnings in -asserts build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173996 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure that the Attribute object represents one attribute only.

Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174004 91177308-0d34-0410-b5e6-96231b3b80d8
When comparing two templates in the template differ, consider them the
same if they are actually the same; having the same name isn't
enough. Fixes <rdar://problem/12931988>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174013 91177308-0d34-0410-b5e6-96231b3b80d8
Sometimes ld is just ld.

Don't expect a character between the double-quotes and 'ld'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174015 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix a bug in region store that lead to undefined value false
positives.

The includeSuffix was only set on the first iteration through the
function, resulting in invalid regions being produced by getLazyBinding
(ex: zoomRegion.y).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174016 91177308-0d34-0410-b5e6-96231b3b80d8
Fix ODR-use of a MemberExpr to check before marking a pure function used. Remove
a workaround for this bug from the -Wundefined-internals warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174020 91177308-0d34-0410-b5e6-96231b3b80d8
Add indents to AST dumping and removed parenthesis from AST nodes.
Indents were given the color blue when outputting with color.
AST dumping now looks like this:

Node
|-Node
| `-Node
`-Node
  `-Node

Compared to the previous:

(Node
  (Node
    (Node))
  (Node
    (Node)))



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174022 91177308-0d34-0410-b5e6-96231b3b80d8
Fix -Wcovered-switch-default and -Wunused-private-field warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174025 91177308-0d34-0410-b5e6-96231b3b80d8
When comparing two template template arguments in the template differ, consider
them the same if they are actually the same; having the same name isn't enough.

Similar to r174013, template template arguments were also mistakenly considered
the same when they had the same name but were in different namespaces.
In addition, when printing template template arguments, use the qualified name
if the regular name is the same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174029 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] If a lazy binding is undefined, pretend that it's unknown instead.

This is a hack to work around the fact that we don't track extents for our
default bindings:

  CGPoint p;
  p.x = 0.0;
  p.y = 0.0;
  rectParam.origin = p;
  use(rectParam.size); // warning: uninitialized value in rectParam.size.width

In this case, the default binding for 'p' gets copied into 'rectParam',
because the 'origin' field is at offset 0 within CGRect. From then on,
rectParam's old default binding (in this case a symbol) is lost.

This patch silences the warning by pretending that lazy bindings are never
made from uninitialized memory, but not only is that not true, the original
default binding is still getting overwritten (see FIXME test cases).
The long-term solution is tracked in <rdar://problem/12701038>

PR14765 and <rdar://problem/12875012>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174031 91177308-0d34-0410-b5e6-96231b3b80d8
Clarify the diagnostic for -Wnested-anon-types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174032 91177308-0d34-0410-b5e6-96231b3b80d8
Fix grammar in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174033 91177308-0d34-0410-b5e6-96231b3b80d8
Remove elements from Sema.UndefinedInternals as functions are defined. Also
filter the elements before emitting them into a PCH. No user-visible
functionality change, except that PCH files may be smaller?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174034 91177308-0d34-0410-b5e6-96231b3b80d8
Replace "failed template argument deduction" diagnostic with something useful
in the one case where we've already factored out a reason code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174036 91177308-0d34-0410-b5e6-96231b3b80d8
Allow the computation of the base priority for a declaration code completion result to consider the completion context

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