Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-04-15 11:39:11 +0000
committerMarkus Schorn2008-04-15 11:39:11 +0000
commit54eba1ba200418097a68e7449ff00a669c75dd46 (patch)
tree3741ef1fe7b4bd694adb4ac4b572ac4cea8a2847 /core/org.eclipse.cdt.core
parent51f43ad2c5fbc221325da1867538d06d2979bb78 (diff)
downloadorg.eclipse.cdt-54eba1ba200418097a68e7449ff00a669c75dd46.tar.gz
org.eclipse.cdt-54eba1ba200418097a68e7449ff00a669c75dd46.tar.xz
org.eclipse.cdt-54eba1ba200418097a68e7449ff00a669c75dd46.zip
Restrict references, bug 227110.
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
index c6881faa3b..64c9c11ccd 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
@@ -556,10 +556,15 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
__attribute_decl_seq(supportAttributeSpecifiers, false);
if (LT(1) == IToken.tAMPER) {
- int length = LA(1).getEndOffset() - LA(1).getOffset();
- int o = consume().getOffset();
+// boolean isRestrict= false;
+ IToken lastToken= consume();
+ final int from= lastToken.getOffset();
+ if (allowCPPRestrict && LT(1) == IToken.t_restrict) {
+// isRestrict= true;
+ lastToken= consume();
+ }
ICPPASTReferenceOperator refOp = createReferenceOperator();
- ((ASTNode) refOp).setOffsetAndLength(o, length);
+ ((ASTNode) refOp).setOffsetAndLength(from, lastToken.getEndOffset());
collection.add(refOp);
return;
}

Back to the top