From 093fdcf3df302793c810aea23bb2a7a620bba578 Mon Sep 17 00:00:00 2001 From: Jean-Luc Duprat Date: Wed, 18 Apr 2012 09:39:54 -0700 Subject: [PATCH] Fixed bad integration --- decl.cpp | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/decl.cpp b/decl.cpp index f451131d..581cca3c 100644 --- a/decl.cpp +++ b/decl.cpp @@ -559,52 +559,6 @@ Declarator::InitFromType(const Type *baseType, DeclSpecs *ds) { } } - -const Type * -Declarator::GetType(DeclSpecs *ds) const { - const Type *baseType = ds->GetBaseType(pos); - const Type *type = GetType(baseType, ds); - - if (ds->declSpecList.size() > 0 && - type != NULL && - dynamic_cast(type) == NULL) { - Error(pos, "__declspec specifiers for non-function type \"%s\" are " - "not used.", type->GetString().c_str()); - } - - return type; -} - - -Symbol * -Declarator::GetSymbolForFunctionParameter(int paramNum) const { - Assert(paramNum < (int)functionParams.size()); - Declaration *d = functionParams[paramNum]; - - char buf[32]; - Symbol *sym; - if (d->declarators.size() == 0) { - // function declaration like foo(float), w/o a name for - // the parameter - sprintf(buf, "__anon_parameter_%d", paramNum); - sym = new Symbol(buf, pos); - sym->type = d->declSpecs->GetBaseType(pos); - } - else { - Assert(d->declarators.size() == 1); - sym = d->declarators[0]->GetSymbol(); - if (sym == NULL) { - // Handle more complex anonymous declarations like - // float (float **). - sprintf(buf, "__anon_parameter_%d", paramNum); - sym = new Symbol(buf, d->declarators[0]->pos); - sym->type = d->declarators[0]->GetType(d->declSpecs); - } - } - return sym; -} - - /////////////////////////////////////////////////////////////////////////// // Declaration