1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-30 12:25:35 +02:00

Unconditionally undefine __cplusplus symbol for C files.

This commit is contained in:
Sergey Prigogin 2008-11-23 05:07:30 +00:00
parent b45aa845c2
commit a439019e72

View file

@ -171,14 +171,13 @@ public abstract class PDOMIndexerTask extends AbstractIndexerTask implements IPD
scanInfo= provider.getScannerInformation(file);
if (scanInfo == null || scanInfo.getDefinedSymbols().isEmpty()) {
scanInfo= provider.getScannerInformation(project);
if (linkageID == ILinkage.C_LINKAGE_ID) {
final Map<String, String> definedSymbols = scanInfo.getDefinedSymbols();
definedSymbols.remove("__cplusplus__"); //$NON-NLS-1$
definedSymbols.remove("__cplusplus"); //$NON-NLS-1$
}
}
}
else {
if (linkageID == ILinkage.C_LINKAGE_ID) {
final Map<String, String> definedSymbols = scanInfo.getDefinedSymbols();
definedSymbols.remove("__cplusplus__"); //$NON-NLS-1$
definedSymbols.remove("__cplusplus"); //$NON-NLS-1$
}
} else {
scanInfo= new ScannerInfo();
}
return scanInfo;