summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/blocks.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Fix an assert when a block captures a constexpr localErik Pilkington2019-03-261-0/+8
| | | | | | | | | | | | | | MarkVarDeclODRUsed indirectly calls captureInBlock, which creates a copy expression. The copy expression is insulated in it's own ExpressionEvaluationContext, so it saves, mutates, and restores MaybeODRUseExprs as CleanupVarDeclMarking is iterating through it, leading to a crash. Fix this by iterating through a local copy of MaybeODRUseExprs. rdar://47493525 https://reviews.llvm.org/D59670 llvm-svn: 357040
* Fix an assertion when ending a function definition.John McCall2014-11-181-0/+45
| | | | | | | | | | | | | | | | | | | | The bug is that ExprCleanupObjects isn't always empty in a fresh evaluation context. New evaluation contexts just track the current depth of the stack. The assertion will misfire whenever we finish processing a function body inside an expression that contained an earlier block literal with non-trivial captures. That's actually a lot less likely than you'd think, though, because it has to be a real function declaration, not just another block. Mixed block/lambda code would work, as would a template instantiation or a local class definition. The code works correctly if the assertion is disabled. rdar://16356628 llvm-svn: 222194
* Fix a crash-on-valid where a block capture copy expression wasJohn McCall2013-03-221-1/+19
| | | | | | | | | | | | picking up cleanups from earlier in the statement. Also fix a crash-on-invalid where a reference to an invalid decl from an enclosing scope was causing an expression to fail to build, but only *after* a cleanup was registered from that statement, causing an assertion downstream. The crash-on-valid is rdar://13459289. llvm-svn: 177692
* When possible, move __block variables to the heap rather than copying them.Douglas Gregor2013-03-071-1/+14
| | | | | | Fixes <rdar://problem/13330126>. llvm-svn: 176663
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-0/+1
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Truncate block variable of bool type to i1 when itsFariborz Jahanian2010-09-031-0/+7
| | | | | | | value is used. This matches with non-block variable use of bool type. (Fixes radar 8390062). llvm-svn: 113027
* Cope with llvm's reference to bool type of 'i1' vs. clang'sFariborz Jahanian2010-09-031-0/+20
| | | | | | | type of 'i8' for the same for __block variables of type bool. refixes radar 8382559. llvm-svn: 113015
* Support implicitly closing on 'this' in a block. Fixed PR7165.John McCall2010-05-201-0/+32
| | | | | | (the codegen works here, too, but that's annoying to test without execution) llvm-svn: 104202
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* A block that returns a reference is an lvalue.Anders Carlsson2009-05-261-0/+4
| | | | llvm-svn: 72409
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* instead of forcing blocks on by default, make them default to off, but letChris Lattner2008-12-041-1/+1
| | | | | | | | specific targets default them to on. Default blocks to on on 10.6 and later. Add a -fblocks option that allows the user to override the target's default. Use -fblocks in the various testcases that use blocks. llvm-svn: 60563
* Fix RUN lineDouglas Gregor2008-12-011-1/+1
| | | | llvm-svn: 60372
* Test blocks in C++ modeDouglas Gregor2008-12-011-0/+7
llvm-svn: 60367
OpenPOWER on IntegriCloud