[analyzer] Teach CastSizeChecker about flexible array members.

...as well as fake flexible array members: structs that end in arrays with
length 0 or 1.

Patch by Daniel Fahlgren!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201583 91177308-0d34-0410-b5e6-96231b3b80d8
Remove trailing spaces (no other change). Bikeshed #2



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201584 91177308-0d34-0410-b5e6-96231b3b80d8
DeLesley Hutchins (who wrote the original thread-safety attribute functionality) and I have agreed to start migrating from lock-specific terminology to "capability"-specific terminology. This opens the door for future threading-related analysis passes so that a common nomenclature can be used.

The following attributes have been (silently) deprecated, with their replacements listed:

lockable => capability
exclusive_locks_required => requires_capability
shared_locks_required => requires_shared_capability
locks_excluded => requires_capability

There are no functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201585 91177308-0d34-0410-b5e6-96231b3b80d8
In some cases (for example, the Firefox build system), the CLANG_CXX variable is defined but empty.
Extend the test (like it is done in scan-build) to check also if the variable 
is empty or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201586 91177308-0d34-0410-b5e6-96231b3b80d8
Missed updating this test case with r201585 -- the lockable attribute is now internally represented by CapabilityAttr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201587 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: Parse the /d2Zi+ flag (PR18728)

This is an undocumented, but reportedly widely used flag.
We don't support it, but should be able to parse it.

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