[PATCH] D46919: [libclang] Deprecate CXPrintingPolicy_IncludeTagDefinition

Joel E. Denny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 21 15:33:13 PDT 2018


jdenny added a comment.

In https://reviews.llvm.org/D46919#1101268, @jdenny wrote:

> In https://reviews.llvm.org/D46919#1100493, @rsmith wrote:
>
> > The deprecated enumerator is also referenced by `tools/c-index-test/c-index-test.c`
>
>
> This test prompted me to keep the IncludeTagDefinition member in PrintingPolicy so that clang_PrintingPolicy_getProperty would return the previous value set by clang_PrintingPolicy_setProperty.  Otherwise, the value doesn't have any effect.  Is that self-consistency not worth worrying about?  If so, I'll remove both.


Sorry, I was thinking of a different test.  I've removed the reference you mentioned.



================
Comment at: include/clang/AST/PrettyPrinter.h:97-99
+  /// This flag is deprecated and no longer has any effect.
+  bool IncludeTagDefinition : 1;
+
----------------
rsmith wrote:
> There's no need to keep this around. We have no API stability guarantees for our C++ API.
The test LibclangPrintingPolicyTest in unittests/libclang/LibclangTest.cpp wants  clang_PrintingPolicy_getProperty to return the previous value set by clang_PrintingPolicy_setProperty for every member of CXPrintingPolicyProperty.  Keeping this field makes that possible.


https://reviews.llvm.org/D46919





More information about the cfe-commits mailing list