Fix crash-on-invalid if list-initialization works, but we bail out when
building the resulting expression because it invokes a deleted constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182624 91177308-0d34-0410-b5e6-96231b3b80d8
Update static analyzer build to checker-275.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182626 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] If we hit a failure while loading a PCH/module, abort parsing instead of trying to continue in an invalid state.

Also don't let libclang create a PCH with such an error.

Fixes rdar://13953768

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182629 91177308-0d34-0410-b5e6-96231b3b80d8
User correct case for 'FileCheck'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182632 91177308-0d34-0410-b5e6-96231b3b80d8
Fix comment typo pointed out by maslen on IRC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182642 91177308-0d34-0410-b5e6-96231b3b80d8
Add -lrt to sanitizer link arguments.

Sanitizer runtime intercepts functions from librt. Not doing this will fail
if the librt dependency is not present at program startup (ex. comes from a
dlopen()ed library).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182645 91177308-0d34-0410-b5e6-96231b3b80d8
Suffixing #pragma comment(lib) library names with .lib if necessary.  This matches MSVC behavior, as well as allows us to properly link libraries such as the ones provided by the MSDN examples.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182647 91177308-0d34-0410-b5e6-96231b3b80d8
Fix printing CXXTemporaryObjectExpr with default args.

Patch by Will Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182651 91177308-0d34-0410-b5e6-96231b3b80d8
Ignore contents of #if 0 blocks.

Summary:
Added stack of preprocessor branching directives, and ignore all tokens
inside #if 0 except for preprocessor directives.

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182658 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Don't diagnose an empty lookup for inline assmebly.  This happen
for labels in inline assembly that aren't in the lookup tables.  E.g.,

  __asm {
   a:
   jmp a
  }

rdar://13983623


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182660 91177308-0d34-0410-b5e6-96231b3b80d8
[PATCH] Generate cold attribute for functions marked __atribute__((cold))

This removes a FIXME in CodeGenModule::SetLLVMFunctionAttributesForDefinition.
When a function is declared cold we can now generate the IR attribute in
addition to marking the function to be optimized for size.

I tried adding a separate CHECK in the existing test, but it was
failing.  I suppose CHECK matches one line exactly once?  This would be
a problem if the attributes are listed in a different order, though they
seem to be sorted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182666 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master' into powerpc-darwin8
PR16091: Error when attempting to emit debug info for undeduced auto return types

Perhaps we should just suppress this, rather than erroring, but since we
have the infrastructure for it I figured I'd use it - if this is
determined to be not the right thing we should probably remove that
infrastructure entirely. I guess it's lying around from the early days
of implementing debug info support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182673 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Rename CreatePointerType to getOrCreateTypeDeclaration

To make this more consistent with 'getOrCreateType' & clarify the
distinction between the two. The only thing I couldn't quite communicate
in the name is that getOrCreateTypeDeclaration may actually produce a
full definition (in -fno-limit-debug-info) but the point is to call it
whenever only a declaration is needed & the implementation can choose
whether to provide a declaration or definition.

(also, unfortunately, getOrCreateType can produce declarations too - we
should sure this up by making it not do that - any caller that can
tolerate a declaration should be calling getOrCreateTypeDeclaration
instead)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182674 91177308-0d34-0410-b5e6-96231b3b80d8
Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182675 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer; new edges] Properly set location after exiting an inlined call.

The new edge algorithm would keep track of the previous location in each
location context, so that it could draw arrows coming in and out of each
inlined call. However, it tried to access the location of the call before
it was actually set (at the CallEnter node). This only affected
unterminated calls at the end of a path; calls with visible exit nodes
already had a valid location.

This patch ditches the location context map, since we're processing the
nodes in order anyway, and just unconditionally updates the PrevLoc
variable after popping out of an inlined call.

<rdar://problem/13983470>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182676 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Treat analyzer-synthesized function bodies like implicit bodies.

When generating path notes, implicit function bodies are shown at the call
site, so that, say, copying a POD type in C++ doesn't jump you to a header
file. This is especially important when the synthesized function itself
calls another function (or block), in which case we should try to jump the
user around as little as possible.

By checking whether a called function has a body in the AST, we can tell
if the analyzer synthesized the body, and if we should therefore collapse
the call down to the call site like a true implicitly-defined function.

<rdar://problem/13978414>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182677 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix test for r182677.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182678 91177308-0d34-0410-b5e6-96231b3b80d8
Add some safety checks in a couple of SourceManager functions.

This is to address crash in rdar://13932308

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