On Wed, Dec 5, 2012 at 8:42 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Richard - apparently this didn't make it into the 3.2 branch, could you approve?</blockquote><div><br></div><div>Yes, this is important. Approved, but Doug was owner here for 3.2, and I'm not sure whether Pawel is looking at the owners as listed in the branch or on trunk, so you may need his approval too.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
On Tue, Nov 13, 2012 at 10:53 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
> On Mon, Nov 12, 2012 at 3:41 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
>> On Mon, Nov 12, 2012 at 2:25 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
>>> Author: dblaikie<br>
>>> Date: Mon Nov 12 16:25:41 2012<br>
>>> New Revision: 167766<br>
>>><br>
>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=167766&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=167766&view=rev</a><br>
>>> Log:<br>
>>> Fix more try scoping bugs introduced by r167650.<br>
>>><br>
>>> Introduces more clear scoping flags & flag combinations which should hopefully<br>
>>> be more understandable.<br>
>>><br>
>>> Modified:<br>
>>>     cfe/trunk/include/clang/Sema/Scope.h<br>
>>>     cfe/trunk/lib/Parse/ParseStmt.cpp<br>
>>>     cfe/trunk/lib/Sema/IdentifierResolver.cpp<br>
>>>     cfe/trunk/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp<br>
>>><br>
>>> Modified: cfe/trunk/include/clang/Sema/Scope.h<br>
>>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Scope.h?rev=167766&r1=167765&r2=167766&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Scope.h?rev=167766&r1=167765&r2=167766&view=diff</a><br>

>>> ==============================================================================<br>
>>> --- cfe/trunk/include/clang/Sema/Scope.h (original)<br>
>>> +++ cfe/trunk/include/clang/Sema/Scope.h Mon Nov 12 16:25:41 2012<br>
>>> @@ -84,11 +84,18 @@<br>
>>>      /// TryScope - This is the scope of a C++ try statement.<br>
>>>      TryScope = 0x1000,<br>
>>><br>
>>> +    /// CatchScope - This is the scope of a C++ catch statement.<br>
>>> +    CatchScope = 0x2000,<br>
>>> +<br>
>>> +    /// FnTryCatchScope - This is the scope for a function-level C++ try or<br>
>>> +    /// catch scope.<br>
>>> +    FnTryCatchScope = 0x4000,<br>
>>> +<br>
>>>      /// FnTryScope - This is the scope of a function-level C++ try scope.<br>
>>> -    FnTryScope = 0x3000,<br>
>>> +    FnTryScope = TryScope | FnTryCatchScope,<br>
>>><br>
>>>      /// FnCatchScope - This is the scope of a function-level C++ catch scope.<br>
>>> -    FnCatchScope = 0x4000<br>
>>> +    FnCatchScope = CatchScope | FnTryCatchScope<br>
>><br>
>> The other enumeration values here are all single flags, and callers |<br>
>> together the relevant ones. I think the users of this class would be<br>
>> clearer and more consistent without these two additional values.<br>
>><br>
>> Also, you don't seem to be using the CatchScope flag for anything; is<br>
>> it necessary?<br>
><br>
> Addressed both of these in r167856. I think initially the grouped<br>
> flags made sense when it made it easier to do x & GROUP == GROUP but<br>
> after refactoring the tests in IdentifierResolver I didn't end up<br>
> needing to test multiple flags simultaneously.<br>
><br>
> The CatchScope flag was just for consistency but, yes, it's unused so<br>
> I've removed it.<br>
</div></div></blockquote></div><br>