r315755 - Fix -Woverloaded-virtual warning in clang-refactor

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 16 10:32:47 PDT 2017


Generally it's preferably to avoid adding dead code (partly for this reason
- it's hard to track when it gets used and ensure it's appropriately
tested) could the member function's body be replaced with llvm_unreachable
for now, then?

On Mon, Oct 16, 2017 at 10:27 AM Alex L <arphaman at gmail.com> wrote:

> At the moment this method override is not used by the clang-refactor tool,
> so I don't think I can add a test for it.
>
> On 16 October 2017 at 10:11, David Blaikie <dblaikie at gmail.com> wrote:
>
>> Is there a test that could be added to cover this new code?
>>
>> On Fri, Oct 13, 2017 at 2:15 PM Alex Lorenz via cfe-commits <
>> cfe-commits at lists.llvm.org> wrote:
>>
>>> Author: arphaman
>>> Date: Fri Oct 13 14:15:25 2017
>>> New Revision: 315755
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=315755&view=rev
>>> Log:
>>> Fix -Woverloaded-virtual warning in clang-refactor
>>>
>>> Modified:
>>>     cfe/trunk/tools/clang-refactor/ClangRefactor.cpp
>>>
>>> Modified: cfe/trunk/tools/clang-refactor/ClangRefactor.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-refactor/ClangRefactor.cpp?rev=315755&r1=315754&r2=315755&view=diff
>>>
>>> ==============================================================================
>>> --- cfe/trunk/tools/clang-refactor/ClangRefactor.cpp (original)
>>> +++ cfe/trunk/tools/clang-refactor/ClangRefactor.cpp Fri Oct 13 14:15:25
>>> 2017
>>> @@ -314,6 +314,10 @@ public:
>>>      SourceChanges.insert(SourceChanges.begin(), Changes.begin(),
>>> Changes.end());
>>>    }
>>>
>>> +  void handle(SymbolOccurrences Occurrences) override {
>>> +    RefactoringResultConsumer::handle(std::move(Occurrences));
>>> +  }
>>> +
>>>    const AtomicChanges &getSourceChanges() const { return SourceChanges;
>>> }
>>>
>>>  private:
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171016/cf296089/attachment-0001.html>


More information about the cfe-commits mailing list