Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2005-08-04 23:25:09 +0000
committerAlain Magloire2005-08-04 23:25:09 +0000
commitbe20b267ca5d4a11c40ec69fb34b718f08897ac4 (patch)
tree302f4586fec31577f6807ffdf3c94a5b7cbc1491
parent712823b2e4fff06ae4d9be6689d740c0f237c77e (diff)
downloadorg.eclipse.cdt-be20b267ca5d4a11c40ec69fb34b718f08897ac4.tar.gz
org.eclipse.cdt-be20b267ca5d4a11c40ec69fb34b718f08897ac4.tar.xz
org.eclipse.cdt-be20b267ca5d4a11c40ec69fb34b718f08897ac4.zip
2005-08-04 Alain Magloire
Part fix for PR 100992: The signature was incorrect for structure/unions. * model/org/eclipse/cdt/internal/core/model/CModelBuilder.java
-rw-r--r--core/org.eclipse.cdt.core/ChangeLog4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder.java16
2 files changed, 19 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog
index 961fc28cf78..063e5002056 100644
--- a/core/org.eclipse.cdt.core/ChangeLog
+++ b/core/org.eclipse.cdt.core/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-04 Alain Magloire
+ Part fix for PR 100992: The signature was incorrect for structure/unions.
+ * model/org/eclipse/cdt/internal/core/model/CModelBuilder.java
+
2005-03-02 Alain Magloire
Fix PR 84527: PathEntryManager marker jobs were start to often.
Scalabilite issue.
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder.java
index 3a6ca5698c8..c9d8bbbf94f 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder.java
@@ -19,7 +19,9 @@ import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IParent;
import org.eclipse.cdt.core.model.IProblemRequestor;
+import org.eclipse.cdt.core.model.IStructure;
import org.eclipse.cdt.core.model.ITemplate;
+import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.core.parser.CodeReader;
import org.eclipse.cdt.core.parser.IParser;
import org.eclipse.cdt.core.parser.IProblem;
@@ -655,7 +657,7 @@ public class CModelBuilder {
FunctionDeclaration element = null;
- if( functionDeclaration instanceof IASTMethod )
+ if( functionDeclaration instanceof IASTMethod && parent instanceof IStructure)
{
IASTMethod methodDeclaration = (IASTMethod) functionDeclaration;
MethodDeclaration methodElement = null;
@@ -700,6 +702,18 @@ public class CModelBuilder {
}
else // instance of IASTFunction
{
+ if (parent instanceof ITranslationUnit) {
+ String[] names = functionDeclaration.getFullyQualifiedName();
+ StringBuffer buf = new StringBuffer();
+ for (int i = 0; i < names.length; ++i) {
+ if (buf.length() != 0) {
+ buf.append("::"); //$NON-NLS-1$
+ }
+ buf.append(names[i]);
+ }
+ name = buf.toString();
+ }
+
FunctionDeclaration functionElement = null;
if (functionDeclaration.hasFunctionBody())
{

Back to the top