From 2ec6d64b1b58ad08f75ae9a261855b5edfa53862 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 1 Feb 2021 13:49:10 -0500 Subject: [PATCH] Bug 568957 - Missing significant macros on hdrs with pragma once syntax - replace printStackTrace with CCorePlugin.log call Change-Id: I2eb5398cfbd3ebfbfe3ab02acaf40a748699902a --- .../cdt/internal/core/parser/scanner/CPreprocessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java index db48df4bc06..4a8762f0af7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/CPreprocessor.java @@ -179,7 +179,7 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable { T checkFile(String path, boolean isHeuristicMatch, IncludeSearchPathElement onPath); } - final private IIncludeFileTester createCodeReaderTester = new IIncludeFileTester() { + final private IIncludeFileTester createCodeReaderTester = new IIncludeFileTester<>() { @Override public InternalFileContent checkFile(String path, boolean isHeuristicMatch, IncludeSearchPathElement onPath) { final InternalFileContent fc; @@ -189,7 +189,7 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable { try { significantMacros = once.getSignificantMacros(); } catch (CoreException e) { - e.printStackTrace(); + CCorePlugin.log(e); } fc = new InternalFileContent(path, InclusionKind.SKIP_PRAGMA_ONCE_FILE, significantMacros); } else { @@ -213,7 +213,7 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable { } } - final private IIncludeFileTester createPathTester = new IIncludeFileTester() { + final private IIncludeFileTester createPathTester = new IIncludeFileTester<>() { @Override public IncludeResolution checkFile(String path, boolean isHeuristicMatch, IncludeSearchPathElement onPath) { if (fFileContentProvider.getInclusionExists(path)) {