[analyzer] Warn about double-delete in C++ at the second delete...

...rather somewhere in the destructor when we try to access something and
realize the object has already been deleted. This is necessary because
the destructor is processed before the 'delete' itself.

Patch by Karthik Bhat!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198779 91177308-0d34-0410-b5e6-96231b3b80d8
[Serialization] In ASTReader::getInputFile record it when we didn't find the file to avoid looking it up again.

Hopefully addresses rdar://14514222.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198781 91177308-0d34-0410-b5e6-96231b3b80d8
Ensure that ENABLE_SHARED is substituted for use in Windows builds

We (perhaps over-cautiously) disable the new plugin tests on static Windows
builds right now, matching what LLVM core does. This change was needed for the
lit check to work.

Thanks to Warren Hunt for spotting this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198782 91177308-0d34-0410-b5e6-96231b3b80d8
Silencing an MSVC warning about control reaching the end of a non-void function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198804 91177308-0d34-0410-b5e6-96231b3b80d8
Attempting a fix the build bots should be happier with. Amends 198804.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198805 91177308-0d34-0410-b5e6-96231b3b80d8
Implement isCXX11FinalKeyword() in terms of isCXX11VirtSpecifier()

It's not worth keeping two copies of the identifier init and comparison code
just to save a pointer coparison.

This should reduce further once we get proper contextual keywords in the token
stream, so having the identifier checks in one place is a step towards that.

Cleanup only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198814 91177308-0d34-0410-b5e6-96231b3b80d8
Used the DataLayout methods instead of the Module methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198815 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-abi] Refactor Microsoft Record Layout

This patch refactors microsoft record layout to be more "natural".  The 
most dominant change is that vbptrs and vfptrs are injected after the 
fact.  This simplifies the implementation and the math for the offest 
for the first base/field after the vbptr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198818 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test for Static Analyzer checker plugins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198820 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-abi] Fixed failing lit test.

This test adjustment was missing from the previous patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198822 91177308-0d34-0410-b5e6-96231b3b80d8
PR18401: Fix assert by implementing the current proposed direction of core
issue 1430. Don't allow a pack expansion to be used as an argument to an alias
template unless the corresponding parameter is a parameter pack.


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198837 91177308-0d34-0410-b5e6-96231b3b80d8
Update Clang's CFGBlock interface to conform to the strange part of
LLVM's Value interface which is used in LLVM's DominatorTree analysis
and which changed in LLVM r198836.

The DominatorTree analysis is actually a generic graph analysis and
should be moved to LLVM's support library to clarify that Clang and
others are using it with arbitrary graphs. Further, it seems likely that
it should be using something other than printAsOperand, but this is
a simpler build fix. I'll clean this up later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198840 91177308-0d34-0410-b5e6-96231b3b80d8
PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash on
SPARC, where uint64_t apparently requires higher alignment than void*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198845 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash on"

It broke building.
This reverts commit r198845.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198849 91177308-0d34-0410-b5e6-96231b3b80d8
In areVectorOperandsLaxBitCastable() allow bitcast between a vector and scalar.

rdar://15779837.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198856 91177308-0d34-0410-b5e6-96231b3b80d8
Fix leak in lib/CodeGen/CGException.cpp, PR18318

Summary: This fixes the leak described in http://llvm.org/bugs/show_bug.cgi?id=18318

Reviewers: chandlerc, dblaikie

Reviewed By: chandlerc

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198857 91177308-0d34-0410-b5e6-96231b3b80d8
Disable LeakSanitizer in TableGen binaries, see PR18325

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198858 91177308-0d34-0410-b5e6-96231b3b80d8
check-clang: Add dependencies to PrintFunctionNames and SampleAnalyzerPlugin, for r198747 and r198820.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198867 91177308-0d34-0410-b5e6-96231b3b80d8
The OpenCL specification states that images are allocated 
from the global address space (6.5.1 of the OpenCL 1.2 specification).
This makes clang construct the image arguments in the global address 
space and generate the argument metadata with the correct address space 
descriptor. 

Patch by Pedro Ferreira!



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