]> granicus.if.org Git - clang/commit
tblgen: Modularize the diagnostic emitter
authorTobias Grosser <tobias@grosser.es>
Tue, 6 May 2014 22:06:56 +0000 (22:06 +0000)
committerTobias Grosser <tobias@grosser.es>
Tue, 6 May 2014 22:06:56 +0000 (22:06 +0000)
commitf65fb7ca9e242149db4cfc235491e65fab933237
tree7a4fd785793830c56abcf529a93e1d6ad2c447a9
parentafafe70f43dbb614f336ccbede1c4bbb132ec658
tblgen: Modularize the diagnostic emitter

Replace a large monolitic function, with per-table functions which all nicely
fit on my screen. I also added documentation to each function that describes
what kind of tables are generated and which information is contained and
switched to range based for loops. Finally, I run clang-format over the moved
code.

I spent a significant amount of time to understand this code when reasoning
about possible extensions to the diagnostic interface to support 'remark'
diagnostics. This change will definitely help such an implementation, but
already by itself it will save other people a lot of time when trying to
understand this functionality.

Even though the patch touches the full function, it is mostly mechanical. No
functional change intended. The generated tblgen files are identical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208136 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/ClangDiagnosticsEmitter.cpp