Pass --use-analyzer to scan-build when running within the test harness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162783 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Add constraints to MSAsmStmt.  We don't currently compute
the constraints, so in the interim we speculatively assume a 'r' constraint.
This is expected to work for most cases on x86.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162784 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Have generateAsmString() return the AsmString computed by Sema.
We still need to translate the string, but this at least gets us one step
closer to using the more general EmitAsmStmt() codegen function. No functional
change intended.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162786 91177308-0d34-0410-b5e6-96231b3b80d8
CUDA: give correct address space to globals declared in functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162787 91177308-0d34-0410-b5e6-96231b3b80d8
CUDA: give static storage class to __shared__ and __constant__
variables without a storage class within a function, to implement
CUDA B.2.5: "__shared__ and __constant__ variables have implied static
storage [duration]."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162788 91177308-0d34-0410-b5e6-96231b3b80d8
Consolidate helper methods and configuration logic.  No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162789 91177308-0d34-0410-b5e6-96231b3b80d8
Automatically use more cores when the test build uses 'make'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162790 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] When we look for the last stmt in a function, skip implicit dtors.

When exiting a function, the analyzer looks for the last statement in the
function to see if it's a return statement (and thus bind the return value).
However, the search for "the last statement" was accepting statements that
were in implicitly-generated inlined functions (i.e. destructors). So we'd
go and get the statement from the destructor, and then say "oh look, this
function had no explicit return...guess there's no return value". And /that/
led to the value being returned being declared dead, and all our leak
checkers complaining.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162791 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Teach CallEventManager that CXXTemporaryObjectExpr is also a ctor.

Specifically, CallEventManager::getCaller was looking at the call site for
an inlined call and trying to see what kind of call it was, but it only
checked for CXXConstructExprClass. (It's not using an isa<> here to avoid
doing three more checks on the the statement class.)

This caused an unreachable when we actually did inline the constructor of a
temporary object.

PR13717

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162792 91177308-0d34-0410-b5e6-96231b3b80d8
Splitting the duplicated decl spec extension warning into two: one is an ExtWarn and the other a vanilla warning.  This addresses PR13705, where const char const * wouldn't warn unless -pedantic was specified under the right conditions.

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