[PATCH] D80126: Add educational note records to the .dia format and expose them via libclang
Owen Voorhees via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 18 08:34:36 PDT 2020
owenv created this revision.
Herald added subscribers: cfe-commits, arphaman.
Herald added a project: clang.
An educational note is attached to a diagnostic and is essentially just a path
to associated documentation somewhere in a compiler toolchain. The
documentation can then be displayed alongside emitted diagnostics to teach users
about relevant language concepts or describe common problems and solutions.
This commit adds records for serializing educational notes in .dia files and
adds support for retrieving them from deserialized diagnostics via libclang.
It does not add any mechanisms for emitting educational notes alongside Clang
diagnostics. For now, only downstream projects (swift) support diagnostics
with educational notes
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80126
Files:
clang/include/clang-c/Index.h
clang/include/clang/Frontend/SerializedDiagnosticReader.h
clang/include/clang/Frontend/SerializedDiagnostics.h
clang/lib/Frontend/SerializedDiagnosticPrinter.cpp
clang/lib/Frontend/SerializedDiagnosticReader.cpp
clang/test/Misc/Inputs/serialized-diags-edu-notes.dia
clang/test/Misc/serialized-diags-edu-notes.c
clang/tools/c-index-test/c-index-test.c
clang/tools/libclang/CIndexDiagnostic.cpp
clang/tools/libclang/CIndexDiagnostic.h
clang/tools/libclang/CXLoadedDiagnostic.cpp
clang/tools/libclang/CXLoadedDiagnostic.h
clang/tools/libclang/CXStoredDiagnostic.cpp
clang/tools/libclang/libclang.exports
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80126.264630.patch
Type: text/x-patch
Size: 17998 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200518/911efcb9/attachment-0001.bin>
More information about the cfe-commits
mailing list