Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNathan Ridge2017-10-04 16:07:35 +0000
committerNathan Ridge2017-10-04 16:07:35 +0000
commit98e1153ba08c78c6cee19d681b8236466369848c (patch)
tree88dd725e46e309334c10f15cacc5ed7e53952063 /core
parentd47cb6c4ea7bdf38d4db9d10efd18a02959b6e31 (diff)
downloadorg.eclipse.cdt-98e1153ba08c78c6cee19d681b8236466369848c.tar.gz
org.eclipse.cdt-98e1153ba08c78c6cee19d681b8236466369848c.tar.xz
org.eclipse.cdt-98e1153ba08c78c6cee19d681b8236466369848c.zip
Add a comment describing the intended uses of CPPSemantics.getCurrentLookupPoint()
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
index 103391b60c8..fbb36114cc1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
@@ -310,6 +310,15 @@ public class CPPSemantics {
public static void popLookupPoint() {
fLookupPoints.get().pop();
}
+ /**
+ * Get the current point of instantiation / point of lookup for name lookups.
+ *
+ * NOTE: This is meant to be used primarily for "declaredBefore" purposes, that is,
+ * for determining whether something was declared before or after the point
+ * of lookup. It is NOT meant to be used as a general mechanism for accessing
+ * information about a call site without having to pass that information along
+ * the usual way (via function arguments).
+ */
public static IASTNode getCurrentLookupPoint() {
Deque<IASTNode> lookupPoints = fLookupPoints.get();
return lookupPoints.isEmpty() ? null : lookupPoints.peek();

Back to the top