r181140 - ArrayRef<T>() -> None cleanup
Jordan Rose
jordan_rose at apple.com
Mon May 6 09:55:42 PDT 2013
On May 6, 2013, at 9:54 , David Blaikie <dblaikie at gmail.com> wrote:
> On Mon, May 6, 2013 at 9:47 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>> If it matters, there's another one in the ternary expression on the next line. ;-)
>
> Subtly enough that one's necessary because FixIt isn't an ArrayRef,
> but is convertible to ArrayRef. Without at least one of the operands
> being an explicit/actual ArrayRef, it won't compile. It could be
> rewritten as "? makeArrayRef(FixIt) : None" though, for example.
Whoops, right, my mistake. Thanks, David.
>>
>> On May 4, 2013, at 18:03 , Dmitri Gribenko <gribozavr at gmail.com> wrote:
>>
>>> Author: gribozavr
>>> Date: Sat May 4 20:03:47 2013
>>> New Revision: 181140
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=181140&view=rev
>>> Log:
>>> ArrayRef<T>() -> None cleanup
>>>
>>> Modified:
>>> cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
>>>
>>> Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp?rev=181140&r1=181139&r2=181140&view=diff
>>> ==============================================================================
>>> --- cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp (original)
>>> +++ cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Sat May 4 20:03:47 2013
>>> @@ -245,7 +245,7 @@ static void groupDiagnostics(const std::
>>> SourceMgr::DK_Error,
>>> Twine("group '") + Name +
>>> "' is referred to anonymously",
>>> - ArrayRef<SMRange>(),
>>> + None,
>>> InGroupRange.isValid() ? FixIt
>>> : ArrayRef<SMFixIt>());
>>> SrcMgr.PrintMessage((*I)->ExplicitDef->getLoc().front(),
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list