Improve error recovery around colon.

Recognize additional cases, when '::' is mistyped as ':'.
This is a fix to RP18587 - colons have too much protection in member-declarations
Review is tracked by http://reviews.llvm.org/D3653.

This is an attempt to recommit the fix, initially committed as r212957 but then
reverted in r212965 as it broke self-build. In the updated patch ParseDirectDeclarator
turns on colon protection in for context as well.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213120 91177308-0d34-0410-b5e6-96231b3b80d8
AST: Cleanup RecordLayoutBuilder

No functionality changed, just some cleanups:
- Switch some loops to range-based for.
- Name some iterators with a more creative name than "I".
- Reduce dependence on auto. Does RD->bases() give you a list of
  CXXBaseSpecifiers or CXXRecordDecls? It's more clear to just say which
  upfront.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213121 91177308-0d34-0410-b5e6-96231b3b80d8
AST: Convert a SmallPtrSet to a SmallPtrSetImpl in RecordLayoutBuilder

No functionality changed, it just makes the code a little less brittle.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213122 91177308-0d34-0410-b5e6-96231b3b80d8
MS ABI: Up the required alignment after inserting padding between vbases

We would correctly insert sufficiently aligned padding between vbases
when our leading base was empty, however we would neglect to increase
the required alignment of the most derived class.

This fixes PR20315.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213123 91177308-0d34-0410-b5e6-96231b3b80d8
Don't add -Bsymbolic by default on Android.

-Bsymbolic is not a platform requirement and should not
be added unconditionally.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213126 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Add support for -mfpxx and -mno-fpxx.

Differential Revision: http://reviews.llvm.org/D4464


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213132 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Correct the invocation of GAS in several cases.

Summary:
As a result of this patch, assembling an empty file with GCC and Clang (using
GAS as the assembler) now produces identical objects.

-mfp32/-mfpxx/-mfp64 now form a trinity of options. -mfpxx is the default
when the triple vendor is 'img' or 'mti', the ABI is O32, and the CPU is
between mips2 and mips32r2/mips64r2 (inclusive).

-mno-shared is always given to the assembler to match the effect of
-mabicalls (currently unimplemented but Clang acts as if it is given).
Similarly, -call_nonpic is always given to match the effect of -mplt (also
unimplemented and acts as if given) except when the ABI is 64 in which case
-mplt has no effect so -KPIC is given instead.

-mhard-float/-msoft-float are now passed on.

-modd-spreg/-mno-odd-spreg are now passed on.

-mno-mips16 is correctly passed on. The assembler option is -no-mips16 not
-mno-mips16

Differential Revision: http://reviews.llvm.org/D4515



git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213138 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Sema/warn-documentation-almost-trailing.c: Rewrite checks with @LINE.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213139 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test: Introduce the feature "staticanalyzer" for --enable-clang-static-analyzer.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213140 91177308-0d34-0410-b5e6-96231b3b80d8
[Driver][Mips] Reduce code duplication. Remove static isMipsNan2008() function.
Use the tools::mips::isNaN2008() routine instead.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213141 91177308-0d34-0410-b5e6-96231b3b80d8
[Driver][Mips] Remove flags which is not used in multi-library selection.

No functional changes.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213142 91177308-0d34-0410-b5e6-96231b3b80d8
[Driver][Mips] Reduce code duplication - use existing function
getMipsCPUAndABI() to get MIPS ABI name during multi-library selection.

No functional changes.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213143 91177308-0d34-0410-b5e6-96231b3b80d8
Trailing linefeed.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213145 91177308-0d34-0410-b5e6-96231b3b80d8
Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213146 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213148 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Driver/crash-report.c: This requires rewriter for -frewrite-includes. [PR20321]

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213150 91177308-0d34-0410-b5e6-96231b3b80d8
[ASTMatchers] Add a usingDirectiveDecl matcher.

This matches 'using namespace' declarations.

Differential Revision: http://reviews.llvm.org/D4517

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213152 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "clang/test/Driver/crash-report.c: This requires rewriter for -frewrite-includes. [PR20321]"

We've decided to make the core rewriter class and PP rewriters mandatory.
They're only a few hundred lines of code in total and not worth supporting as a
distinct build configuration, especially since doing so disables key compiler
features.

This reverts commit r213150.

Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter."

This reverts commit r213148.

Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/"

This reverts commit r213146.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213159 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: make sure we still parse -fms-version= after r213119

The CoreOption flag got lost in the changes.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@213164 91177308-0d34-0410-b5e6-96231b3b80d8
Expand the wildcard expansion test to also cover '?'

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