forked from OSchip/llvm-project
[analyzer] AnalysisConsumer: print fully-qualified function name while displaying progress
-analyzer-display progress option prints only function names which may be ambiguous. This patch forces AnalysisConsumer to print fully-qualified function names. Patch by Alex Sidorin! Differential Revision: http://reviews.llvm.org/D16804 llvm-svn: 259646
This commit is contained in:
parent
82e1168989
commit
8f7d8b6c32
|
@ -274,7 +274,7 @@ public:
|
||||||
llvm::errs() << ": " << Loc.getFilename();
|
llvm::errs() << ": " << Loc.getFilename();
|
||||||
if (isa<FunctionDecl>(D) || isa<ObjCMethodDecl>(D)) {
|
if (isa<FunctionDecl>(D) || isa<ObjCMethodDecl>(D)) {
|
||||||
const NamedDecl *ND = cast<NamedDecl>(D);
|
const NamedDecl *ND = cast<NamedDecl>(D);
|
||||||
llvm::errs() << ' ' << *ND << '\n';
|
llvm::errs() << ' ' << ND->getQualifiedNameAsString() << '\n';
|
||||||
}
|
}
|
||||||
else if (isa<BlockDecl>(D)) {
|
else if (isa<BlockDecl>(D)) {
|
||||||
llvm::errs() << ' ' << "block(line:" << Loc.getLine() << ",col:"
|
llvm::errs() << ' ' << "block(line:" << Loc.getLine() << ",col:"
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
// RUN: %clang_cc1 -analyze -analyzer-display-progress %s 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
void f() {};
|
||||||
|
void g() {};
|
||||||
|
void h() {}
|
||||||
|
|
||||||
|
struct SomeStruct {
|
||||||
|
void f() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SomeOtherStruct {
|
||||||
|
void f() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace ns {
|
||||||
|
struct SomeStruct {
|
||||||
|
void f() {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// CHECK: analyze_display_progress.cpp f
|
||||||
|
// CHECK: analyze_display_progress.cpp g
|
||||||
|
// CHECK: analyze_display_progress.cpp h
|
||||||
|
// CHECK: analyze_display_progress.cpp SomeStruct::f
|
||||||
|
// CHECK: analyze_display_progress.cpp SomeOtherStruct::f
|
||||||
|
// CHECK: analyze_display_progress.cpp ns::SomeStruct::f
|
Loading…
Reference in New Issue