Merge remote-tracking branch 'origin/develop' into breaking

This commit is contained in:
chriseth
2020-06-15 17:11:41 +02:00
132 changed files with 1083 additions and 417 deletions
+10 -2
View File
@@ -113,14 +113,22 @@ public:
/// @returns a copy of @a _type having the same location as this (and is not a pointer type)
/// if _type is a reference type and an unmodified copy of _type otherwise.
/// This function is mostly useful to modify inner types appropriately.
static Type const* withLocationIfReference(DataLocation _location, Type const* _type)
static Type const* withLocationIfReference(DataLocation _location, Type const* _type, bool _isPointer = false)
{
if (auto refType = dynamic_cast<ReferenceType const*>(_type))
return withLocation(refType, _location, false);
return withLocation(refType, _location, _isPointer);
return _type;
}
static bool isReferenceWithLocation(Type const* _type, DataLocation _location)
{
if (auto const* refType = dynamic_cast<ReferenceType const*>(_type))
if (refType->location() == _location)
return true;
return false;
}
/// @returns the internally-facing or externally-facing type of a function or the type of a function declaration.
static FunctionType const* function(FunctionDefinition const& _function, FunctionType::Kind _kind = FunctionType::Kind::Declaration);