Commit 2ebaf3fe authored by Roberto Raggi's avatar Roberto Raggi

Get rid of the #warning directives.

parent f34fd810
......@@ -283,7 +283,7 @@ QList<LookupItem> LookupContext::lookup(const Name *name, Scope *scope) const
} else if (Function *fun = scope->asFunction()) {
bindings()->lookupInScope(name, fun, &candidates, /*templateId = */ 0, /*binding=*/ 0);
#warning robe: lookup in template parameters
// ### port me
#if 0
for (TemplateParameters *it = fun->templateParameters(); it && candidates.isEmpty(); it = it->previous())
bindings()->lookupInScope(name, it->scope(), &candidates, /* templateId = */ 0, /*binding=*/ 0);
......@@ -310,7 +310,7 @@ QList<LookupItem> LookupContext::lookup(const Name *name, Scope *scope) const
break; // it's a formal argument.
} else if (Class *klass = scope->asClass()) {
#warning robe: lookup in template parameters
// ### port me
#if 0
for (TemplateParameters *it = klass->templateParameters(); it && candidates.isEmpty(); it = it->previous())
bindings()->lookupInScope(name, it->scope(), &candidates, /* templateId = */ 0, /*binding=*/ 0);
......
......@@ -50,8 +50,6 @@ using namespace CPlusPlus;
namespace {
const bool debug = ! qgetenv("CPLUSPLUS_DEBUG").isEmpty();
template <typename _Tp>
static QList<_Tp> removeDuplicates(const QList<_Tp> &results)
{
......@@ -549,8 +547,11 @@ bool ResolveExpression::visit(ArrayAccessAST *ast)
QList<LookupItem> ResolveExpression::getMembers(ClassOrNamespace *binding, const Name *memberName) const
{
Q_UNUSED(binding);
Q_UNUSED(memberName);
// ### port me
QList<LookupItem> members;
#warning robe: enable template instantiation
#if 0
const QList<LookupItem> originalMembers = binding->find(memberName);
......
......@@ -1852,7 +1852,7 @@ void CppCodeCompletion::complete(const TextEditor::CompletionItem &item, QChar t
if (! function->hasReturnType() && (function->identity() && !function->identity()->isDestructorNameId())) {
// Don't insert any magic, since the user might have just wanted to select the class
#warning robe: "don't insert matching ( when the selected symbol is a template"
/// ### port me
#if 0
} else if (function->templateParameterCount() != 0 && typedChar != QLatin1Char('(')) {
// If there are no arguments, then we need the template specification
......
......@@ -124,8 +124,7 @@ QDebug operator<<(QDebug d, const Scope &scope)
str << " function";
if (scope.isFunction())
str << " prototype";
#warning robe fix me
#if 0
#if 0 // ### port me
if (const Symbol *owner = &scope) {
str << " owner: ";
debugCppSymbolRecursion(str, o, *owner, false, 0);
......
......@@ -312,8 +312,10 @@ bool CheckExpression::visit(UnaryExpressionAST *ast)
bool CheckExpression::visit(QtMethodAST *ast)
{
(void) ast;
// ### port this code
#if 0
const Name *name = 0;
#warning robe set a valid scope
Scope *dummy = 0;
FullySpecifiedType methTy = semantic()->check(ast->declarator, FullySpecifiedType(),
dummy, &name);
......@@ -328,6 +330,7 @@ bool CheckExpression::visit(QtMethodAST *ast)
"argument should be anonymous");
}
}
#endif
return false;
}
......
......@@ -963,7 +963,7 @@ bool ObjCMethod::hasReturnType() const
unsigned ObjCMethod::argumentCount() const
{
#warning robe implement me
// ### port me
return memberCount();
}
......
......@@ -22,7 +22,7 @@ public:
bool blockErrors = false,
bool qtMocRun = false)
{
const StringLiteral *fileId = control.findOrInsertStringLiteral("<stdin>");
const StringLiteral *fileId = control.stringLiteral("<stdin>");
TranslationUnit *unit = new TranslationUnit(&control, fileId);
unit->setObjCEnabled(true);
unit->setQtMocRunEnabled(qtMocRun);
......
......@@ -38,7 +38,7 @@ public:
bool enableObjc,
bool qtMocRun)
{
const StringLiteral *fileId = control->findOrInsertStringLiteral("<stdin>");
const StringLiteral *fileId = control->stringLiteral("<stdin>");
TranslationUnit *unit = new TranslationUnit(control.data(), fileId);
unit->setSource(source.constData(), source.length());
unit->setObjCEnabled(enableObjc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment