summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/cplusplus')
-rw-r--r--src/shared/cplusplus/Scope.cpp8
-rw-r--r--src/shared/cplusplus/Scope.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Scope.cpp b/src/shared/cplusplus/Scope.cpp
index 86503826d7..9743e98e44 100644
--- a/src/shared/cplusplus/Scope.cpp
+++ b/src/shared/cplusplus/Scope.cpp
@@ -187,6 +187,14 @@ bool Scope::isFunctionScope() const
return false;
}
+bool Scope::isObjCMethodScope() const
+{
+ ObjCMethod *m = 0;
+ if (_owner && 0 != (m = _owner->asObjCMethod()))
+ return m->arguments() != this;
+ return false;
+}
+
void Scope::enterSymbol(Symbol *symbol)
{
if (++_symbolCount == _allocatedSymbols) {
diff --git a/src/shared/cplusplus/Scope.h b/src/shared/cplusplus/Scope.h
index a31b6459be..25df03a25e 100644
--- a/src/shared/cplusplus/Scope.h
+++ b/src/shared/cplusplus/Scope.h
@@ -114,6 +114,9 @@ public:
/// Returns true if this scope's owner is an ObjCClass Symbol.
bool isObjCClassScope() const;
+ /// Returns true if this scope's owner is an ObjCMethod symbol.
+ bool isObjCMethodScope() const;
+
/// Adds a Symbol to this Scope.
void enterSymbol(Symbol *symbol);