Commit Graph

9345 Commits

Author SHA1 Message Date
Anders Carlsson 9c964ac272 Reuse case destinations.
llvm-svn: 64100
2009-02-08 22:46:50 +00:00
Anders Carlsson f57b9eef62 Always check if we can remove branch fixups, even if the cleanup stack is empty.
llvm-svn: 64099
2009-02-08 22:45:15 +00:00
Anders Carlsson dcb149cbef Add a simplified EmitJumpThroughFinally and use it in CGObjC in preparation of making it use the cleanup stack.
llvm-svn: 64098
2009-02-08 22:25:30 +00:00
Anders Carlsson 76180ea456 Misc fixes to the cleanup stack code.
llvm-svn: 64096
2009-02-08 22:13:37 +00:00
Mike Stump a6dbd7b25a When we're at the stack depth we want, there isn't anything to do.
llvm-svn: 64095
2009-02-08 22:00:53 +00:00
Chris Lattner cd2b504d5f add another crazy idea :)
llvm-svn: 64092
2009-02-08 20:41:34 +00:00
Chris Lattner f7ae0d1fb2 just remove this insane testcase :)
llvm-svn: 64087
2009-02-08 19:44:51 +00:00
Sebastian Redl c9ab3d430b Teach the constant evaluator about C++ const integral variables.
llvm-svn: 64086
2009-02-08 15:51:17 +00:00
Sebastian Redl df0913ba70 Fix redundant errors with missing default arguments in member declarations.
llvm-svn: 64085
2009-02-08 14:56:26 +00:00
Sebastian Redl 95ea38fa1a Fix redundant errors for redefinitions with multiple existing definitions.
llvm-svn: 64081
2009-02-08 10:49:44 +00:00
Sebastian Redl aa400d83e6 Make the test cases failing due to exact diagnostic matching XFAIL.
llvm-svn: 64080
2009-02-08 10:28:44 +00:00
Mike Stump 284d177c7f Wire up break and continue processing to the new stack depth adjuster.
If people could beat on it and let me know if there are any new
semantics required by newer language standards or DRs or any little
details I goofed on, I'd be happy to fix any issues found.

llvm-svn: 64079
2009-02-08 09:22:19 +00:00
Mike Stump f876bc9388 Fixup expected errors.
llvm-svn: 64074
2009-02-08 07:59:54 +00:00
Anders Carlsson 66c384ac2e More cleanup stack work, PopCleanupBlock now returns a struct with the switch block and end block.
llvm-svn: 64072
2009-02-08 07:46:24 +00:00
Ted Kremenek beb1ce6504 Updated checker build.
llvm-svn: 64071
2009-02-08 05:05:02 +00:00
Anders Carlsson ae91d9b140 Split some functions up
llvm-svn: 64069
2009-02-08 03:55:35 +00:00
Anders Carlsson a586ad7f85 CleanupScope needs to push the cleanup block in its destructor
llvm-svn: 64068
2009-02-08 03:22:36 +00:00
Anders Carlsson 3c21dd5a80 Implement support for branch fixups.
llvm-svn: 64064
2009-02-08 01:23:05 +00:00
Chris Lattner 24c911e25a use some references to simplify code.
llvm-svn: 64063
2009-02-08 01:00:10 +00:00
Chris Lattner bf20a9a57d Genericize the existing logic for removing duplicate header dirs to apply
the "system dirs win over user dirs" logic to framework and headermap
search locations as well as normal directories.  This means that
clang t.m -F/System/Library/Frameworks  will treat /System/Library/Frameworks
as a system directory not a user directory.  If you use -v, the difference is:

Before:
ignoring nonexistent directory "/usr/libdata/gcc41"
ignoring duplicate framework "/System/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:

After:
ignoring nonexistent directory "/usr/libdata/gcc41"
ignoring duplicate directory "/System/Library/Frameworks"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:

This fixes rdar://6566429.

llvm-svn: 64060
2009-02-08 00:55:22 +00:00
Anders Carlsson 7d70fd27a4 More cleanup stack work.
llvm-svn: 64059
2009-02-08 00:50:42 +00:00
Douglas Gregor 9fc4c68380 Add public placement-delete operators. These are automatically used if the allocation throws
llvm-svn: 64056
2009-02-08 00:29:56 +00:00
Anders Carlsson fbfb5e6530 When emitting blocks, keep track of which cleanup scope they have. Minor fixes and cleanup.
llvm-svn: 64053
2009-02-08 00:16:35 +00:00
Anders Carlsson cadb9a6a34 Emit a cleanup block for the cleanup attribute
llvm-svn: 64052
2009-02-07 23:51:38 +00:00
Anders Carlsson be0f76a712 Add support for emitting cleanup blocks. Make EmitCompoundStatement emit cleanup blocks if necessary
llvm-svn: 64051
2009-02-07 23:50:39 +00:00
Anders Carlsson 2cf8c44e43 Add a simple RAII object, to be used for pushing a cleanup entry and make the insertion point be the cleanup block.
llvm-svn: 64048
2009-02-07 23:30:41 +00:00
Anders Carlsson 723f55d697 Improve Sema of the cleanup attribute somewhat.
llvm-svn: 64047
2009-02-07 23:16:50 +00:00
Mike Stump 0509d9635b Ensure we track all the stack depths for all break and continue points
correctly.  This should lay the ground work to throw the big switch
and start code gening break and continue in the presense of vlas.

llvm-svn: 64046
2009-02-07 23:02:10 +00:00
Ted Kremenek 394dfeb37b Update test case.
llvm-svn: 64045
2009-02-07 22:55:48 +00:00
Ted Kremenek eae2a0eb8f Fix null dereference.
llvm-svn: 64044
2009-02-07 22:54:59 +00:00
Anders Carlsson 15cb75a20c Add plumbing for the cleanup stack.
llvm-svn: 64043
2009-02-07 22:53:43 +00:00
Ted Kremenek 0aadcd4179 Commit header.
llvm-svn: 64042
2009-02-07 22:46:46 +00:00
Ted Kremenek 2a4028b728 For retain/release leaks, have the BugReport description indicate the allocation site and initial bindings.
llvm-svn: 64041
2009-02-07 22:38:00 +00:00
Ted Kremenek 79f955bfed Tidy up bug descriptions.
llvm-svn: 64039
2009-02-07 22:37:02 +00:00
Ted Kremenek 252b90ece6 Use BugReport::getDescription() for the compiler warning text.
llvm-svn: 64038
2009-02-07 22:36:41 +00:00
Chris Lattner 4293c8935a C++ really shouldn't check these #defines, thanks to Howard
for pointing this out!

llvm-svn: 64037
2009-02-07 22:21:31 +00:00
Ted Kremenek 008242f6ea Determining the allocation site for a leak when constructing a CFRefLeakReport. This avoids repeated calls to GetAllocationSite when Profiling a CFRefLeakReport object.
llvm-svn: 64036
2009-02-07 22:19:59 +00:00
Ted Kremenek 14036554d2 Split logic for 'getEndPath()' for CFRefReport and CFRefLeakReport.
llvm-svn: 64034
2009-02-07 22:04:05 +00:00
Ted Kremenek da545836f0 Convert a use of 'std::ostringstream' to 'llvm::raw_string_ostream'.
llvm-svn: 64033
2009-02-07 21:59:45 +00:00
Anders Carlsson bf8a1be33c Split the exception object out into its own stack.
llvm-svn: 64032
2009-02-07 21:37:21 +00:00
Anders Carlsson da0e4560a1 Simplify the Objective-C exception handling.
llvm-svn: 64031
2009-02-07 21:26:04 +00:00
Mike Stump 56d2a15829 Format for 80-cols.
llvm-svn: 64030
2009-02-07 20:14:12 +00:00
Sebastian Redl 5822f08cd6 Move CheckPointerToMemberOperands to SemaExprCXX.cpp
llvm-svn: 64029
2009-02-07 20:10:22 +00:00
Mike Stump 6d8a617474 Ensure that we don't miscodegen if vlas creap into the top of the for.
This will allow us to generate break and continue even if vlas are
involved without worry that we'll silently generate bad code.

llvm-svn: 64028
2009-02-07 20:09:00 +00:00
Sebastian Redl 7b7cec6895 Fix pretty-printing of if conditions. Patch by Ben Lickly.
llvm-svn: 64027
2009-02-07 20:05:48 +00:00
Sebastian Redl 2175b6a767 Make one expected-diag directive match exactly one actual diagnostic.
This uncovers some bugs, so several test cases now fail.

llvm-svn: 64025
2009-02-07 19:52:04 +00:00
Mike Stump dc0d6be7b9 Arrange to have the correct StackDepth for while statements.
llvm-svn: 64021
2009-02-07 18:08:12 +00:00
Mike Stump 1f8be1b9ac Fit into 80-col.
llvm-svn: 64020
2009-02-07 17:18:33 +00:00
Douglas Gregor dfa6ee53d7 Add a test case for some Objective-C behavior that will not be supported in Objective-C++
llvm-svn: 64019
2009-02-07 17:16:20 +00:00
Sebastian Redl f3b5e27fee Make const-initialized const integral variables I-C-Es in C++.
llvm-svn: 64015
2009-02-07 13:06:23 +00:00