Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivian Kong2010-08-11 17:09:24 -0400
committerVivian Kong2010-08-11 17:09:24 -0400
commit8951c5d12bbdffe3ec2c408627f1a9304aed4214 (patch)
tree86b0705ab43c1ec8ad1aa225280da7fb75f96bbf /lrparser/org.eclipse.cdt.core.lrparser
parent1735b0d4edd3507abf4c2528c3ab97cc3c5fcf53 (diff)
downloadorg.eclipse.cdt-8951c5d12bbdffe3ec2c408627f1a9304aed4214.tar.gz
org.eclipse.cdt-8951c5d12bbdffe3ec2c408627f1a9304aed4214.tar.xz
org.eclipse.cdt-8951c5d12bbdffe3ec2c408627f1a9304aed4214.zip
Bug 322426 Add copy implementation to CPPASTAmbiguousTemplateArgument class for John Liu
Diffstat (limited to 'lrparser/org.eclipse.cdt.core.lrparser')
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java
index 99a1629a7f..a7ca0726c8 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java
@@ -478,16 +478,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
IASTExpression expr = (IASTExpression) astStack.peek();
if(expr instanceof IASTIdExpression) {
- IASTName orgName =((IASTIdExpression)expr).getName();
- IASTName name = null;
- try{
- name = orgName.copy();
- //if there is node throws UnsupportedOperationException in copy, just use the original node
- } catch(UnsupportedOperationException ue){
- name = orgName;
- }
-
- ParserUtil.setOffsetAndLength(name, expr);
+ IASTName name = ((IASTIdExpression)expr).getName().copy();
IASTNamedTypeSpecifier declSpec = nodeFactory.newTypedefNameSpecifier(name);
ParserUtil.setOffsetAndLength(declSpec, name);

Back to the top