================
@@ -530,6 +530,43 @@ def test_pretty(self):
pp.set_property(PrintingPolicyProperty.SuppressTagKeyword, False)
self.assertEqual(f.type.get_canonical().pretty_printed(pp), "struct X")
+ def test_non_reference(self):
+ source = """
+ int dummy;
+ int &reference;
+ """
+ tu = get_tu(source, lang="cpp")
+ dummy = get_cursor(tu, "dummy")
+ reference = get_cursor(tu, "reference")
+ self.assertEqual(reference.type.get_non_reference().spelling, "int")
+ self.assertEqual(dummy.type.spelling,
dummy.type.get_non_reference().spelling)
+
+ def test_unqualified(self):
----------------
YakoYakoYokuYoku wrote:
I know, but this is based on the C API of Clang and [does not mention
anything](https://github.com/llvm/llvm-project/blob/da3ddab6a53ba56b077b80f7db5c3e91b7da52a0/clang/include/clang-c/Index.h#L3383-L3418)
about atomics or arrays. Hence this falls out of scope.
https://github.com/llvm/llvm-project/pull/175534
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits