[PATCH] D39903: [libclang] Allow pretty printing declarations

Nikolai Kosjar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 11 03:51:09 PST 2018


nik updated this revision to Diff 129426.
nik added a comment.

> Could one use an enum to get/set different properties of the policy?
> 
> I've seen other C-API's (for Linear and Quadratic programming) follow a similar approach quite extensibly.
> 
> It would significantly reduce the size of the API.

You are right and rethinking this, I see no problem with it. I thought of that too (see my very first comment to this change), but then for some reason the PrintingPolicy::Indentation (unsigned : 8) has driven me to this version. I probably have only thought of strictly false/true values to set/get.

OK, adapted to enum version.


Repository:
  rC Clang

https://reviews.llvm.org/D39903

Files:
  include/clang-c/Index.h
  test/Index/print-display-names.cpp
  tools/c-index-test/c-index-test.c
  tools/libclang/CIndex.cpp
  tools/libclang/libclang.exports

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39903.129426.patch
Type: text/x-patch
Size: 19030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180111/7c1ac63e/attachment-0001.bin>


More information about the cfe-commits mailing list