[PATCH] D110068: [Clang][AST] Resolve FIXME: Remove ObjCObjectPointer from isSpecifierType
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 20 10:35:12 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2caf7571e102: [Clang][AST] Resolve FIXME: Remove ObjCObjectPointer from (authored by gAlfonso-bit, committed by ahatanak).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110068/new/
https://reviews.llvm.org/D110068
Files:
clang/lib/AST/DeclPrinter.cpp
clang/lib/AST/Type.cpp
Index: clang/lib/AST/Type.cpp
===================================================================
--- clang/lib/AST/Type.cpp
+++ clang/lib/AST/Type.cpp
@@ -2785,7 +2785,6 @@
case DependentTemplateSpecialization:
case ObjCInterface:
case ObjCObject:
- case ObjCObjectPointer: // FIXME: object pointers aren't really specifiers
return true;
default:
return false;
Index: clang/lib/AST/DeclPrinter.cpp
===================================================================
--- clang/lib/AST/DeclPrinter.cpp
+++ clang/lib/AST/DeclPrinter.cpp
@@ -153,11 +153,14 @@
while (!BaseType->isSpecifierType()) {
if (const PointerType *PTy = BaseType->getAs<PointerType>())
BaseType = PTy->getPointeeType();
+ else if (const ObjCObjectPointerType *OPT =
+ BaseType->getAs<ObjCObjectPointerType>())
+ BaseType = OPT->getPointeeType();
else if (const BlockPointerType *BPy = BaseType->getAs<BlockPointerType>())
BaseType = BPy->getPointeeType();
- else if (const ArrayType* ATy = dyn_cast<ArrayType>(BaseType))
+ else if (const ArrayType *ATy = dyn_cast<ArrayType>(BaseType))
BaseType = ATy->getElementType();
- else if (const FunctionType* FTy = BaseType->getAs<FunctionType>())
+ else if (const FunctionType *FTy = BaseType->getAs<FunctionType>())
BaseType = FTy->getReturnType();
else if (const VectorType *VTy = BaseType->getAs<VectorType>())
BaseType = VTy->getElementType();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110068.381017.patch
Type: text/x-patch
Size: 1474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211020/789e80a4/attachment-0001.bin>
More information about the cfe-commits
mailing list