ARM backend knows about cortex-m4. The front end should too.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153698 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add a malloc cpp test file.

Includes a test from a reported false positive fixed in some earlier
commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153702 91177308-0d34-0410-b5e6-96231b3b80d8
Extend -Wc++11-narrowing to cover converted constant expressions as well as braced-initializers.  <rdar://problem/11121178>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153703 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Have c-index-test output more information about a cursor with -cursor-at:

-the location of the cursor
-its extent
-its spelling

Part of radar://11113120

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153707 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] A MemberRefExpr cursor for a property dot syntax should have as
its location the location of the property.

Part of rdar://11113120

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153708 91177308-0d34-0410-b5e6-96231b3b80d8
Add info to ObjCPropertyRefExpr to indicate whether the dot syntax property
reference is going to message the setter, the getter, or both.

Having this info on the ObjCPropertyRefExpr node makes it easier for AST
clients (like libclang) to reason about the meaning of the property reference.

[AST/Sema]
-Use 2 bits (with a PointerIntPair) in ObjCPropertyRefExpr to record the above info
-Have ObjCPropertyOpBuilder set the info appropriately.

[libclang]
-When there is an implicit property reference (property syntax using methods)
have clang_getCursorReferenced return a cursor for the method. If the property
reference is going to result in messaging both the getter and the setter choose
to return a cursor for the setter because it is less obvious from source inspection
that the setter is getting called.

The general idea has the seal of approval by John.

rdar://11151621

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153709 91177308-0d34-0410-b5e6-96231b3b80d8
The UTF16 string referenced by a CFString should go into the __TEXT,__ustring
section. A 'normal' string will go into the __TEXT,__const section, but this
isn't good for UTF16 strings. The __ustring section allows for coalescing, among
other niceties (such as allowing the linker to easily split up strings).

Instead of outputting the UTF16 string as a series of bytes, output it as a
series of shorts. The back-end will then nicely place the UTF16 string into the
correct section, because it's a mensch.
<rdar://problem/10655949>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153710 91177308-0d34-0410-b5e6-96231b3b80d8
Change location information for synthesized properties to be at the
property file/line rather than the @synthesize file/line. Avoids
some nasty confusing-ness with conflating the file from the scope
and the line from the original declaration.

Update a couple of testcases accordingly since I had to change
that we actually use the passed in location in EmitFunctionStart.

Fixes rdar://11026482

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153714 91177308-0d34-0410-b5e6-96231b3b80d8
Testcase for the previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153715 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure we perform the relevant implied conversions correctly for ObjC methods with related result types. PR12384.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153716 91177308-0d34-0410-b5e6-96231b3b80d8
ConstStructBuilder: fix offset math for base classes so it works correctly in general.  Found by inspection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153720 91177308-0d34-0410-b5e6-96231b3b80d8
Missing piece of r153720: make sure the vtable pointer is handled correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153721 91177308-0d34-0410-b5e6-96231b3b80d8
Add a note about a missing optimization in the case of virtual
inheritance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153722 91177308-0d34-0410-b5e6-96231b3b80d8
When emitting a static local variable in C++, handle
the case that the variable already exists.  Partly this is just
protection against people making crazy declarations with custom
asm labels or extern "C" names that intentionally collide with
the manglings of such variables, but the main reason is that we
can actually emit a static local variable twice with the
requirement that it match up.  There may be other cases with
(e.g.) the various nested functions, but the main exemplar is
with constructor variants, where we can be forced into
double-emitting the function body under certain circumstances
like (currently) the presence of virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153723 91177308-0d34-0410-b5e6-96231b3b80d8
Fix shuffle vector calculation for mm_permute_ps. Fixes PR 12401.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153724 91177308-0d34-0410-b5e6-96231b3b80d8
Forbid the block and lambda copy-capture of __autoreleasing variables
in ARC, under the usual reasoning limiting the use of __autoreleasing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153725 91177308-0d34-0410-b5e6-96231b3b80d8
Add _mm_minpos_epu16 to smmintrin.h. Fixes PR12399.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153726 91177308-0d34-0410-b5e6-96231b3b80d8
Revert previous commit changing location information to see if this
is causing the gdb test failures on the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153727 91177308-0d34-0410-b5e6-96231b3b80d8
ItaniumCXXABI.cpp: Don't use nullptr. Clang source tree should be pre-c++11-compatible.

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