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
[analyzer] Stop tracking symbols based on a retain count summary of
inlined function.

This resolves retain count checker false positives that are caused by
inlining ObjC and other methods. Essentially, if we are passing an
object to a method with "delegate" in the selector or a function pointer
as another argument, we should stop tracking the other parameters/return
value as far as the retain count checker is concerned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162876 91177308-0d34-0410-b5e6-96231b3b80d8
Add -fioc-{signed,shifts,strict-shifts} to check for undefined int behavior.

Requires corresponding compiler-rt change, IOC checks emit calls to
runtime functions to print diagnostic information about the checked behavior.
[ioc] Add option to abort on error, instead of resuming execution.

Note that we presently don't allow the runtime function to define
the value of the computation, but by default do allow the execution
to continue.

This change adds a flag that lets users specify that they want
the program to abort should a check fail.  This might simply
be preferred functionality, but hopefully also helps performance.

Includes lit test.
[ioc] Add -fioc-unsigned for catching and reporting unsigned int overflows.
[ioc] Add -fioc-{implicit,explicit}-conversion flags and tests.

These flags enable checking for implicit/explicit lossy casts.