1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 15:25:49 +02:00

Configure gcc-extensions as keywords, rather than macros, bug 226112.

This commit is contained in:
Markus Schorn 2008-04-08 12:50:31 +00:00
parent 61cc1a811f
commit 52d3320503
7 changed files with 93 additions and 69 deletions

View file

@ -4446,4 +4446,15 @@ public class AST2Tests extends AST2BaseTest {
parseAndCheckBindings(code, ParserLanguage.C); parseAndCheckBindings(code, ParserLanguage.C);
parseAndCheckBindings(code, ParserLanguage.CPP); parseAndCheckBindings(code, ParserLanguage.CPP);
} }
// #define __inline__ __inline__ __attribute__((always_inline))
// typedef int __u32;
// static __inline__ __u32 f(int x) {
// return x;
// }
public void testRedefinedGCCKeywords_Bug226112() throws Exception {
final String code = getAboveComment();
parseAndCheckBindings(code, ParserLanguage.C, true);
parseAndCheckBindings(code, ParserLanguage.CPP, true);
}
} }

View file

@ -12,8 +12,11 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.parser; package org.eclipse.cdt.core.dom.parser;
import org.eclipse.cdt.core.parser.GCCKeywords;
import org.eclipse.cdt.core.parser.IGCCToken;
import org.eclipse.cdt.core.parser.IMacro; import org.eclipse.cdt.core.parser.IMacro;
import org.eclipse.cdt.core.parser.IPreprocessorDirective; import org.eclipse.cdt.core.parser.IPreprocessorDirective;
import org.eclipse.cdt.core.parser.IToken;
import org.eclipse.cdt.core.parser.Keywords; import org.eclipse.cdt.core.parser.Keywords;
import org.eclipse.cdt.core.parser.util.CharArrayIntMap; import org.eclipse.cdt.core.parser.util.CharArrayIntMap;
@ -23,21 +26,12 @@ import org.eclipse.cdt.core.parser.util.CharArrayIntMap;
public abstract class GNUScannerExtensionConfiguration extends AbstractScannerExtensionConfiguration { public abstract class GNUScannerExtensionConfiguration extends AbstractScannerExtensionConfiguration {
private static IMacro[] sAdditionalMacros= new IMacro[] { private static IMacro[] sAdditionalMacros= new IMacro[] {
createMacro("__asm__", "asm"), //$NON-NLS-1$//$NON-NLS-2$
createMacro("__complex__", "_Complex"), //$NON-NLS-1$ //$NON-NLS-2$ createMacro("__complex__", "_Complex"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__const__", "const"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__const", "const"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__extension__", ""), //$NON-NLS-1$ //$NON-NLS-2$ createMacro("__extension__", ""), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__inline__", "inline"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__imag__", "(int)"), //$NON-NLS-1$ //$NON-NLS-2$ createMacro("__imag__", "(int)"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__null", "(void *)0"), //$NON-NLS-1$ //$NON-NLS-2$ createMacro("__null", "(void *)0"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__real__", "(int)"), //$NON-NLS-1$ //$NON-NLS-2$ createMacro("__real__", "(int)"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__restrict__", "restrict"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__restrict", "restrict"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__volatile__", "volatile"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__signed__", "signed"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__stdcall", ""), //$NON-NLS-1$ //$NON-NLS-2$ createMacro("__stdcall", ""), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__typeof__", "typeof"), //$NON-NLS-1$ //$NON-NLS-2$
createMacro("__builtin_va_arg(ap,type)", "*(type *)ap"), //$NON-NLS-1$//$NON-NLS-2$ createMacro("__builtin_va_arg(ap,type)", "*(type *)ap"), //$NON-NLS-1$//$NON-NLS-2$
createMacro("__builtin_constant_p(exp)", "0") //$NON-NLS-1$//$NON-NLS-2$ createMacro("__builtin_constant_p(exp)", "0") //$NON-NLS-1$//$NON-NLS-2$
@ -46,23 +40,43 @@ public abstract class GNUScannerExtensionConfiguration extends AbstractScannerEx
public static IMacro[] getAdditionalGNUMacros() { public static IMacro[] getAdditionalGNUMacros() {
return sAdditionalMacros; return sAdditionalMacros;
} }
public boolean support$InIdentifiers() { public static void addAdditionalGNUKeywords(CharArrayIntMap target) {
target.put(GCCKeywords.cp__ALIGNOF__, IGCCToken.t___alignof__ );
target.put(GCCKeywords.cp__ASM__, IToken.t_asm);
target.put(GCCKeywords.cp__ATTRIBUTE__, IGCCToken.t__attribute__ );
target.put(GCCKeywords.cp__CONST, IToken.t_const);
target.put(GCCKeywords.cp__CONST__, IToken.t_const);
target.put(GCCKeywords.cp__DECLSPEC, IGCCToken.t__declspec );
target.put(GCCKeywords.cp__INLINE__, IToken.t_inline);
target.put(GCCKeywords.cp__RESTRICT, IToken.t_restrict);
target.put(GCCKeywords.cp__RESTRICT__, IToken.t_restrict);
target.put(GCCKeywords.cp__VOLATILE__, IToken.t_volatile);
target.put(GCCKeywords.cp__SIGNED__, IToken.t_signed);
target.put(GCCKeywords.cp__TYPEOF__, IGCCToken.t_typeof);
target.put(GCCKeywords.cpTYPEOF, IGCCToken.t_typeof );
}
@Override
public boolean support$InIdentifiers() {
return true; return true;
} }
public char[] supportAdditionalNumericLiteralSuffixes() { @Override
public char[] supportAdditionalNumericLiteralSuffixes() {
return "ij".toCharArray(); //$NON-NLS-1$ return "ij".toCharArray(); //$NON-NLS-1$
} }
public IMacro[] getAdditionalMacros() { @Override
public IMacro[] getAdditionalMacros() {
return sAdditionalMacros; return sAdditionalMacros;
} }
/* /*
* @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerExtensionConfiguration#getAdditionalPreprocessorKeywords() * @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerExtensionConfiguration#getAdditionalPreprocessorKeywords()
*/ */
public CharArrayIntMap getAdditionalPreprocessorKeywords() { @Override
public CharArrayIntMap getAdditionalPreprocessorKeywords() {
CharArrayIntMap additionalPPKeywords= new CharArrayIntMap(8, IPreprocessorDirective.ppInvalid); CharArrayIntMap additionalPPKeywords= new CharArrayIntMap(8, IPreprocessorDirective.ppInvalid);
additionalPPKeywords.put(Keywords.cINCLUDE_NEXT, IPreprocessorDirective.ppInclude_next); additionalPPKeywords.put(Keywords.cINCLUDE_NEXT, IPreprocessorDirective.ppInclude_next);
additionalPPKeywords.put(Keywords.cIMPORT, IPreprocessorDirective.ppImport); additionalPPKeywords.put(Keywords.cIMPORT, IPreprocessorDirective.ppImport);
@ -73,5 +87,4 @@ public abstract class GNUScannerExtensionConfiguration extends AbstractScannerEx
additionalPPKeywords.put(Keywords.cUNASSERT, IPreprocessorDirective.ppIgnore); additionalPPKeywords.put(Keywords.cUNASSERT, IPreprocessorDirective.ppIgnore);
return additionalPPKeywords; return additionalPPKeywords;
} }
} }

View file

@ -1,19 +1,18 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2007 IBM Corporation and others. * Copyright (c) 2004, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM - Initial API and implementation * IBM - Initial API and implementation
* Ed Swartz (Nokia) * Ed Swartz (Nokia)
* Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.parser.c; package org.eclipse.cdt.core.dom.parser.c;
import org.eclipse.cdt.core.dom.parser.GNUScannerExtensionConfiguration; import org.eclipse.cdt.core.dom.parser.GNUScannerExtensionConfiguration;
import org.eclipse.cdt.core.parser.GCCKeywords;
import org.eclipse.cdt.core.parser.IGCCToken;
import org.eclipse.cdt.core.parser.IMacro; import org.eclipse.cdt.core.parser.IMacro;
import org.eclipse.cdt.core.parser.util.CharArrayIntMap; import org.eclipse.cdt.core.parser.util.CharArrayIntMap;
@ -23,17 +22,22 @@ import org.eclipse.cdt.core.parser.util.CharArrayIntMap;
public class GCCScannerExtensionConfiguration extends GNUScannerExtensionConfiguration { public class GCCScannerExtensionConfiguration extends GNUScannerExtensionConfiguration {
private static IMacro[] sAdditionalMacros; private static IMacro[] sAdditionalMacros;
private static CharArrayIntMap sAdditionalKeywords;
static { static {
final IMacro[] macros = GNUScannerExtensionConfiguration.getAdditionalGNUMacros(); final IMacro[] macros = GNUScannerExtensionConfiguration.getAdditionalGNUMacros();
sAdditionalMacros= new IMacro[macros.length+1]; sAdditionalMacros= new IMacro[macros.length+1];
System.arraycopy(macros, 0, sAdditionalMacros, 0, macros.length); System.arraycopy(macros, 0, sAdditionalMacros, 0, macros.length);
sAdditionalMacros[macros.length]= createMacro("_Pragma(arg)", ""); //$NON-NLS-1$//$NON-NLS-2$ sAdditionalMacros[macros.length]= createMacro("_Pragma(arg)", ""); //$NON-NLS-1$//$NON-NLS-2$
sAdditionalKeywords= new CharArrayIntMap(10, -1);
GNUScannerExtensionConfiguration.addAdditionalGNUKeywords(sAdditionalKeywords);
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#supportMinAndMaxOperators() * @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#supportMinAndMaxOperators()
*/ */
public boolean supportMinAndMaxOperators() { @Override
public boolean supportMinAndMaxOperators() {
return false; return false;
} }
@ -41,20 +45,17 @@ public class GCCScannerExtensionConfiguration extends GNUScannerExtensionConfigu
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#getAdditionalMacros() * @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#getAdditionalMacros()
*/ */
public IMacro[] getAdditionalMacros() { @Override
public IMacro[] getAdditionalMacros() {
return sAdditionalMacros; return sAdditionalMacros;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#getAdditionalKeywords() * @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#getAdditionalKeywords()
*/ */
public CharArrayIntMap getAdditionalKeywords() { @Override
CharArrayIntMap result = new CharArrayIntMap( 4, -1 ); public CharArrayIntMap getAdditionalKeywords() {
result.put( GCCKeywords.cp__ALIGNOF__, IGCCToken.t___alignof__ ); return sAdditionalKeywords;
result.put( GCCKeywords.cpTYPEOF, IGCCToken.t_typeof );
result.put( GCCKeywords.cp__ATTRIBUTE__, IGCCToken.t__attribute__ );
result.put( GCCKeywords.cp__DECLSPEC, IGCCToken.t__declspec );
return result;
} }
} }

View file

@ -1,20 +1,19 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2007 IBM Corporation and others. * Copyright (c) 2004, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM - Initial API and implementation * IBM - Initial API and implementation
* Ed Swartz (Nokia) * Ed Swartz (Nokia)
* Anton Leherbauer (Wind River Systems) * Anton Leherbauer (Wind River Systems)
* Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.parser.cpp; package org.eclipse.cdt.core.dom.parser.cpp;
import org.eclipse.cdt.core.dom.parser.GNUScannerExtensionConfiguration; import org.eclipse.cdt.core.dom.parser.GNUScannerExtensionConfiguration;
import org.eclipse.cdt.core.parser.GCCKeywords;
import org.eclipse.cdt.core.parser.IGCCToken;
import org.eclipse.cdt.core.parser.IToken; import org.eclipse.cdt.core.parser.IToken;
import org.eclipse.cdt.core.parser.Keywords; import org.eclipse.cdt.core.parser.Keywords;
import org.eclipse.cdt.core.parser.util.CharArrayIntMap; import org.eclipse.cdt.core.parser.util.CharArrayIntMap;
@ -24,26 +23,28 @@ import org.eclipse.cdt.core.parser.util.CharArrayIntMap;
*/ */
public class GPPScannerExtensionConfiguration extends GNUScannerExtensionConfiguration { public class GPPScannerExtensionConfiguration extends GNUScannerExtensionConfiguration {
private static CharArrayIntMap sAdditionalKeywords;
static {
sAdditionalKeywords= new CharArrayIntMap(10, -1);
GNUScannerExtensionConfiguration.addAdditionalGNUKeywords(sAdditionalKeywords);
sAdditionalKeywords.put( Keywords.cRESTRICT, IToken.t_restrict );
sAdditionalKeywords.put( Keywords.c_COMPLEX, IToken.t__Complex );
sAdditionalKeywords.put( Keywords.c_IMAGINARY, IToken.t__Imaginary );
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#supportMinAndMaxOperators() * @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#supportMinAndMaxOperators()
*/ */
public boolean supportMinAndMaxOperators() { @Override
public boolean supportMinAndMaxOperators() {
return true; return true;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#getAdditionalKeywords() * @see org.eclipse.cdt.internal.core.parser.scanner2.IScannerConfiguration#getAdditionalKeywords()
*/ */
public CharArrayIntMap getAdditionalKeywords() { @Override
CharArrayIntMap additionalCPPKeywords = new CharArrayIntMap( 8, -1 ); public CharArrayIntMap getAdditionalKeywords() {
additionalCPPKeywords.put( GCCKeywords.cp__ALIGNOF__, IGCCToken.t___alignof__ ); return sAdditionalKeywords;
additionalCPPKeywords.put( GCCKeywords.cpTYPEOF, IGCCToken.t_typeof );
additionalCPPKeywords.put( GCCKeywords.cp__ATTRIBUTE__, IGCCToken.t__attribute__ );
additionalCPPKeywords.put( Keywords.cRESTRICT, IToken.t_restrict );
additionalCPPKeywords.put( Keywords.c_COMPLEX, IToken.t__Complex );
additionalCPPKeywords.put( Keywords.c_IMAGINARY, IToken.t__Imaginary );
additionalCPPKeywords.put( GCCKeywords.cp__DECLSPEC, IGCCToken.t__declspec );
return additionalCPPKeywords;
} }
} }

View file

@ -1,15 +1,14 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2007 IBM Corporation and others. * Copyright (c) 2002, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM Rational Software - Initial API and implementation * IBM Rational Software - Initial API and implementation
* Ed Swartz (Nokia) * Ed Swartz (Nokia)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.parser; package org.eclipse.cdt.core.parser;
/** /**
@ -28,4 +27,13 @@ public class GCCKeywords {
public static final char [] cp__ATTRIBUTE__ = __ATTRIBUTE__.toCharArray(); public static final char [] cp__ATTRIBUTE__ = __ATTRIBUTE__.toCharArray();
public static final char [] cp__DECLSPEC = __DECLSPEC.toCharArray(); public static final char [] cp__DECLSPEC = __DECLSPEC.toCharArray();
public static final char [] cp__ASM__= "__asm__".toCharArray(); //$NON-NLS-1$
public static final char [] cp__CONST__= "__const__".toCharArray(); //$NON-NLS-1$
public static final char [] cp__CONST= "__const".toCharArray(); //$NON-NLS-1$
public static final char [] cp__INLINE__= "__inline__".toCharArray(); //$NON-NLS-1$
public static final char [] cp__RESTRICT__= "__restrict__".toCharArray(); //$NON-NLS-1$
public static final char [] cp__RESTRICT= "__restrict".toCharArray(); //$NON-NLS-1$
public static final char [] cp__VOLATILE__= "__volatile__".toCharArray(); //$NON-NLS-1$
public static final char [] cp__SIGNED__= "__signed__".toCharArray(); //$NON-NLS-1$
public static final char [] cp__TYPEOF__= "__typeof__".toCharArray(); //$NON-NLS-1$
} }

View file

@ -36,24 +36,15 @@ public class CompletionTest_MacroRef_NoPrefix extends CompletionProposalsBaseTe
"__LINE__", "__LINE__",
"__STDC__", "__STDC__",
"__TIME__", "__TIME__",
"__asm__",
"__builtin_constant_p(exp)", "__builtin_constant_p(exp)",
"__builtin_va_arg(ap, type)", "__builtin_va_arg(ap, type)",
"__complex__", "__complex__",
"__const",
"__const__",
"__cplusplus", "__cplusplus",
"__extension__", "__extension__",
"__imag__", "__imag__",
"__inline__",
"__null", "__null",
"__real__", "__real__",
"__restrict",
"__restrict__",
"__signed__",
"__stdcall", "__stdcall",
"__volatile__",
"__typeof__"
}; };
public CompletionTest_MacroRef_NoPrefix(String name) { public CompletionTest_MacroRef_NoPrefix(String name) {
@ -69,6 +60,7 @@ public class CompletionTest_MacroRef_NoPrefix extends CompletionProposalsBaseTe
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition() * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
*/ */
@Override
protected int getCompletionPosition() { protected int getCompletionPosition() {
return getBuffer().indexOf("#ifdef ") + 7; return getBuffer().indexOf("#ifdef ") + 7;
} }
@ -76,6 +68,7 @@ public class CompletionTest_MacroRef_NoPrefix extends CompletionProposalsBaseTe
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix() * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
*/ */
@Override
protected String getExpectedPrefix() { protected String getExpectedPrefix() {
return expectedPrefix; return expectedPrefix;
} }
@ -83,6 +76,7 @@ public class CompletionTest_MacroRef_NoPrefix extends CompletionProposalsBaseTe
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues() * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
*/ */
@Override
protected String[] getExpectedResultsValues() { protected String[] getExpectedResultsValues() {
return expectedResults; return expectedResults;
} }
@ -90,6 +84,7 @@ public class CompletionTest_MacroRef_NoPrefix extends CompletionProposalsBaseTe
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName() * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
*/ */
@Override
protected String getFileName() { protected String getFileName() {
return fileName; return fileName;
} }
@ -97,12 +92,14 @@ public class CompletionTest_MacroRef_NoPrefix extends CompletionProposalsBaseTe
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath() * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
*/ */
@Override
protected String getFileFullPath() { protected String getFileFullPath() {
return fileFullPath; return fileFullPath;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath() * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
*/ */
@Override
protected String getHeaderFileFullPath() { protected String getHeaderFileFullPath() {
return headerFileFullPath; return headerFileFullPath;
} }
@ -110,6 +107,7 @@ public class CompletionTest_MacroRef_NoPrefix extends CompletionProposalsBaseTe
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName() * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
*/ */
@Override
protected String getHeaderFileName() { protected String getHeaderFileName() {
return headerFileName; return headerFileName;
} }

View file

@ -158,6 +158,7 @@ public class CompletionTests_PlainC extends AbstractContentAssistTest {
/* /*
* @see org.eclipse.cdt.ui.tests.text.contentassist2.AbstractContentAssistTest#setUpProjectContent(org.eclipse.core.resources.IProject) * @see org.eclipse.cdt.ui.tests.text.contentassist2.AbstractContentAssistTest#setUpProjectContent(org.eclipse.core.resources.IProject)
*/ */
@Override
protected IFile setUpProjectContent(IProject project) throws Exception { protected IFile setUpProjectContent(IProject project) throws Exception {
fProject= project; fProject= project;
String headerContent= readTaggedComment(HEADER_FILE_NAME); String headerContent= readTaggedComment(HEADER_FILE_NAME);
@ -356,23 +357,14 @@ public class CompletionTests_PlainC extends AbstractContentAssistTest {
"__STDC_VERSION_", "__STDC_VERSION_",
"__STDC__", "__STDC__",
"__TIME__", "__TIME__",
"__asm__",
"__builtin_constant_p(exp)", "__builtin_constant_p(exp)",
"__builtin_va_arg(ap, type)", "__builtin_va_arg(ap, type)",
"__complex__", "__complex__",
"__const",
"__const__",
"__extension__", "__extension__",
"__imag__", "__imag__",
"__inline__",
"__null", "__null",
"__real__", "__real__",
"__restrict",
"__restrict__",
"__signed__",
"__stdcall", "__stdcall",
"__volatile__",
"__typeof__"
}; };
assertCompletionResults(expected); assertCompletionResults(expected);
} }