Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2013-08-02 16:52:42 -0400
committerSergey Prigogin2013-08-02 16:52:42 -0400
commit983f7529a35143a6dec649656b1713e92df54f33 (patch)
tree44ecc559d64fb61f273ddf74a6553d905818ee4b /codan/org.eclipse.cdt.codan.checkers
parent2cb5f8a29ab44fb4ced00802205fd20d0b4d30bb (diff)
downloadorg.eclipse.cdt-983f7529a35143a6dec649656b1713e92df54f33.tar.gz
org.eclipse.cdt-983f7529a35143a6dec649656b1713e92df54f33.tar.xz
org.eclipse.cdt-983f7529a35143a6dec649656b1713e92df54f33.zip
Bug 45203. Support for symbols exported by multiple headers.
Diffstat (limited to 'codan/org.eclipse.cdt.codan.checkers')
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java
index f07a4c9fe1..e31479df2c 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/AbstractClassInstantiationChecker.java
@@ -41,6 +41,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
import org.eclipse.cdt.core.dom.ast.cpp.SemanticQueries;
+import org.eclipse.cdt.core.parser.util.StringUtil;
/**
* Reports a problem if object of a class cannot be created because
@@ -170,13 +171,7 @@ public class AbstractClassInstantiationChecker extends AbstractIndexAstChecker {
private String resolveName(ICPPBinding binding) {
try {
if (binding.isGloballyQualified()) {
- StringBuilder buf = new StringBuilder();
- for (String item : binding.getQualifiedName()) {
- if (buf.length() != 0)
- buf.append("::"); //$NON-NLS-1$
- buf.append(item);
- }
- return buf.toString();
+ return StringUtil.join(binding.getQualifiedName(), "::"); //$NON-NLS-1$
}
} catch (DOMException e) {
CodanCheckersActivator.log(e);

Back to the top