Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/LocationMap.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/LocationMap.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/LocationMap.java
index d135679191a..cd9d0f8d956 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/LocationMap.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/LocationMap.java
@@ -10,6 +10,10 @@
**********************************************************************/
package org.eclipse.cdt.internal.core.parser.scanner2;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.cdt.core.dom.ast.IASTMacroDefinition;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTNodeLocation;
@@ -22,6 +26,8 @@ import org.eclipse.cdt.core.parser.IProblem;
*/
public class LocationMap implements ILocationResolver, IScannerPreprocessorLog {
+ private List problems = Collections.EMPTY_LIST;
+
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.scanner2.ILocationResolver#getMacroDefinitions()
*/
@@ -237,16 +243,16 @@ public class LocationMap implements ILocationResolver, IScannerPreprocessorLog {
* @see org.eclipse.cdt.internal.core.parser.scanner2.ILocationResolver#getScannerProblems()
*/
public IProblem[] getScannerProblems() {
- // TODO Auto-generated method stub
- return null;
+ return (IProblem[]) problems.toArray( new IProblem[ problems.size() ]);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerPreprocessorLog#encounterIProblem(org.eclipse.cdt.core.parser.IProblem)
*/
public void encounterProblem(IProblem problem) {
- // TODO Auto-generated method stub
-
+ if( problems == Collections.EMPTY_LIST )
+ problems = new ArrayList( 4 );
+ problems.add(problem);
}
}

Back to the top