a.sidorin created this revision. a.sidorin added reviewers: xazax.hun, zaks.anna, dcoughlin. a.sidorin added a subscriber: cfe-commits.
-analyzer-display progress option prints only function names which may be suspicious. This patch forces AnalysisConsumer to print fully-qualified function names. http://reviews.llvm.org/D16804 Files: lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp test/Analysis/analyze_display_progress.c test/Analysis/analyze_display_progress.cpp Index: test/Analysis/analyze_display_progress.cpp =================================================================== --- /dev/null +++ test/Analysis/analyze_display_progress.cpp @@ -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 Index: test/Analysis/analyze_display_progress.c =================================================================== --- test/Analysis/analyze_display_progress.c +++ /dev/null @@ -1,9 +0,0 @@ -// RUN: %clang_cc1 -analyze -analyzer-display-progress %s 2>&1 | FileCheck %s - -void f() {}; -void g() {}; -void h() {} - -// CHECK: analyze_display_progress.c f -// CHECK: analyze_display_progress.c g -// CHECK: analyze_display_progress.c h \ No newline at end of file Index: lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp =================================================================== --- lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -286,7 +286,7 @@ llvm::errs() << ": " << Loc.getFilename(); if (isa<FunctionDecl>(D) || isa<ObjCMethodDecl>(D)) { const NamedDecl *ND = cast<NamedDecl>(D); - llvm::errs() << ' ' << *ND << '\n'; + llvm::errs() << ' ' << ND->getQualifiedNameAsString() << '\n'; } else if (isa<BlockDecl>(D)) { llvm::errs() << ' ' << "block(line:" << Loc.getLine() << ",col:"
Index: test/Analysis/analyze_display_progress.cpp =================================================================== --- /dev/null +++ test/Analysis/analyze_display_progress.cpp @@ -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 Index: test/Analysis/analyze_display_progress.c =================================================================== --- test/Analysis/analyze_display_progress.c +++ /dev/null @@ -1,9 +0,0 @@ -// RUN: %clang_cc1 -analyze -analyzer-display-progress %s 2>&1 | FileCheck %s - -void f() {}; -void g() {}; -void h() {} - -// CHECK: analyze_display_progress.c f -// CHECK: analyze_display_progress.c g -// CHECK: analyze_display_progress.c h \ No newline at end of file Index: lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp =================================================================== --- lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -286,7 +286,7 @@ llvm::errs() << ": " << Loc.getFilename(); if (isa<FunctionDecl>(D) || isa<ObjCMethodDecl>(D)) { const NamedDecl *ND = cast<NamedDecl>(D); - llvm::errs() << ' ' << *ND << '\n'; + llvm::errs() << ' ' << ND->getQualifiedNameAsString() << '\n'; } else if (isa<BlockDecl>(D)) { llvm::errs() << ' ' << "block(line:" << Loc.getLine() << ",col:"
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits