Use double instead of single quote to expand .

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162830 91177308-0d34-0410-b5e6-96231b3b80d8
Clarify the point at which ARC destroys ivars vis-à-vis
[super dealloc].  rdar://problem/11141872

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162833 91177308-0d34-0410-b5e6-96231b3b80d8
The address of a TLS var is not compile-time constant (PR13720)

This makes Clang produce an error for code such as:

  __thread int x;
  int *p = &x;

The lvalue of a thread-local variable cannot be evaluated at compile
time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162835 91177308-0d34-0410-b5e6-96231b3b80d8
Move the test for PR13720 from Sema/init.c to Sema/thread-specifier.c.

Can't use __thread in init.c because it doesn't have a triple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162836 91177308-0d34-0410-b5e6-96231b3b80d8
Fix r162835 as per Richard's comments.

VisitVarDecl should return Error(E), and we should test that the address
of a TLS var can't be used as a constexpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162837 91177308-0d34-0410-b5e6-96231b3b80d8
Reversing the logic since C99 mode is actually not an extension.  Also, changing the group to the singular to match the diagnostic better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162838 91177308-0d34-0410-b5e6-96231b3b80d8
Define _MIPS_ARCH and _MIPS_ARCH_<cpu name> macros for MIPS targets.
The patch suggested by Logan Chien.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162840 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed a problem with #pragma push_macro/pop_macro implementation.

Summary:
The problem was with the following sequence:
  #pragma push_macro("long")
  #undef long
  #pragma pop_macro("long")
in case when "long" didn't represent a macro.
Fixed crash and removed code duplication for #undef/pop_macro case. Added regression tests.

Reviewers: doug.gregor, klimek

Reviewed By: doug.gregor

CC: cfe-commits, chapuni

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162845 91177308-0d34-0410-b5e6-96231b3b80d8
objective-C: make -Widiomatic-parentheses work
when assignment expression in conditional invloves
property reference. // rdar://11066598


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162846 91177308-0d34-0410-b5e6-96231b3b80d8
Move TLS check from LValueExprEvaluator::VisitVarDecl to
CheckLValueConstantExpression.

Richard pointed out that using the address of a TLS variable is ok in a
core C++11 constant expression, as long as it isn't part of the eventual
result of constant expression evaluation. Having the check in
CheckLValueConstantExpression accomplishes this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162850 91177308-0d34-0410-b5e6-96231b3b80d8
Factor out MIPS macro definitions common for all MIPS targets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162852 91177308-0d34-0410-b5e6-96231b3b80d8
Use getTargetDefines() virtual function in MipsTargetInfoBase successors
to define all macros for MIPS targets. Remove redundant virtual function
getArchDefines(). Two virtual functions for this task are really too much.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162853 91177308-0d34-0410-b5e6-96231b3b80d8
Define __mips64 / __mips64__ macros for MIPS 64-bit targets.
The patch suggested by Brad Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162858 91177308-0d34-0410-b5e6-96231b3b80d8
Make alignment computation for pointer values for builtins handle
non-pointer types with a pointer representation correctly. PR13660.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162862 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Improved diagnostic pruning for calls initializing values.

This heuristic addresses the case when a pointer (or ref) is passed
to a function, which initializes the variable (or sets it to something
other than '0'). On the branch where the inlined function does not
set the value, we report use of undefined value (or NULL pointer
dereference). The access happens in the caller and the path
through the callee would get pruned away with regular path pruning. To
solve this issue, we previously disabled diagnostic pruning completely
on undefined and null pointer dereference checks, which entailed very
verbose diagnostics in most cases. Furthermore, not all of the
undef value checks had the diagnostic pruning disabled.

This patch implements the following heuristic: if we pass a pointer (or
ref) to the region (on which the error is reported) into a function and
it's value is either undef or 'NULL' (and is a pointer), do not prune
the function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162863 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer]Fix typo, unbreak static analyzer BuildBot (at least
partially).

(Addresses a regression from r162790.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162864 91177308-0d34-0410-b5e6-96231b3b80d8
Fix run-line for test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162865 91177308-0d34-0410-b5e6-96231b3b80d8
Fix PR reference in test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162866 91177308-0d34-0410-b5e6-96231b3b80d8
Fix serious regression introduced in r157780 where __attribute__((NSObject))
could not be attached to a CFTypeRef.

Fixes <rdar://problem/12197822>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162872 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fixup 162863.

Thanks Jordan.

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