]> granicus.if.org Git - clang/log
clang
11 years agoTry to fix Win32 failures
Douglas Gregor [Tue, 11 Dec 2012 22:31:46 +0000 (22:31 +0000)]
Try to fix Win32 failures

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

11 years agoDon't use 'touch' in this test; it may be the cause of Windows-related failures.
Douglas Gregor [Tue, 11 Dec 2012 22:25:26 +0000 (22:25 +0000)]
Don't use 'touch' in this test; it may be the cause of Windows-related failures.

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

11 years agoUse @import rather than @__experimental_modules_import, since the
Douglas Gregor [Tue, 11 Dec 2012 22:11:52 +0000 (22:11 +0000)]
Use @import rather than @__experimental_modules_import, since the
latter is rather a mess to type.

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

11 years agoAdd SPIR32/SPIR64 targets to Clang
Guy Benyei [Tue, 11 Dec 2012 21:38:14 +0000 (21:38 +0000)]
Add SPIR32/SPIR64 targets to Clang

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

11 years agoAdd -fslp-vectorize to enable bb-vectorize
Hal Finkel [Tue, 11 Dec 2012 19:59:32 +0000 (19:59 +0000)]
Add -fslp-vectorize to enable bb-vectorize

Add -fslp-vectorize (with -ftree-slp-vectorize as an alias for gcc compatibility)
to provide a way to enable the basic-block vectorization pass. This uses the same
acronym as gcc, superword-level parallelism (SLP), also common in the literature,
to refer to basic-block vectorization.

Nadav suggested this as a follow-up to the adding of -fvectorize.

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

11 years agoobjective-C blocks: Check for record type when deciding if
Fariborz Jahanian [Tue, 11 Dec 2012 19:58:01 +0000 (19:58 +0000)]
objective-C blocks: Check for record type when deciding if
byref variable requires extended layout info. to prevent
a crash involving arrays declared __block. // rdar://12787751

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

11 years agoDon't complain about incomplete implementations for methods that are
Douglas Gregor [Tue, 11 Dec 2012 18:53:07 +0000 (18:53 +0000)]
Don't complain about incomplete implementations for methods that are
unavailable due to availability attributes. <rdar://problem/12798237>

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

11 years agoSpeed up looking up static diagnostic infos.
Benjamin Kramer [Tue, 11 Dec 2012 18:00:22 +0000 (18:00 +0000)]
Speed up looking up static diagnostic infos.

Instead of doing a binary search over the whole diagnostic table (which weighs
a whopping 48k on x86_64), use the existing enums to compute the index in the
table. This avoids loading any unneeded data from the table and avoids littering
CPU caches with it. This code is in a hot path for code with many diagnostics.

1% speedup on -fsyntax-only gcc.c, which emits a lot of warnings.

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

11 years ago[driver] Add the -ftree-vectorize flag as a alias of -fvectorize to maintain
Chad Rosier [Tue, 11 Dec 2012 17:46:33 +0000 (17:46 +0000)]
[driver] Add the -ftree-vectorize flag as a alias of -fvectorize to maintain
compatibility with gcc.
rdar://12839978

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

11 years agoFix a copypasto bug. Also rename the parameter in question to not shadow the
Matt Beaumont-Gay [Tue, 11 Dec 2012 17:37:46 +0000 (17:37 +0000)]
Fix a copypasto bug. Also rename the parameter in question to not shadow the
'file' builtin, and fix up a docstring a little.

Hat tip to Sebastian Kreft Carreno at Google for noticing the bug.

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

11 years ago[driver] Add the -fvectorize flag to enable the loop vectorization passes.
Chad Rosier [Tue, 11 Dec 2012 17:12:28 +0000 (17:12 +0000)]
[driver] Add the -fvectorize flag to enable the loop vectorization passes.
rdar://12839978

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

11 years agoStmtDumper coding style changes
Alexander Kornienko [Tue, 11 Dec 2012 15:28:09 +0000 (15:28 +0000)]
StmtDumper coding style changes

Summary:
A few small coding style changes for StmtDumper, including:
- rename Dump* methods to dump*
- uninline some methods
- comment fixes
- whitespace fixes

Please review and commit if okay.

Reviewers: alexfh

Reviewed By: alexfh

CC: cfe-commits, alexfh, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D190

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

11 years agoRename StmtDumper::DumpSubTree() to dumpStmt()
Alexander Kornienko [Tue, 11 Dec 2012 15:20:44 +0000 (15:20 +0000)]
Rename StmtDumper::DumpSubTree() to dumpStmt()

Summary:
Also rename DumpDeclarator() to dumpDecl(). Once Decl dumping is added, these will be the two main methods of the class, so this is just for consistency in naming.

There was a DumpStmt() method already, but there was no point in having it, so I have merged it into VisitStmt(). Similarly, DumpExpr() is merged into VisitExpr().

Reviewers: alexfh

Reviewed By: alexfh

CC: cfe-commits, alexfh
Differential Revision: http://llvm-reviews.chandlerc.com/D156

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

11 years agoExtend stat query APIs to explicitly specify if the query is for
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:23 +0000 (07:48 +0000)]
Extend stat query APIs to explicitly specify if the query is for
a file or directory, allowing just a stat call if a file descriptor
is not needed.

Doing just 'stat' is faster than 'open/fstat/close'.
This has the effect of cutting down system time for validating the input files of a PCH.

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

11 years ago[PCH] Remove redundant stat call when validating the input files.
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:14 +0000 (07:48 +0000)]
[PCH] Remove redundant stat call when validating the input files.

This became redundant after we removed the stat cache.

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

11 years ago[PCH] When writing out the list of input files, avoid emitting duplicate
Argyrios Kyrtzidis [Tue, 11 Dec 2012 07:48:08 +0000 (07:48 +0000)]
[PCH] When writing out the list of input files, avoid emitting duplicate
entries of the same file.

This can happen because the file was "included" multiple times and is
referenced by multiple SLocEntries.

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

11 years agoclang/test/Driver/linker-opts.c: Fix XFAIL that I removed win32.
NAKAMURA Takumi [Tue, 11 Dec 2012 07:23:52 +0000 (07:23 +0000)]
clang/test/Driver/linker-opts.c: Fix XFAIL that I removed win32.

Sorry for my 3rd commit :(

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

11 years agoclang/test/Driver/debug-options-as.c: Fixup not to use prefix=S. I didn't know "REQUI...
NAKAMURA Takumi [Tue, 11 Dec 2012 07:16:15 +0000 (07:16 +0000)]
clang/test/Driver/debug-options-as.c: Fixup not to use prefix=S. I didn't know "REQUIRES:" would match --check-prefix=S ...

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

11 years agoclang/test/Driver: Introduce the feature "clang-driver", set if gcc driver is not...
NAKAMURA Takumi [Tue, 11 Dec 2012 07:06:09 +0000 (07:06 +0000)]
clang/test/Driver: Introduce the feature "clang-driver", set if gcc driver is not used.

It is not set at targetting cygming. See PR12920.

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

11 years agoBackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"
NAKAMURA Takumi [Tue, 11 Dec 2012 05:53:24 +0000 (05:53 +0000)]
BackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"

llvm/Target/TargetMachine.h will not provide "llvm/TargetTransformInfo.h" any more.

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

11 years agoAdd tests for a corner case of when to relax all instructions:
Rafael Espindola [Tue, 11 Dec 2012 05:52:24 +0000 (05:52 +0000)]
Add tests for a corner case of when to relax all instructions:

We don't want to relax all instructions in

$ clang -c test.s

since most users don't pass -O when using the driver to assemble.

On the other hand, -save-temps should not change the output unnecessary, so in

$ clang -c test.c -save-temps

we should relax all instructions.

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

11 years agoPR14558: Compute triviality of special members (etc) at the end of the class
Richard Smith [Tue, 11 Dec 2012 01:14:52 +0000 (01:14 +0000)]
PR14558: Compute triviality of special members (etc) at the end of the class
definition, rather than at the end of the definition of the set of nested
classes. We still defer checking of the user-specified exception specification
to the end of the nesting -- we can't check that until we've parsed the
in-class initializers for non-static data members.

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

11 years ago[analyzer] Don't generate a summary for "freeWhenDone" if method is
Anna Zaks [Tue, 11 Dec 2012 00:17:53 +0000 (00:17 +0000)]
[analyzer] Don't generate a summary for "freeWhenDone" if method is
inlined.

Fixes a false positive that occurs if a user writes their own
initWithBytesNoCopy:freeWhenDone wrapper.

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

11 years agoRemove until I can fix this.
Bill Wendling [Mon, 10 Dec 2012 22:10:53 +0000 (22:10 +0000)]
Remove until I can fix this.

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

11 years agoAdd support to Darwin for the -export_dynamic' flag to the linker.
Bill Wendling [Mon, 10 Dec 2012 21:48:41 +0000 (21:48 +0000)]
Add support to Darwin for the -export_dynamic' flag to the linker.

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

11 years agoUse correct flags for this test.
Bill Wendling [Mon, 10 Dec 2012 21:15:22 +0000 (21:15 +0000)]
Use correct flags for this test.

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

11 years agoFixup test case from r169755. These are driver options, not frontend options.
Chad Rosier [Mon, 10 Dec 2012 20:16:17 +0000 (20:16 +0000)]
Fixup test case from r169755.  These are driver options, not frontend options.
Also, add the -S option.

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

11 years agoReturn true from HeaderSearch::isFileMultipleIncludeGuarded if the file
Argyrios Kyrtzidis [Mon, 10 Dec 2012 20:08:37 +0000 (20:08 +0000)]
Return true from HeaderSearch::isFileMultipleIncludeGuarded if the file
was #import'ed.

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

11 years agoSpecify if `-mno-red-zone' was used when creating the GCOV instrucmentation pass.
Bill Wendling [Mon, 10 Dec 2012 19:47:53 +0000 (19:47 +0000)]
Specify if `-mno-red-zone' was used when creating the GCOV instrucmentation pass.

This prevents the functions generated by that pass from using the red zone.
<rdar://problem/12843084>

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

11 years agoAddi formatting tests for pointer template parameters.
Daniel Jasper [Mon, 10 Dec 2012 18:59:13 +0000 (18:59 +0000)]
Addi formatting tests for pointer template parameters.

Fix spacing before ",".

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

11 years agoRemove unneeded typedef and volatile
Michael Ilseman [Mon, 10 Dec 2012 18:48:08 +0000 (18:48 +0000)]
Remove unneeded typedef and volatile

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

11 years agoClang-format: error recovery for access specifiers
Alexander Kornienko [Mon, 10 Dec 2012 16:34:48 +0000 (16:34 +0000)]
Clang-format: error recovery for access specifiers

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D198

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

11 years agoClarifying comments for the MatchFinder and matchesNames matcher.
Manuel Klimek [Mon, 10 Dec 2012 16:13:06 +0000 (16:13 +0000)]
Clarifying comments for the MatchFinder and matchesNames matcher.

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

11 years agoAdding tests since when I was asked whether this works I wasn't
Manuel Klimek [Mon, 10 Dec 2012 07:08:53 +0000 (07:08 +0000)]
Adding tests since when I was asked whether this works I wasn't
100% sure.

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

11 years agoUnbreak the clang build after r169712.
Benjamin Kramer [Sun, 9 Dec 2012 21:58:24 +0000 (21:58 +0000)]
Unbreak the clang build after r169712.

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

11 years agoVirtual method overrides can no longer have mismatched calling conventions. This...
Aaron Ballman [Sun, 9 Dec 2012 17:45:41 +0000 (17:45 +0000)]
Virtual method overrides can no longer have mismatched calling conventions.  This fixes PR14339.

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

11 years agoAdd a triple to this test. It depends on little-endian bitfield layout.
Chandler Carruth [Sun, 9 Dec 2012 10:39:18 +0000 (10:39 +0000)]
Add a triple to this test. It depends on little-endian bitfield layout.

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

11 years agoCleanup and fix an assert that was mis-firing.
Chandler Carruth [Sun, 9 Dec 2012 10:33:27 +0000 (10:33 +0000)]
Cleanup and fix an assert that was mis-firing.

Note that there is no test suite update. This was found by a couple of
tests failing when the test suite was run on a powerpc64 host (thanks
Roman!). The tests don't specify a triple, which might seem surprising
for a codegen test. But in fact, these tests don't even inspect their
output. Not at all. I could add a bunch of triples to these tests so
that we'd get the test coverage for normal builds, but really someone
needs to go through and add actual *tests* to these tests. =[ The ones
in question are:

  test/CodeGen/bitfield-init.c
  test/CodeGen/union.c

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

11 years agoAdd a test case that I've been using to clarify the bitfield layout for
Chandler Carruth [Sun, 9 Dec 2012 10:08:22 +0000 (10:08 +0000)]
Add a test case that I've been using to clarify the bitfield layout for
both LE and BE targets.

AFAICT, Clang get's this correct for PPC64. I've compared it to GCC 4.8
output for PPC64 (thanks Roman!) and to my limited ability to read power
assembly, it looks functionally equivalent. It would be really good to
fill in the assertions on this test case for x86-32, PPC32, ARM, etc.,
but I've reached the limit of my time and energy... Hopefully other
folks can chip in as it would be good to have this in place to test any
subsequent changes.

To those who care about PPC64 performance, a side note: there is some
*obnoxiously* bad code generated for these test cases. It would be worth
someone's time to sit down and teach the PPC backend to pattern match
these IR constructs better. It appears that things like '(shr %foo,
<imm>)' turn into 'rldicl R, R, 64-<imm>, <imm>' or some such. They
don't even get combined with other 'rldicl' instructions *immediately
adjacent*. I'll add a couple of these patterns to the README, but
I think it would be better to look at all the patterns produced by this
and other bitfield access code, and systematically build up a collection
of patterns that efficiently reduce them to the minimal code.

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

11 years agoFix the bitfield record layout in codegen for big endian targets.
Chandler Carruth [Sun, 9 Dec 2012 07:26:04 +0000 (07:26 +0000)]
Fix the bitfield record layout in codegen for big endian targets.

This was an egregious bug due to the several iterations of refactorings
that took place. Size no longer meant what it original did by the time
I finished, but this line of code never got updated. Unfortunately we
had essentially zero tests for this in the regression test suite. =[

I've added a PPC64 run over the bitfield test case I've been primarily
using. I'm still looking at adding more tests and making sure this is
the *correct* bitfield access code on PPC64 linux, but it looks pretty
close to me, and it is *worlds* better than before this patch as it no
longer asserts! =] More commits to follow with at least additional tests
and maybe more fixes.

Sorry for the long breakage due to this....

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

11 years agoFix overload resolution for the initialization of a multi-dimensional
Richard Smith [Sun, 9 Dec 2012 06:48:56 +0000 (06:48 +0000)]
Fix overload resolution for the initialization of a multi-dimensional
array from a braced-init-list. There seems to be a core wording wart
here (it suggests we should be testing whether the elements of the init
list are implicitly convertible to the array element type, not whether
there is an implicit conversion sequence) but our prior behavior appears
to be a bug, not a deliberate effort to implement the standard as written.

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

11 years agoPR14550: If a system header contains a bogus constexpr function definition,
Richard Smith [Sun, 9 Dec 2012 05:55:43 +0000 (05:55 +0000)]
PR14550: If a system header contains a bogus constexpr function definition,
don't mark the function as invalid, since we suppress the error.

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

11 years agoPR14549. Don't assert if we see an incomplete decltype specifier at the end of the...
Richard Smith [Sun, 9 Dec 2012 04:17:57 +0000 (04:17 +0000)]
PR14549. Don't assert if we see an incomplete decltype specifier at the end of the file.

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

11 years agoEscape % in the TextDiagnosticBuffer so they aren't interpreted twice when fed into...
Benjamin Kramer [Sat, 8 Dec 2012 12:42:30 +0000 (12:42 +0000)]
Escape % in the TextDiagnosticBuffer so they aren't interpreted twice when fed into the diagnostic formatting machinery again.

Fixes PR14543.

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

11 years agolong double should be 64 bits on FreeBSD/MIPS64. It possibly should be on
David Chisnall [Sat, 8 Dec 2012 09:06:08 +0000 (09:06 +0000)]
long double should be 64 bits on FreeBSD/MIPS64.  It possibly should be on
Linux too, as I think we inherited it from there.  The ABI spec says 128-bit,
although I think SGI's compiler on IRIX may be the only thing ever to support
this.

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

11 years agoFinish implementing 'selected constructor' rules for triviality in C++11. In
Richard Smith [Sat, 8 Dec 2012 08:32:28 +0000 (08:32 +0000)]
Finish implementing 'selected constructor' rules for triviality in C++11. In
the cases where we can't determine whether special members would be trivial
while building the class, we eagerly declare those special members. The impact
of this is bounded, since it does not trigger implicit declarations of special
members in classes which merely *use* those classes.

In order to determine whether we need to apply this rule, we also need to
eagerly declare move operations and destructors in cases where they might be
deleted. If a move operation were supposed to be deleted, it would instead
be suppressed, and we could need overload resolution to determine if we fall
back to a trivial copy operation. If a destructor were implicitly deleted,
it would cause the move constructor of any derived classes to be suppressed.

As discussed on cxx-abi-dev, C++11's selected constructor rules are also
retroactively applied as a defect resolution in C++03 mode, in order to
identify that class B has a non-trivial copy constructor (since it calls
A's constructor template, not A's copy constructor):

struct A { template<typename T> A(T &); };
struct B { mutable A a; };

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

11 years agoRemove some remnants of the assumption that there is at most one of each
Richard Smith [Sat, 8 Dec 2012 04:10:18 +0000 (04:10 +0000)]
Remove some remnants of the assumption that there is at most one of each
flavour of special member.

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

11 years agoThread-safety analysis: check member access on guarded non-primitive types.
DeLesley Hutchins [Sat, 8 Dec 2012 03:46:30 +0000 (03:46 +0000)]
Thread-safety analysis: check member access on guarded non-primitive types.

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

11 years agoProperly compute triviality for explicitly-defaulted or deleted special members.
Richard Smith [Sat, 8 Dec 2012 02:53:02 +0000 (02:53 +0000)]
Properly compute triviality for explicitly-defaulted or deleted special members.
Remove pre-standard restriction on explicitly-defaulted copy constructors with
'incorrect' parameter types, and instead just make those special members
non-trivial as the standard requires.

This required making CXXRecordDecl correctly handle classes which have both a
trivial and a non-trivial special member of the same kind.

This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the
new triviality computation technology.

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

11 years ago[libclang] Resolve a cursor that points to a macro name inside a #ifdef/#ifndef
Argyrios Kyrtzidis [Sat, 8 Dec 2012 02:21:17 +0000 (02:21 +0000)]
[libclang] Resolve a cursor that points to a macro name inside a #ifdef/#ifndef
directive as a macro expansion.

This is more of a "macro reference" than a macro expansion but it's close enough
for libclang's purposes. If it causes issues we can revisit and introduce a new
kind of cursor.

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

11 years ago[Preprocessor] Enhance Ifdef/Ifndef/Defined preprocessor callbacks to also pass
Argyrios Kyrtzidis [Sat, 8 Dec 2012 02:21:11 +0000 (02:21 +0000)]
[Preprocessor] Enhance Ifdef/Ifndef/Defined preprocessor callbacks to also pass
a MacroInfo object if the identifier was a macro name.

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

11 years agoAdd a FIXME.
Richard Smith [Sat, 8 Dec 2012 02:13:02 +0000 (02:13 +0000)]
Add a FIXME.

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

11 years agoImplement C++03 [dcl.init]p5's checking for value-initialization of references
Richard Smith [Sat, 8 Dec 2012 02:01:17 +0000 (02:01 +0000)]
Implement C++03 [dcl.init]p5's checking for value-initialization of references
properly, rather than faking it up by pretending that a reference member makes
the default constructor non-trivial. That leads to rejects-valids when putting
such types inside unions.

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

11 years agoCurrently when AST record layouts are dumped with -fdump-record-layouts, the
Eli Bendersky [Sat, 8 Dec 2012 00:07:24 +0000 (00:07 +0000)]
Currently when AST record layouts are dumped with -fdump-record-layouts, the
following:

sizeof=132, dsize=132, align=4
nvsize=132, nvalign=4

Is not indented, so when classes are nested there is no way to know to
which class it belongs.

Fix this problem by indenting the size summary properly for each class.

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

11 years agos/AttrListPtr/AttributeSet/g to better label what this class is going to be in the...
Bill Wendling [Fri, 7 Dec 2012 23:17:26 +0000 (23:17 +0000)]
s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future.

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

11 years agoFix analysis based warnings so that all warnings are emitted when compiling
DeLesley Hutchins [Fri, 7 Dec 2012 22:53:48 +0000 (22:53 +0000)]
Fix analysis based warnings so that all warnings are emitted when compiling
with -Werror.  Previously, compiling with -Werror would emit only the first
warning in a compilation unit, because clang assumes that once an error occurs,
further analysis is unlikely to return valid results.  However, warnings that
have been upgraded to errors should not be treated as "errors" in this sense.

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

11 years agoAppease -Wnon-virtual-dtor
Matt Beaumont-Gay [Fri, 7 Dec 2012 22:49:27 +0000 (22:49 +0000)]
Appease -Wnon-virtual-dtor

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

11 years ago[libclang] Declarations inside anonymous namespaces have internal linkage so
Argyrios Kyrtzidis [Fri, 7 Dec 2012 22:41:46 +0000 (22:41 +0000)]
[libclang] Declarations inside anonymous namespaces have internal linkage so
their USR should contain a location.

This uniques them from other declarations with the same name but in different translation units.
rdar://10546541

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

11 years ago[analyzer] Rename the option help to reflect better what it does.
Anna Zaks [Fri, 7 Dec 2012 21:51:50 +0000 (21:51 +0000)]
[analyzer] Rename the option help to reflect better what it does.

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

11 years ago[analyzer] Optimization heuristic: do not reanalyze every ObjC method as
Anna Zaks [Fri, 7 Dec 2012 21:51:47 +0000 (21:51 +0000)]
[analyzer] Optimization heuristic: do not reanalyze every ObjC method as
top level.

This heuristic is already turned on for non-ObjC methods
(inlining-mode=noredundancy). If a method has been previously analyzed,
while being inlined inside of another method, do not reanalyze it as top
level.

This commit applies it to ObjCMethods as well. The main caveat here is
that to catch the retain release errors, we are still going to reanalyze
all the ObjC methods but without inlining turned on.

Gives 21% performance increase on one heavy ObjC benchmark, which
suffered large performance regressions due to ObjC inlining.

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

11 years agoAST matcher tutorial (Part I)
Daniel Jasper [Fri, 7 Dec 2012 20:34:49 +0000 (20:34 +0000)]
AST matcher tutorial (Part I)

This an AST matcher tutorial based on Sam Panzer's document
(https://docs.google.com/a/google.com/document/d/1oTkVLhCdRJUEH1_LDaQdXqe8-aOqT5GLDL9e4MhoFF8/edit).

Checking in now although some parts might be a bit rough so others can
help improving it.

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

11 years ago[analyzer] Fix r168019 to work with unpruned paths as well.
Jordan Rose [Fri, 7 Dec 2012 19:56:29 +0000 (19:56 +0000)]
[analyzer] Fix r168019 to work with unpruned paths as well.

This is the case where the analyzer tries to print out source locations
for code within a synthesized function body, which of course does not have
a valid source location. The previous fix attempted to do this during
diagnostic path pruning, but some diagnostics have pruning disabled, and
so any diagnostic with a path that goes through a synthesized body will
either hit an assertion or emit invalid output.

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

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

11 years agoReduce conversions between Store <-> ImmutableMapRef in RegionStore.
Ted Kremenek [Fri, 7 Dec 2012 19:54:25 +0000 (19:54 +0000)]
Reduce conversions between Store <-> ImmutableMapRef in RegionStore.

This reduces canonicalization of ImmutableMaps.  This reduces analysis time
of one heavy Objective-C file by another 1%.

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

11 years agoAdd helper method to convert from a RegionStoreRefBindings to a Store.
Ted Kremenek [Fri, 7 Dec 2012 18:32:08 +0000 (18:32 +0000)]
Add helper method to convert from a RegionStoreRefBindings to a Store.

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

11 years agoHexagon TC: forward appropriate args to assembler
Matthew Curtis [Fri, 7 Dec 2012 17:23:04 +0000 (17:23 +0000)]
Hexagon TC: forward appropriate args to assembler

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

11 years agoDriver/ToolChains.cpp: Add the name CentOS5 32bit gcc44 (aka i386-redhat-linux6E).
NAKAMURA Takumi [Fri, 7 Dec 2012 17:13:18 +0000 (17:13 +0000)]
Driver/ToolChains.cpp: Add the name CentOS5 32bit gcc44 (aka i386-redhat-linux6E).

Thanks to Bruce Stephens.

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

11 years agoClang-format: extracted FormatTokenSource from UnwrappedLineParser.
Alexander Kornienko [Fri, 7 Dec 2012 16:15:44 +0000 (16:15 +0000)]
Clang-format: extracted FormatTokenSource from UnwrappedLineParser.

Summary: FormatTokenLexer is here, FormatTokenBuffer is on the way. This will allow to re-parse unwrapped lines when needed.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D186

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

11 years agoHexagon TC: add cc1 defaults for hexagon-gcc
Matthew Curtis [Fri, 7 Dec 2012 13:52:44 +0000 (13:52 +0000)]
Hexagon TC: add cc1 defaults for hexagon-gcc
 compatibility

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

11 years agoSmall tweaks to clang-format.
Daniel Jasper [Fri, 7 Dec 2012 09:52:15 +0000 (09:52 +0000)]
Small tweaks to clang-format.

Now not joining keywords with '::' and not putting a space between
a pointer pointer.

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

11 years agoCache queries to lookupPrivateMethod() within ObjCMethodCall::getRuntimeDefinition().
Ted Kremenek [Fri, 7 Dec 2012 07:30:19 +0000 (07:30 +0000)]
Cache queries to lookupPrivateMethod() within ObjCMethodCall::getRuntimeDefinition().

The same queries can happen thousands of times.  This reduces the analysis
time on one heavy Objective-C file by 2.4%.

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

11 years agoFix the required args count for variadic blocks.
John McCall [Fri, 7 Dec 2012 07:03:17 +0000 (07:03 +0000)]
Fix the required args count for variadic blocks.

We were emitting calls to blocks as if all arguments were
required --- i.e. with signature (A,B,C,D,...) rather than
(A,B,...).  This patch fixes that and accounts for the
implicit block-context argument as a required argument.
In addition, this patch changes the function type under which
we call unprototyped functions on platforms like x86-64 that
guarantee compatibility of variadic functions with unprototyped
function types;  previously we would always call such functions
under the LLVM type T (...)*, but now we will call them under
the type T (A,B,C,D,...)*.  This last change should have no
material effect except for making the type conventions more
explicit;  it was a side-effect of the most convenient implementation.

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

11 years agoclang/test: Remove "REQUIRES:LP64" in two tests. Each of them have explicit triple.
NAKAMURA Takumi [Fri, 7 Dec 2012 06:57:40 +0000 (06:57 +0000)]
clang/test: Remove "REQUIRES:LP64" in two tests. Each of them have explicit triple.

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

11 years agoFurther reduce analysis time by 0.2% on a heavy Objective-C example by avoiding over...
Ted Kremenek [Fri, 7 Dec 2012 06:49:27 +0000 (06:49 +0000)]
Further reduce analysis time by 0.2% on a heavy Objective-C example by avoiding over-eager canonicalization of clusters.

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

11 years agoUnbreak the GCC (4.4 & other bot) builds from r169571.
David Blaikie [Fri, 7 Dec 2012 03:28:20 +0000 (03:28 +0000)]
Unbreak the GCC (4.4 & other bot) builds from r169571.

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

11 years agoAdd file missed from r169574!
Richard Smith [Fri, 7 Dec 2012 02:26:01 +0000 (02:26 +0000)]
Add file missed from r169574!

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

11 years agoPer [dcl.fct.def.default]p1, don't allow variadic special members to be defaulted.
Richard Smith [Fri, 7 Dec 2012 02:10:28 +0000 (02:10 +0000)]
Per [dcl.fct.def.default]p1, don't allow variadic special members to be defaulted.

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

11 years agoChange RegionStore to always use ImmutableMapRef for processing cluster bindings.
Ted Kremenek [Fri, 7 Dec 2012 01:55:21 +0000 (01:55 +0000)]
Change RegionStore to always use ImmutableMapRef for processing cluster bindings.

This reduces analysis time by 1.2% on one test case (Objective-C), but
also cleans up some of the code conceptually as well.  We can possible
just make RegionBindingsRef -> RegionBindings, but I wanted to stage
things.

After this, we should revisit Jordan's optimization of not canonicalizing
the immutable AVL trees for the cluster bindings as well.

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

11 years ago[analyzer] Remove possible pessimizations from r169563.
Jordan Rose [Fri, 7 Dec 2012 01:54:38 +0000 (01:54 +0000)]
[analyzer] Remove possible pessimizations from r169563.

Thanks for reminding me about copy-elision, David. Passing references here
doesn't help when we could get move construction in C++11. If we really
cared, we'd use std::swap to steal the reference from the temporary arg,
but it's probably not /that/ critical outside of Profile anyway.

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

11 years agotest/Index/skip-parsed-bodies/compile_commands.json: Remove XFAIL on cygming.
NAKAMURA Takumi [Fri, 7 Dec 2012 00:05:36 +0000 (00:05 +0000)]
test/Index/skip-parsed-bodies/compile_commands.json: Remove XFAIL on cygming.

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

11 years ago[analyzer] Avoid ProgramStateRef copy constructors.
Jordan Rose [Thu, 6 Dec 2012 23:55:34 +0000 (23:55 +0000)]
[analyzer] Avoid ProgramStateRef copy constructors.

Suggested by David Blaikie. ExplodedNode, CallEvent, and CheckerContext all
hang onto their ProgramState, so the accessors can return a reference to the
internal state rather than preemptively copying it. This helps avoid
temporary ProgramStateRefs, though local variables will still (correctly)
do an extra retain and release.

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

11 years agoRevert r169557. It seems that the test is too restricted
Logan Chien [Thu, 6 Dec 2012 23:40:31 +0000 (23:40 +0000)]
Revert r169557.  It seems that the test is too restricted
and will break the build on buildbot.

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

11 years ago[libclang] Add a test to make sure we skip bodies properly from "#pragma once" headers.
Argyrios Kyrtzidis [Thu, 6 Dec 2012 23:04:24 +0000 (23:04 +0000)]
[libclang] Add a test to make sure we skip bodies properly from "#pragma once" headers.

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

11 years agoAdd i686-linux-android for gcc toolchain detection.
Logan Chien [Thu, 6 Dec 2012 22:59:37 +0000 (22:59 +0000)]
Add i686-linux-android for gcc toolchain detection.

* Look for i686-linux-android under <sysroot>/lib/gcc.

* This patch also slightly enhance the test suite for
  Android GCC toolchain detection.

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

11 years agoAdd extra truthiness.
Richard Smith [Thu, 6 Dec 2012 22:40:09 +0000 (22:40 +0000)]
Add extra truthiness.

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

11 years agoFixes Makefile for Format unit tests.
Fariborz Jahanian [Thu, 6 Dec 2012 22:29:01 +0000 (22:29 +0000)]
Fixes Makefile for Format unit tests.

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

11 years agohexagon-toolchain.c now passes on win32
Matthew Curtis [Thu, 6 Dec 2012 21:25:18 +0000 (21:25 +0000)]
hexagon-toolchain.c now passes on win32

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

11 years agorelax hexagon-toolchain.c even more to accomodate mingw32 targets
Matthew Curtis [Thu, 6 Dec 2012 20:55:41 +0000 (20:55 +0000)]
relax hexagon-toolchain.c even more to accomodate mingw32 targets

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

11 years agorelax hexagon-toolchain.c CHECK to accomodate mingw32 targets
Matthew Curtis [Thu, 6 Dec 2012 20:21:20 +0000 (20:21 +0000)]
relax hexagon-toolchain.c CHECK to accomodate mingw32 targets

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

11 years agoSimplify PDiag's move assignment overload a bit, the self-move check isn't actually...
Benjamin Kramer [Thu, 6 Dec 2012 20:12:03 +0000 (20:12 +0000)]
Simplify PDiag's move assignment overload a bit, the self-move check isn't actually necessary.

This just empties out the diag, which is fine.

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

11 years agoMake sure to initialize the HasSkippedBody bit.
Argyrios Kyrtzidis [Thu, 6 Dec 2012 19:41:23 +0000 (19:41 +0000)]
Make sure to initialize the HasSkippedBody bit.

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

11 years ago[libclang] Introduce a new indexing mode where we skip function bodies
Argyrios Kyrtzidis [Thu, 6 Dec 2012 19:41:16 +0000 (19:41 +0000)]
[libclang] Introduce a new indexing mode where we skip function bodies
that were already parsed in the same "indexing session".

An indexing session is defined as using the same CXIndexAction object
for multiple clang_indexSourceFile calls.
Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will
enable the mode where we try to skip bodies that were already parsed in
another translation unit.

If a function's body was skipped, the "flags" field in the CXIdxDeclInfo
structure will have "CXIdxDeclFlag_Skipped" bit was set.

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

11 years agoRevert "[analyzer] Aggressively cut back on the canonicalization in RegionStore."
Ted Kremenek [Thu, 6 Dec 2012 19:40:32 +0000 (19:40 +0000)]
Revert "[analyzer] Aggressively cut back on the canonicalization in RegionStore."

Jordan and I discussed this, and we are going to do this another way.

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

11 years agoAdd move semantics to PartialDiagnostic, which can be very expensive to copy.
Benjamin Kramer [Thu, 6 Dec 2012 19:09:30 +0000 (19:09 +0000)]
Add move semantics to PartialDiagnostic, which can be very expensive to copy.

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

11 years agoUn-XFAIL hexagon-toolchain.c test for mingw32
Matthew Curtis [Thu, 6 Dec 2012 19:03:09 +0000 (19:03 +0000)]
Un-XFAIL hexagon-toolchain.c test for mingw32

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

11 years agoAdd a bit on FunctionDecl/ObjCMethodDecl to indicate if there was a body
Argyrios Kyrtzidis [Thu, 6 Dec 2012 18:59:10 +0000 (18:59 +0000)]
Add a bit on FunctionDecl/ObjCMethodDecl to indicate if there was a body
that was skipped by the parser.

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

11 years ago[analyzer] Remove isa<> followed by dyn_cast<>.
Jordan Rose [Thu, 6 Dec 2012 18:58:29 +0000 (18:58 +0000)]
[analyzer] Remove isa<> followed by dyn_cast<>.

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

11 years ago[analyzer] Remove unused fields from ExprEngine.
Jordan Rose [Thu, 6 Dec 2012 18:58:26 +0000 (18:58 +0000)]
[analyzer] Remove unused fields from ExprEngine.

'currStmt', 'CleanedState', and 'EntryNode' were being set, but only ever
used locally.

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

11 years ago[analyzer] Remove checks that predate the linearized CFG.
Jordan Rose [Thu, 6 Dec 2012 18:58:22 +0000 (18:58 +0000)]
[analyzer] Remove checks that predate the linearized CFG.

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

11 years ago[analyzer] Simplify RetainCountChecker's handling of dead symbols.
Jordan Rose [Thu, 6 Dec 2012 18:58:18 +0000 (18:58 +0000)]
[analyzer] Simplify RetainCountChecker's handling of dead symbols.

Previously we made three passes over the set of dead symbols, and removed
them from the state /twice/. Now we combine the autorelease pass and the
symbol death pass, and only have to remove the bindings for the symbols
that leaked.

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

11 years ago[analyzer] Use a smarter algorithm to find the last block in an inlined call.
Jordan Rose [Thu, 6 Dec 2012 18:58:15 +0000 (18:58 +0000)]
[analyzer] Use a smarter algorithm to find the last block in an inlined call.

Previously we would search for the last statement, then back up to the
entrance of the block that contained that statement. Now, while we're
scanning for the statement, we just keep track of which blocks are being
exited (in reverse order).

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