Usually the cfe-dev mailing list is better for questions like this. The type “int” is ASTContext::IntTy. You can use QualType::withConst to add a “const” qualifier, and ASTContext::getPointerType to construct a pointer type. Putting that together, you can construct a “const int*” with something like “Context->getPointerType(Context->IntTy.withConst())”.
If you haven’t looked at the documentation yet, you might want to read https://clang.llvm.org/docs/IntroductionToTheClangAST.html and https://clang.llvm.org/docs/InternalsManual.html . -Eli From: cfe-commits <cfe-commits-boun...@lists.llvm.org> On Behalf Of Monalisa Rout via cfe-commits Sent: Thursday, August 15, 2019 7:03 AM To: cfe-commits@lists.llvm.org Subject: [EXT] QualType Hello, I want to create QualType instances for const int, int* const, and const int* const. How can I do that?? Regards, Mona
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits