[PATCH] D39718: [clangd] Add ErrorCodes enum class.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 7 01:47:54 PST 2017
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clangd/Protocol.h:35
+enum class ErrorCodes {
+ // Defined by JSON RPC.
----------------
nit: could you call this ErrorCode? The plural doesn't make so much sense as a type name.
================
Comment at: clangd/Protocol.h:42
+ InternalError = -32603,
+ serverErrorStart = -32099,
+ serverErrorEnd = -32000,
----------------
`serverErrorStart`/`End` are not error codes, they're for comparing the numeric values to a range.
Given this is an enum **class** and we have to cast to int to do comparisons, I don't think these belong inside the enum, but rather as ints, outside it.
However, these limits aren't used at all yet, so probably just remove them for now.
https://reviews.llvm.org/D39718
More information about the cfe-commits
mailing list