Sema: add a helper for enumerating the TST id (NFC)
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 21 Jun 2015 23:05:52 +0000 (23:05 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 21 Jun 2015 23:05:52 +0000 (23:05 +0000)
commit2e08f506059930af5af1d450ae2685f9ed8040fe
tree9c27997eb240ad9a69a5a64902a94cad46dd42c6
parenta77336bd5dc4eb2f3cf300a88c918aa2f7d4c108
Sema: add a helper for enumerating the TST id (NFC)

The same pattern was repeated a few times.  Create a trivial helper method to
map the Type Specifier to an ID for the diagnostic.  Flip the selection order on
one of the diagnostic messages to get the same ordering across all of the
messages.  This makes the emission of the diagnostic slightly more legible by
changing the cascading ternary into a switch in a function.  NFC.

llvm-svn: 240251
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDecl.cpp