[Lldb-commits] Missing enum OMPArraySection case in ClangASTContext::GetEncoding

Ed Maste via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 14 08:01:40 PDT 2015


On 29 June 2015 at 11:17, Ed Maste <emaste at freebsd.org> wrote:
> On 24 June 2015 at 19:13, Enrico Granata <egranata at apple.com> wrote:
>> Author: enrico
>> Date: Wed Jun 24 18:13:23 2015
>> New Revision: 240606
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=240606&view=rev
>> Log:
>> Handle (or at least don't crash) trying to get the encoding for a bunch of new builtin types in clang trunk
>
> This introduces a warning now that all enum values are covered in the switch.
>
> ../tools/lldb/source/Symbol/ClangASTType.cpp:2215:13: warning: default
> label in switch which covers all enumeration values
> [-Wcovered-switch-default]
>             default: assert(0 && "Unknown builtin type!");

I've been running locally with a patch to remove the default case here
to eliminate the warning, and as a result I see a warning for a newly
added unhandled enum:

../tools/lldb/source/Symbol/ClangASTContext.cpp:4309:21: warning:
enumeration value 'OMPArraySection' not handled in switch [-Wswitch]

My suggestion is that we remove the default when adding the case for
OMPArraySection.


More information about the lldb-commits mailing list