Commit 118036a3 authored by Lukas Lehnert's avatar Lukas Lehnert
Browse files

seems to work

parent 6912b4a5
......@@ -203,13 +203,26 @@ void HashVisitor::hashType(QualType T) {
const sha1::digest * saved_digest = GetHash(type);
/*
// Optimierung verdeckt aktuell noch Probleme mit Qualifiern
if(saved_digest){
Hash() << *saved_digest;
return;
}
*/
if(type->isStructureType()){
if(haveSeen(type, type)){
Hash() << "struct";
Hash() << T.getAsString();
return;
}
}else if(type->isUnionType()){
if(haveSeen(type, type)){
Hash() << "union";
Hash() << T.getAsString();
return;
}
}
// Visit in Pre-Order
unsigned Depth = beforeDescent();
......@@ -256,31 +269,10 @@ bool HashVisitor::VisitBuiltinType(const BuiltinType *T) {
bool HashVisitor::VisitPointerType(const PointerType *T) {
Hash() << "pointer";
const sha1::digest *digest = GetHash(T->getPointeeType().getTypePtr());
if(digest){
//Hash() << *digest;
//return true;
}
//FIXME: evtl. FunctionPointerType (erst Testsysteme)
if((T->getPointeeType()).getTypePtr()->isStructureType()){
if(haveSeen(T->getPointeeType().getTypePtr(), T->getPointeeType().getTypePtr())){
Hash() << "struct";
Hash() << (T->getPointeeType()).getAsString();
}else{
//rekursiv absteigen...
hashType(T->getPointeeType());
}
}else if((T->getPointeeType()).getTypePtr()->isUnionType()){
if(haveSeen(T->getPointeeType().getTypePtr(), T->getPointeeType().getTypePtr())){
Hash() << "union";
Hash() << (T->getPointeeType()).getAsString();
}else{
//rekursiv absteigen...
hashType(T->getPointeeType());
}
}else{
hashType(T->getPointeeType());
}
hashType(T->getPointeeType());
return true;
}
......
......@@ -80,4 +80,7 @@ cdcmd(int argc, char **argv)
out1fmt("%s\n", curdir);
return 0;
}
{{A}}
/*
* check-name: complex stuff once failed
*/
void cdcmd(void)
{
const char *dest;
char c;
c = dest[2];
}
{{A}}
/*
* check-name: qualifiers in subtype
*/
Supports Markdown
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