UBSan: Don't diagnose inf/nan conversions between floating-point types. It's far from clear whether these have undefined behavior, and these checks are helping no-one. Keep the double->float overflow warnings, though, since those are useful in practice, even though it's unclear whether such operations have defined behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178194 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify test to use a count for the number of notes expected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178196 91177308-0d34-0410-b5e6-96231b3b80d8
Don't reject __restrict applied to a dependent type; it might instantiate to a pointer or reference type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178198 91177308-0d34-0410-b5e6-96231b3b80d8
[Parser] Don't code-complete twice.

When we are consuming the current token just to enter a new token stream, we push
the current token in the back of the stream so that we get it again.

Unfortunately this had the effect where if the current token is a code-completion one,
we would code-complete once during consuming it and another time after the stream ended.

Fix this by making sure that, in this case, ConsumeAnyToken() will consume a code-completion
token without invoking code-completion.

rdar://12842503

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178199 91177308-0d34-0410-b5e6-96231b3b80d8
Fold together the two implementations of 6.7.3p2 in SemaType. Fix two bugs, each of which was only present in one version:
 * Give the right diagnostic for 'restrict' applied to a non-pointer, non-reference type.
 * Don't reject 'restrict' applied indirectly to an Objective-C object pointer type (eg, through template instantiation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178200 91177308-0d34-0410-b5e6-96231b3b80d8
Support C11 _Atomic type qualifier. This is more-or-less just syntactic sugar for the _Atomic type specifier.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178211 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Update debug info test for schema change made to LLVM."

This reverts commit 5035c483b7fcbf0fa2a7afba24fa35a10995d195.

This schema change wasn't necessary after all. I'm going ith a different
solution that will hopefully use space more conservatively.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178213 91177308-0d34-0410-b5e6-96231b3b80d8
Teach -Wigored-qualifiers about exotic flavors of declarator and the _Atomic type qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178217 91177308-0d34-0410-b5e6-96231b3b80d8
For -Wignored-qualifiers, don't warn on qualifiers which we acquire via a
typedef. Also don't warn on the _Atomic type specifier, just on the _Atomic
type qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178218 91177308-0d34-0410-b5e6-96231b3b80d8
Define __SIZE_MAX__ preprocessor macro.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178226 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for gcc-compatible -mmfcrf -mno-mfcrf PPC options

gcc provides -mmfcrf and -mno-mfcrf for controlling what we call
the mfocrf target feature. Also, PPC is now making use of the
static function AddTargetFeature used by the Mips Driver code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178227 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Handle pseudo-target flags '-EL' and '-EB' and properly adjust
toolchain flags for MIPS targets.

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

The generator for LibASTMatchersReference.html didn't get run last time
ASTMatchers changes were made. Here are up-to-date docs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178234 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for gcc-compatible -mpopcntd -mno-popcntd PPC options

gcc provides -mpopcntd and -mno-popcntd for controlling the popcntd target
feature; support these options as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178235 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] For now assume all standard global 'operator new' functions allocate memory in heap.
+ Improved test coverage for cplusplus.NewDelete checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178244 91177308-0d34-0410-b5e6-96231b3b80d8
These are all simple pointer wrappers. Pass them by value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178247 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] These implements unix.MismatchedDeallocatorChecker checker.
+ Improved display names for allocators and deallocators

The checker checks if a deallocation function matches allocation one. ('free' for 'malloc', 'delete' for 'new' etc.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178250 91177308-0d34-0410-b5e6-96231b3b80d8
Fix order of initialization warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178255 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed handling of comments before preprocessor directives.

Comments before preprocessor directives used to be stored with InPPDirective
flag set, which prevented correct comment splitting in this case. Fixed by
flushing comments before switching on InPPDirective. Added a new test and fixed
one of the existing tests.



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