Fix cindex-dump.py --show-ids

This option flag was incorrectly expecting an argument:

$ cindex-dump.py --show-ids test.cpp
cindex-dump.py: error: invalid number arguments

With this change the feature correctly gets enabled by --show-ids.

No tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207946 91177308-0d34-0410-b5e6-96231b3b80d8
cindex-dump.py: fix the --show-ids description string

It looks like this was botched back in r94936.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207947 91177308-0d34-0410-b5e6-96231b3b80d8
Make module self-import an error

Ideally, importing Foo.a from Foo.b would "do the right thing", but
until it does, this patch makes it an error rather than allow it to
silently be ignored.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207948 91177308-0d34-0410-b5e6-96231b3b80d8
Add speculative clang-interpreter test

Let's see how far this gets on the build servers. The application requires
native JIT and uses the C standard library, but hopefully we can get this
tested on at least some configurations.

Taking a lead from the clang-format tests, we'll just expect the executable to
get picked up from the build output path for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207950 91177308-0d34-0410-b5e6-96231b3b80d8
Update lit.cfg to support the clang-interpreter test from r207950

Performs behind-the-scenes RUN line substitution similarly to what's done with
clang-check and clang-format to ensure the executable is found.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207951 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix import statements with ColumnLimit: 0

These used to interact badly with AlwaysBreakBeforeMultilineStrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207955 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify getARMCPUForMArch() and make it more consistent

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207956 91177308-0d34-0410-b5e6-96231b3b80d8
Fix crash when resolving branch conditions for temporary destructor condition blocks.

Document and simplify ResolveCondition.

1. Introduce a temporary special case for temporary desctructors when resolving
the branch condition - in an upcoming patch, alexmc will change temporary
destructor conditions to not run through this logic, in which case we can remove
this (marked as FIXME); this currently fixes a crash.

2. Simplify ResolveCondition; while documenting the function, I noticed that it
always returns the last statement - either that statement is the condition
itself (in which case the condition was returned anyway), or the rightmost
leaf is returned; for correctness, the rightmost leaf must be evaluated anyway
(which the CFG does in the last statement), thus we can just return the last
statement in that case, too. Added an assert to verify the invariant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207957 91177308-0d34-0410-b5e6-96231b3b80d8
Fix bug in clang-format while merging short function

Before:
    #ifdef _DEBUG
    int foo( int i = 0 )
    #else
    int foo( int i = 5 )
    #endif { return i; }

After:
    #ifdef _DEBUG
    int foo( int i = 0 )
    #else
    int foo( int i = 5 )
    #endif
    {
    	return i;
    }



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207958 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve understanding of decltype.

Before:
  SomeFunction([](decltype(x), A * a) {});

After:
  SomeFunction([](decltype(x), A *a) {});

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207961 91177308-0d34-0410-b5e6-96231b3b80d8
StringRefize and take out an old FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207962 91177308-0d34-0410-b5e6-96231b3b80d8
Driver: Recognize CentOS 6 as RHEL 6.

Patch by Dimitry Andric!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207963 91177308-0d34-0410-b5e6-96231b3b80d8
Added some heuristics to identify c style casting

Before:
void f() { my_int a = (my_int) * b; }
void f() { return P ? (my_int) * P : (my_int)0; }

After:
void f() { my_int a = (my_int)*b; }
void f() { return P ? (my_int)*P : (my_int)0; }

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207964 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Understand functions with decltype return type.

Before:
  decltype(long_name_forcing_break)
      f() {}

After:
  decltype(long_name_forcing_break)
  f() {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207965 91177308-0d34-0410-b5e6-96231b3b80d8
Add -Wmodule-build to make it easy to see when modules are (re)built

Warning is default ignore, and not in -Wall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207975 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Cleanup visibility in RTTIBuilder

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207978 91177308-0d34-0410-b5e6-96231b3b80d8
Fix handling of condition variables in the face of temp dtors.

The assignment needs to be before the destruction of the temporary.
This patch calls out to addStmt, which invokes VisitDeclStmt, which has
all the correct logic for handling temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207985 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Assign linkage to thread-wrappers correctly

We would sometimes incorrectly give a thread-wrapper external linkage
instead of internal linkage if we had only CodeGen'd it's declaration,
not it's definition.

This fixes PR19655.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207988 91177308-0d34-0410-b5e6-96231b3b80d8
Small refactoring, no functionality change.

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

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