Rearrange narrowing checks in initialization to be a different form of step
rather than a post-processing action, so we can support inserting these checks
at stages other than the end of the initialization. No functionality change
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191146 91177308-0d34-0410-b5e6-96231b3b80d8
Some comment updates and tweaks for clarity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191147 91177308-0d34-0410-b5e6-96231b3b80d8
PR17295: Do not allow explicit conversion functions to be used in cases where
an additional conversion (other than a qualification conversion) would be
required after the explicit conversion.

Conversely, do allow explicit conversion functions to be used when initializing
a temporary for a reference binding in direct-list-initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191150 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC: ObjC declarations, including forward class
and protocols can be at global scope only.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191155 91177308-0d34-0410-b5e6-96231b3b80d8
Parse: Don't crash during parsing if we lack a simple-type-specifier

Summary:
Parsing cast expressions during error recovery can put us in a bad
state.  Check to see if the token for a simple-type-specifier makes
sense before further parsing.

Fixes PR17255.

Reviewers: rsmith, doug.gregor, CornedBee, eli.friedman

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191159 91177308-0d34-0410-b5e6-96231b3b80d8
Parse: Move simple-type-specifier sanity check earlier

No functional change, just makes the error handling a bit more obvious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191162 91177308-0d34-0410-b5e6-96231b3b80d8
Fix typo. Add missing whitespace. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191169 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify code to equivalent code. No need to test for null after cast<>, use
takeAs<> instead of cast<>(.take()). Fix 80-column violation in whitespace after
comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191170 91177308-0d34-0410-b5e6-96231b3b80d8
Fix comment to match name of variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191171 91177308-0d34-0410-b5e6-96231b3b80d8
Rewrite a cold use of std::sort to array_pod_sort.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191173 91177308-0d34-0410-b5e6-96231b3b80d8
array_pod_sort loses some type safety, better use the right types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191174 91177308-0d34-0410-b5e6-96231b3b80d8
Fix array_pod_sort predicates after LLVM change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191176 91177308-0d34-0410-b5e6-96231b3b80d8
Make sort predicate match the qsort convention.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191177 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master' of git://github.com/llvm-mirror/clang