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:
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);
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue