================
@@ -1303,18 +1305,25 @@ class ObjCInterfaceTypeLoc : public
ConcreteTypeLoc<ObjCObjectTypeLoc,
}
};
-struct BoundsAttributedLocInfo {};
+struct BoundsAttributedLocInfo {
+ SourceRange Range;
+};
class BoundsAttributedTypeLoc
: public ConcreteTypeLoc<UnqualTypeLoc, BoundsAttributedTypeLoc,
BoundsAttributedType, BoundsAttributedLocInfo> {
public:
TypeLoc getInnerLoc() const { return getInnerTypeLoc(); }
QualType getInnerType() const { return getTypePtr()->desugar(); }
void initializeLocal(ASTContext &Context, SourceLocation Loc) {
- // nothing to do
+ setAttrRange({Loc, Loc});
}
- // LocalData is empty and TypeLocBuilder doesn't handle DataSize 1.
- unsigned getLocalDataSize() const { return 0; }
+ void setAttrRange(SourceRange Range) { getLocalData()->Range = Range; }
+ SourceRange getAttrRange() const { return getLocalData()->Range; }
+
+ StringRef getAttrNameAsWritten(Sema &S) const;
+ SourceRange getAttrNameRange(Sema &S) const;
----------------
AaronBallman wrote:
These APIs are problematic due to layering.
https://github.com/llvm/llvm-project/pull/167287
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits