[AST][Introspection] Fix args not being set.

This field isn't set in the constructor.
Tweak its accessor to return an ArrayRef.
This commit is contained in:
Nathan James 2021-04-15 00:19:40 +01:00
parent bfb6c2874b
commit 6890f302f5
No known key found for this signature in database
GPG Key ID: CC007AFCDA90AA5F
1 changed files with 5 additions and 5 deletions

View File

@ -37,15 +37,15 @@ public:
enum LocationCallFlags { NoFlags, ReturnsPointer, IsCast }; enum LocationCallFlags { NoFlags, ReturnsPointer, IsCast };
LocationCall(SharedLocationCall on, std::string name, LocationCall(SharedLocationCall on, std::string name,
LocationCallFlags flags = NoFlags) LocationCallFlags flags = NoFlags)
: m_flags(flags), m_on(std::move(on)), m_name(name) {} : m_flags(flags), m_on(std::move(on)), m_name(std::move(name)) {}
LocationCall(SharedLocationCall on, std::string name, LocationCall(SharedLocationCall on, std::string name,
std::vector<std::string> const &args, std::vector<std::string> args, LocationCallFlags flags = NoFlags)
LocationCallFlags flags = NoFlags) : m_flags(flags), m_on(std::move(on)), m_name(std::move(name)),
: m_flags(flags), m_on(std::move(on)), m_name(name) {} m_args(std::move(args)) {}
LocationCall *on() const { return m_on.get(); } LocationCall *on() const { return m_on.get(); }
StringRef name() const { return m_name; } StringRef name() const { return m_name; }
std::vector<std::string> const &args() const { return m_args; } ArrayRef<std::string> args() const { return m_args; }
bool returnsPointer() const { return m_flags & ReturnsPointer; } bool returnsPointer() const { return m_flags & ReturnsPointer; }
bool isCast() const { return m_flags & IsCast; } bool isCast() const { return m_flags & IsCast; }