Removed a string literal for an attribute name, which means the attribute name will be quoted in the diagnostic. Manually added some quotes to a diagnostic for consistency. Updated the test cases as appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198054 91177308-0d34-0410-b5e6-96231b3b80d8
Teach the diagnostics engine about the Attr type to make reporting on semantic attributes easier (and not require hard-coded strings). This requires a getSpelling() function on the Attr class, which is table-driven. Updates a handful of cases where a hard-coded string was being used to test the functionality out. Updating associated test cases for the improved quoting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198055 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-abi] Fixes improperly sized vfptrs with pragma pack

With pragma pack, the layout engine would produce vfptrs that were 
packed width rather than pointer width.  This patch addresses the issue 
and adds a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198059 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-abi] unix-line endings in lit test, no functional change



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198060 91177308-0d34-0410-b5e6-96231b3b80d8
Warn on mismatched parentheses in memcmp and friends.

Thisadds a new warning that warns on code like this:

  if (memcmp(a, b, sizeof(a) != 0))

The warning looks like:

test4.cc:5:30: warning: size argument in 'memcmp' call is a comparison [-Wmemsize-comparison]
  if (memcmp(a, b, sizeof(a) != 0))
                   ~~~~~~~~~~^~~~
test4.cc:5:7: note: did you mean to compare the result of 'memcmp' instead?
  if (memcmp(a, b, sizeof(a) != 0))
      ^                          ~
                            )
test4.cc:5:20: note: explicitly cast the argument to size_t to silence this warning
  if (memcmp(a, b, sizeof(a) != 0))
                   ^
                   (size_t)(     )
1 warning generated.

This found 2 bugs in chromium and has 0 false positives on both chromium and
llvm.

The idea of triggering this warning on a binop in the size argument is due to
rnk.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198063 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Break default arguments less eagerly.

Before:
  void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(int aaaaaaaaaaaaaaaaaaaaaaaaaaaa =
                                              1);

After:
  void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      int aaaaaaaaaaaaaaaaaaaaaaaaaaaa = 1);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198070 91177308-0d34-0410-b5e6-96231b3b80d8
Bury leaked pointers in a global array to silence a leak detector in --disable-free mode

Summary:
This is an alternative to http://llvm-reviews.chandlerc.com/D2475
suggested by Chandler.

Reviewers: chandlerc, rnk, dblaikie

CC: cfe-commits, earthdok

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198073 91177308-0d34-0410-b5e6-96231b3b80d8
Removed a string literal for a diagnostic, and updated the diagnostic to not manually quote. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198076 91177308-0d34-0410-b5e6-96231b3b80d8
In an effort to reduce the likelihood of text getting out of sync, reusing the text from some diagnostics explicitly. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198078 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-cxxabi] Emit fewer trivial return adjusting thunks

Most importantly, this makes our vtable layout match MSVC's.  Previously
we would emit a return adjusting thunk whenever the return types
differed, even if the adjustment would have been trivial.

MSVC does emit some trivial return adjusting thunks, but only if there
was already an overridden method that required a return adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198080 91177308-0d34-0410-b5e6-96231b3b80d8
Fix incorrect copy-pasted method decl that MSVC allowed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198081 91177308-0d34-0410-b5e6-96231b3b80d8
Implement MSVC header search algorithm in MicrosoftMode.
Follows algorithm described here: http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198082 91177308-0d34-0410-b5e6-96231b3b80d8
Silence compile warning by removing unused SourceMgr member

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198083 91177308-0d34-0410-b5e6-96231b3b80d8
Reduce indentation of some VFTableBuilder code.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198085 91177308-0d34-0410-b5e6-96231b3b80d8
Move MS header search test inputs to Inputs/

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198086 91177308-0d34-0410-b5e6-96231b3b80d8
Set NO_DEAD_STRIP for clang after llvm r198087.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198088 91177308-0d34-0410-b5e6-96231b3b80d8
Silence a dubious GCC warning about a set but unused global. Indeed, the
purpose of this global is to be set and not used. =]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198094 91177308-0d34-0410-b5e6-96231b3b80d8
Propagate "-arch x86_64h" setting to the linker. <rdar://problem/15711488>

This is a follow-up to r194907, which added a new -arch setting to make it
easier to specify AVX2 targets. The "-arch x86_64h" option needs to be passed
on to the linker, but it was getting canonicalized to x86_64 by the code
in getArchTypeForDarwinArchName.

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