[PATCH] D138377: add clang_Type_getFullyQualifiedName

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 21 08:50:04 PST 2022


aaron.ballman added a comment.

In terms of testing, I'd recommend adding `-test-print-qualified-type` and see if you can thread a qualified vs unqualified parameter through `PrintType()` and friends to try to share as much code as possible. You'll probably need new wrapper functions that calls `PrintType` with the correct argument value depending on which test is being run. WDYT?



================
Comment at: clang/tools/libclang/CXType.cpp:318-325
+  CXTranslationUnit TU = GetTU(CT);
+  SmallString<64> Str;
+  llvm::raw_svector_ostream OS(Str);
+  PrintingPolicy PP(cxtu::getASTUnit(TU)->getASTContext().getLangOpts());
+
+  std::string qname = clang::TypeName::getFullyQualifiedName(
+      T, cxtu::getASTUnit(TU)->getASTContext(), PP);
----------------
Simplifying a bit and fixing up a naming convention nit.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138377/new/

https://reviews.llvm.org/D138377



More information about the cfe-commits mailing list