[cfe-commits] r144343 - in /cfe/trunk: include/clang-c/Index.h tools/c-index-test/c-index-test.c tools/libclang/IndexDecl.cpp tools/libclang/IndexTypeSourceInfo.cpp tools/libclang/Indexing.cpp tools/libclang/IndexingContext.cpp tools/libclang/Ind

İsmail Dönmez ismail at namtrac.org
Fri Nov 11 01:32:22 PST 2011


Hi;

On Fri, Nov 11, 2011 at 1:23 AM, Argyrios Kyrtzidis <akyrtzi at gmail.com>wrote:

> +static const char *getEntityKindString(CXIdxEntityKind kind) {
> +  switch (kind) {
> +  case CXIdxEntity_Unexposed: return "<<UNEXPOSED>>";
> +  case CXIdxEntity_Typedef: return "typedef";
> +  case CXIdxEntity_Function: return "function";
> +  case CXIdxEntity_Variable: return "variable";
> +  case CXIdxEntity_Field: return "field";
> +  case CXIdxEntity_EnumConstant: return "enumerator";
> +  case CXIdxEntity_ObjCClass: return "objc-class";
> +  case CXIdxEntity_ObjCProtocol: return "objc-protocol";
> +  case CXIdxEntity_ObjCCategory: return "objc-category";
> +  case CXIdxEntity_ObjCMethod: return "objc-method";
> +  case CXIdxEntity_ObjCProperty: return "objc-property";
> +  case CXIdxEntity_ObjCIvar: return "objc-ivar";
> +  case CXIdxEntity_Enum: return "enum";
> +  case CXIdxEntity_Struct: return "struct";
> +  case CXIdxEntity_Union: return "union";
> +  case CXIdxEntity_CXXClass: return "c++-class";
> +  }
>  }
>

gcc warns here "no return in nonvoid function" and llvm_unreachable
statement after the switch would be good to fix this.

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111111/ff22d120/attachment.html>


More information about the cfe-commits mailing list