Fix PR13394: Erasing from a vector changes the end of the vector, so make sure we always have the right end.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160855 91177308-0d34-0410-b5e6-96231b3b80d8
Fix an assertion failure when code completing an auto variable's initialiser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160857 91177308-0d34-0410-b5e6-96231b3b80d8
test/Preprocessor: add NVPTX predefine tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160866 91177308-0d34-0410-b5e6-96231b3b80d8
[scan-build] Fix clang++ pathname

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160871 91177308-0d34-0410-b5e6-96231b3b80d8
Preprocessor: add __BYTE_ORDER__ predefined macro

The __BYTE_ORDER__ predefined macro was added in GCC 4.6:
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html

It's used like the following:

 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 ...
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 ...
 #else
 #error insane architecture like the pdp-11
 #endif

There's a similar macro, __FLOAT_WORD_ORDER__, but it looks like it
mainly exist to accommodate fairly obscure architectures and ARM's
old FPA instructions, so it doesn't seem nearly as useful.

The tests are updated to check for the correct(at least, based on
clang's current output) value of the macro on each target. So now the
suite will catch bugs like the one fixed in r157626.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160879 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Address Jordan's and Fariborz's review of r160768.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160883 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Another false positive in Class method inlining.
We are currently not setting the self object to the calling class object
during inlining nor do we reason about [AAA class].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160884 91177308-0d34-0410-b5e6-96231b3b80d8
Consolidate ObjC lookupPrivateMethod methods from Sema and DeclObjC.

Also, fix a subtle bug, which occurred due to lookupPrivateMethod
defined in DeclObjC.h not looking up the method inside parent's
categories.

Note, the code assumes that Class's parent object has the same methods
as what's in the Root class of a the hierarchy, which is a heuristic
that might not hold for hierarchies which do not descend from NSObject.
Would be great to fix this in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160885 91177308-0d34-0410-b5e6-96231b3b80d8
Make -Wformat walk the typedef chain when looking for size_t, etc.

Clang's -Wformat fix-its currently suggest using "%zu" for values of
type size_t (in C99 or C++11 mode). However, for a type such as
std::vector<T>::size_type, it does not notice that type is actually
typedeffed to size_t, and instead suggests a format for the underlying
type, such as "%lu" or "%u".

This commit makes the format string fix mechanism walk the typedef chain
so that it notices if the type is size_t, even if that isn't "at the
top".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160886 91177308-0d34-0410-b5e6-96231b3b80d8
Add a function to convert a single Unicode code point to a UTF8 sequence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160890 91177308-0d34-0410-b5e6-96231b3b80d8
Implement resolving of HTML character references (named: &amp;, decimal: &#42;,
hex: &#x1a;) during comment parsing.

Now internal representation of plain text in comment AST does not contain
character references, but the characters themselves.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160891 91177308-0d34-0410-b5e6-96231b3b80d8
revert r160839 for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160895 91177308-0d34-0410-b5e6-96231b3b80d8
Comment Sema: don't try to typo-correct a \param when function has zero
arguments.  Just an optimization, no functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160896 91177308-0d34-0410-b5e6-96231b3b80d8
objective-c arc: When function calls with known CFCreate naming convention
are cast to retainable types, only suggest CFBridgingRelease/
CFBridgingRetain and not the __bridge casts.
// rdar://11923822


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160900 91177308-0d34-0410-b5e6-96231b3b80d8
CommentSema.cpp: remove extra semicolon


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160901 91177308-0d34-0410-b5e6-96231b3b80d8
objc-arc: change per Jordy's comments.
// rdar://11923822


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160902 91177308-0d34-0410-b5e6-96231b3b80d8
more objc-arc: With ACC_bottom, we just provide
__bride fixit, as it doesn't matter which cast to
use. // rdar://11923822


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160906 91177308-0d34-0410-b5e6-96231b3b80d8
Comment dumper: print \param parameter index if parameter name is resolved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160908 91177308-0d34-0410-b5e6-96231b3b80d8
Add a missing testcase for merging the visibility of two declarations used
as arguments of a template.

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