mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
__FILE__ macro is not escaped, bug 288800.
This commit is contained in:
parent
d4d9d8d5cc
commit
b7d18ff2d0
1 changed files with 3 additions and 2 deletions
|
@ -10,9 +10,10 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.parser.scanner;
|
||||
|
||||
import com.ibm.icu.text.DateFormatSymbols;
|
||||
import java.util.Calendar;
|
||||
|
||||
import com.ibm.icu.text.DateFormatSymbols;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ILinkage;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IMacroBinding;
|
||||
|
@ -360,7 +361,7 @@ final class FileMacro extends DynamicMacro {
|
|||
@Override
|
||||
public Token execute(MacroExpander expander) {
|
||||
StringBuffer buffer = new StringBuffer("\""); //$NON-NLS-1$
|
||||
buffer.append(expander.getCurrentFilename());
|
||||
buffer.append(expander.getCurrentFilename().replace("\\", "\\\\")); //$NON-NLS-1$//$NON-NLS-2$
|
||||
buffer.append('\"');
|
||||
return new TokenWithImage(IToken.tSTRING, null, 0, 0, buffer.toString().toCharArray());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue