================
@@ -23,28 +23,29 @@ llvm::ArrayRef<DiagnosticRecord> 
diagtool::getBuiltinDiagnosticsByName() {
   return llvm::ArrayRef(BuiltinDiagnosticsByName);
 }
 
-
 // FIXME: Is it worth having two tables, especially when this one can get
 // out of sync easily?
+// clang-format off
----------------
kadircet wrote:

also it's unclear where the "ground truth" for this order is coming from. 
AFAICT, order is defined by 
https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/DiagnosticIDs.h#L49-L65
and enforced by very subtle interactions between tablegen and how particular 
headers include these.

since this order needs to be preserved in multiple places, can you put together 
a wrapper header, which includes individual diagnostic kinds in the specific 
order and explain the relationship between these pieces? (I'd rather have a 
solution that puts all of this logic into tablegen instead, generating enums 
with a particular order once, but I can see that's a much bigger change that 
you might not want to sign up).

https://github.com/llvm/llvm-project/pull/120321
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to