llvm-project/clang/unittests
Jonathan Coe 45ef5036c9 [libclang] Add PrintingPolicy for pretty printing declarations
Summary:
Introduce clang_getCursorPrettyPrinted() for pretty printing
declarations. Expose also PrintingPolicy, so the user gets more
fine-grained control of the entities being printed.

The already existing clang_getCursorDisplayName() is pretty limited -
for example, it does not handle return types, parameter names or default
arguments for function declarations. Addressing these issues in
clang_getCursorDisplayName() would mean to duplicate existing code
(e.g. clang::DeclPrinter), so rather expose new API to access the
existing functionality.

Reviewed By: jbcoe

Subscribers: cfe-commits

Tags: #clang

Patch by nik (Nikolai Kosjar)

Differential Revision: https://reviews.llvm.org/D39903

llvm-svn: 322540
2018-01-16 10:19:56 +00:00
..
AST [ASTImporter] Support importing CXXUnresolvedConstructExpr and UnresolvedLookupExpr 2018-01-09 16:40:40 +00:00
ASTMatchers [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Analysis [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Basic [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
CodeGen Unit tests for TBAA metadata generation. 2017-12-22 15:22:45 +00:00
CrossTU [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Driver [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Format [clang-format] [NFC] Remove comment 2018-01-13 22:52:34 +00:00
Frontend [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Lex [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral. 2018-01-12 18:54:35 +00:00
Rename [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Rewrite [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Sema [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
StaticAnalyzer [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Tooling Add a tool executor that runs actions on all TUs in the compilation database. 2018-01-05 10:32:16 +00:00
libclang [libclang] Add PrintingPolicy for pretty printing declarations 2018-01-16 10:19:56 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00