diff options
author | Brad King <brad.king@kitware.com> | 2016-03-16 18:50:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-16 19:11:28 (GMT) |
commit | 86c6385eee64dcd3107a59b443e5a89f854d9da9 (patch) | |
tree | 8f632be6db6b0d0be2b1f2f38f2a3b5919174d45 /test/cc-msvc.cmake | |
parent | d49f98f75a252b1ce0382fa2e9e0345710b96ffb (diff) | |
download | CastXML-86c6385eee64dcd3107a59b443e5a89f854d9da9.zip CastXML-86c6385eee64dcd3107a59b443e5a89f854d9da9.tar.gz CastXML-86c6385eee64dcd3107a59b443e5a89f854d9da9.tar.bz2 |
Output: Print canonical form of types named in default arguments
In code like
namespace ns {
typedef unsigned int UI;
void f(UI = (UI)0);
}
we previously generated `default="(UI)0"` for the default argument of
`f` because Clang prints the expression as it was written in the source.
GCC-XML would generate the canonical typed value `default="0u"`.
Ideally we should generate `default="(ns::UI)0"` but Clang does not
offer hooks into its type printing API. Instead we can produce a value
which is useful to tools reading the output by printing the cast with a
canonical type like `default="(unsigned int)0"`. In the case that the
type names a struct or class the canonical type will be printed as the
fully qualified name.
GitHub-Issue: CastXML/CastXML#51
Diffstat (limited to 'test/cc-msvc.cmake')
0 files changed, 0 insertions, 0 deletions