aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM aside from some nits ================ Comment at: clang/lib/AST/ASTContext.cpp:11962-11963 unsigned ASTContext::getTargetAddressSpace(QualType T) const { - return T->isFunctionType() ? getTargetInfo().getProgramAddressSpace() - : getTargetAddressSpace(T.getQualifiers()); + // For function type, return program address space, unless + // type has address space qualifier + return T->isFunctionType() && !T.hasAddressSpace() ---------------- How about something like that? ================ Comment at: clang/test/CodeGen/address-space-ptr32.c:3 + +int foo() { + int (*__ptr32 a)(int); ---------------- CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119045/new/ https://reviews.llvm.org/D119045 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits