Commit dd69af56 authored by Moritz Koenig's avatar Moritz Koenig
Browse files

Not as conservative now, I guess

parent 375fb194
......@@ -767,7 +767,7 @@ bool HashVisitor::VisitBlockDecl(const BlockDecl *Node)
bool HashVisitor::VisitFunctionDecl(const FunctionDecl *Node){
//Ignore extern declarations
if(Node->getStorageClass() == StorageClass::SC_Extern || Node->getStorageClass() == StorageClass::SC_PrivateExtern || !Node->hasBody()){
if(Node->getStorageClass() == StorageClass::SC_Extern || Node->getStorageClass() == StorageClass::SC_PrivateExtern || !Node->isThisDeclarationADefinition()){
doNotHashThis = true;
return true;
}
......
void func(void); {{A}}
{{B}}
int main(){
return 0;
}
/*
* check-name: void FuncDecl unused
* B == A
*/
void func(void); {{A}}
{{B}}
int main(){
func(); {{A}}
return 0;
}
/*
* check-name: void FuncDecl used
* B != A
*/
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