Add test for -Wused-but-marked-unused on private fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159130 91177308-0d34-0410-b5e6-96231b3b80d8
Make explicit specializations at class scope work
for non-type template parameters in microsoft mode.
PR12709.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159147 91177308-0d34-0410-b5e6-96231b3b80d8
Appease -Wnon-virtual-dtor and fix a typo in a comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159151 91177308-0d34-0410-b5e6-96231b3b80d8
Thread safety analysis:  implement lock_returned attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159152 91177308-0d34-0410-b5e6-96231b3b80d8
Unrevert r158887, reverted in r158949, along with a fix for the bug which
resulted in it being reverted. A test for that bug was added in r158950.

Original comment:

If an object (such as a std::string) with an appropriate c_str() member function
is passed to a variadic function in a position where a format string indicates
that c_str()'s return type is desired, provide a note suggesting that the user
may have intended to call the c_str() member.

Factor the non-POD-vararg checking out of DefaultVariadicArgumentPromotion and
move it to SemaChecking in order to facilitate this. Factor the call checking
out of function call checking and block call checking, and extend it to cover
constructor calls too.

Patch by Sam Panzer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159159 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Be careful about implicitly-declared operator new/delete. (PR13090)

The implicit global allocation functions do not have valid source locations,
but we still want to treat them as being "system header" functions for the
purposes of how they affect program state.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159160 91177308-0d34-0410-b5e6-96231b3b80d8
Use std::map instead of llvm::DenseMap because we rely on the stability of references to values in these maps. PR13197.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159161 91177308-0d34-0410-b5e6-96231b3b80d8
Extend the "expected ';' after struct" logic to also apply to enums, and to
struct and enum forward-declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159164 91177308-0d34-0410-b5e6-96231b3b80d8
PR12937: Explicitly deleting an explicit template specialization.

This works around a quirk in the way that explicit template specializations are
handled in Clang. We generate an implicit declaration from the original
template which the explicit specialization is considered to redeclare. This
trips up the explicit delete logic.

This change only works around that strange representation. At some point it'd
be nice to remove those extra declarations to make the AST more accurately
reflect the C++ semantics.

Review by Doug Gregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159167 91177308-0d34-0410-b5e6-96231b3b80d8
ARM: enable struct byval for APCS.

Revert r136662 which disables ARM byval.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159168 91177308-0d34-0410-b5e6-96231b3b80d8
Add tests that I wrote for r159060 but forgot to `svn add`.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159170 91177308-0d34-0410-b5e6-96231b3b80d8
Give L__FUNCTION__ the right type in templates. PR13206.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159171 91177308-0d34-0410-b5e6-96231b3b80d8
build/compiler-rt: Companion commit to r159172.

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