[analyzer] Updated tests for ZeroAllocDereference checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220911 91177308-0d34-0410-b5e6-96231b3b80d8
Get rid of SanitizerOptions::Disabled global. NFC.

SanitizerOptions is not even a POD now, so having global variable of
this type, is not nice. Instead, provide a regular constructor and clear()
method, and let each CodeGenFunction has its own copy of SanitizerOptions
it uses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220920 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor tree printing in AST dumping.

Instead of manually maintaining a flag indicating whether we're about to print
out the last child of the parent node (to determine whether we print "`" or
"|"), capture a callable to print that child and defer printing it until we
either see a next child or finish the parent.

No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220930 91177308-0d34-0410-b5e6-96231b3b80d8
Rename 'DarwinStaticLib' to 'DarwinLibName'

The former name doesn't make sense, we are using this parameter for both .a and .dylib libraries.

No functional change.

http://reviews.llvm.org/D6040



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220939 91177308-0d34-0410-b5e6-96231b3b80d8
ASTDumper.cpp: Appease g++, for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220940 91177308-0d34-0410-b5e6-96231b3b80d8
Make QualType::dump() produce a useful dump of the structure of the type,
rather than simply pretty-printing it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220942 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] When a .pcm file is explicitly built separately from the translation
unit, allow the -O settings of the two compilations to differ.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220943 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64]Add 2 intrinsics vmov_n_p64/vmovq_n_p64, the alias for vdup_n_p64/vdup_n_p64.
As this change is too small, commit it directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220946 91177308-0d34-0410-b5e6-96231b3b80d8
Remove a couple typedefs for things in the clang namespace with the same name. Remove a typedef that matches an identical one in the clang namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220954 91177308-0d34-0410-b5e6-96231b3b80d8
Remove CastKind typedef from CastExpr since CastKind is in the clang namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220955 91177308-0d34-0410-b5e6-96231b3b80d8
Remove StorageClass typedefs from VarDecl and FunctionDecl since StorageClass is in the clang namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220956 91177308-0d34-0410-b5e6-96231b3b80d8
[Makefile] If ENABLE_CLANG_ARCMT=0 it seems we don't build libclang, so the unittests for libclang should be disabled too.

This is a modified patch provided by Vassil Vassilev.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220965 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Disable spell-checking and warnings during code-completion since they are not needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220966 91177308-0d34-0410-b5e6-96231b3b80d8
Fix unused-function warning differently from r220853

Rather than executing this code only needed for an assertion even in a
non-asserts build, just roll the function into the assert. The assertion
text literally describes the two cases so it doesn't seem like this
benefits much from having a separate function (& have to hassle about
ifndef NDEBUG it out, etc)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220970 91177308-0d34-0410-b5e6-96231b3b80d8
Fix ARM HVA classification of classes with non-virtual bases

Reuse the PPC64 HVA detection algorithm for ARM and AArch64. This is a
nice code deduplication, since they are roughly identical. A few virtual
method extension points are needed to understand how big an HVA can be
and what element types it can have for a given architecture.

Also make the record expansion code work in the presence of non-virtual
bases.

Reviewed By: uweigand, asl

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220974 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Rename NewDeleteLeaks checker in the test script.

Fixup to r220289.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220976 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [js] Updates to Google's JavaScript style.

The style guide is changing..

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220977 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Improve line breaks around annotations.

Before:
  @SomeAnnotation("With some really looooooooooooooong text") private static final
      long something = 0L;

  void SomeFunction(@Nullable
                    String something) {}

After:
  @SomeAnnotation("With some really looooooooooooooong text")
  private static final long something = 0L;

  void SomeFunction(@Nullable String something) {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220984 91177308-0d34-0410-b5e6-96231b3b80d8
ignore -mconstructor-aliases when adding field paddings for asan

Summary:
When we are adding field paddings for asan even an empty dtor has to remain in the code,
so we ignore -mconstructor-aliases if the paddings are going to be added.

Test Plan: added a test

Reviewers: rsmith, rnk, rafael

Reviewed By: rafael

Subscribers: cfe-commits

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

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