mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 21:35:40 +02:00
Unconditionally undefine __cplusplus symbol for C files.
This commit is contained in:
parent
b45aa845c2
commit
a439019e72
1 changed files with 6 additions and 7 deletions
|
@ -171,14 +171,13 @@ public abstract class PDOMIndexerTask extends AbstractIndexerTask implements IPD
|
||||||
scanInfo= provider.getScannerInformation(file);
|
scanInfo= provider.getScannerInformation(file);
|
||||||
if (scanInfo == null || scanInfo.getDefinedSymbols().isEmpty()) {
|
if (scanInfo == null || scanInfo.getDefinedSymbols().isEmpty()) {
|
||||||
scanInfo= provider.getScannerInformation(project);
|
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$
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
if (linkageID == ILinkage.C_LINKAGE_ID) {
|
||||||
else {
|
final Map<String, String> definedSymbols = scanInfo.getDefinedSymbols();
|
||||||
|
definedSymbols.remove("__cplusplus__"); //$NON-NLS-1$
|
||||||
|
definedSymbols.remove("__cplusplus"); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
} else {
|
||||||
scanInfo= new ScannerInfo();
|
scanInfo= new ScannerInfo();
|
||||||
}
|
}
|
||||||
return scanInfo;
|
return scanInfo;
|
||||||
|
|
Loading…
Add table
Reference in a new issue