Be more eager about setting the 'Invalid' bit on an invalid class
template instantiation. I wasn't able to reproduce this down to
anything small enough to put in our test suite, but it's "obviously"
okay to set the invalid bit earlier and precludes a
known-broken-but-not-marked-broken class from being used elsewhere.



git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159584 91177308-0d34-0410-b5e6-96231b3b80d8
Make this test invariant to future changes of the max loop unrolling count.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159585 91177308-0d34-0410-b5e6-96231b3b80d8
When we're looking for redeclarations which might provide a definition in CodeGen, make sure we examine all the redeclarations.  PR13252.



git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159586 91177308-0d34-0410-b5e6-96231b3b80d8
In blocks, only pretend that enum constants have enum type if necessary.

In C, enum constants have the type of the enum's underlying integer type,
rather than the type of the enum. (This is not true in C++.) Thus, when a
block's return type is inferred from an enum constant, it is incompatible
with expressions that return the enum type.

In r158899, I told block returns to pretend that enum constants have enum
type, like in C++. Doug Gregor pointed out that this can break existing code.

Now, we don't check the types of return statements until the end of the block.
This lets us go back and add implicit casts in blocks with mixed enum
constants and enum-typed expressions.

<rdar://problem/11662489> (again)

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159591 91177308-0d34-0410-b5e6-96231b3b80d8
Include -D files in crash report repro scripts. (PR13255)

Now that we're only using -frewrite-includes rather than full preprocessing
when producing repro source files, we should also include command line macro
definitions in the repro script.

I don't have a test case for this because I'm not sure if/how I can open the
crash report file when the name is only known by scraping the crash report
output. Suggestions welcome if anyone thinks it'd be helpful.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159592 91177308-0d34-0410-b5e6-96231b3b80d8
We support a mode where the Clang regression tests are run but not the
Clang unit tests. It's not clear why we support this mode in builds
where LLVM is available (LLVM itself does not), but at least this makes
us support it correctly.

This also fixes a long-standing bug where we would pass the unit test
param flag to lit in the standalone build even though the standalone
build *never* has the unittests built and ready for testing.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159594 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Remove unused member (& consequently unused parameter) in SA's Call code."

...and instead add an accessor. We're not using this today, but it's something
that should probably stay in the source for potential clients, and it doesn't
cost a lot. (ObjCPropertyAccess is only created on the stack, and right now
there's only ever one alive at a time.)

This reverts r159581 / commit 8e674e1da34a131faa7d43dc3fcbd6e49120edbe.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159595 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] If 'super' is known to be nil, we can still mark its range.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159596 91177308-0d34-0410-b5e6-96231b3b80d8
Extend a workaround for a CMake bug in LLVM's r159593 to apply to
a Clang target which hits the same bug directly.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159598 91177308-0d34-0410-b5e6-96231b3b80d8
Add a warning flag for "'extern' variable has an initializer".

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@159600 91177308-0d34-0410-b5e6-96231b3b80d8
Thread Safety Analysis: turn off checking within trylock functions.

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