Files
clang-p2996/clang/test/Analysis/analyzer-display-progress.cpp
SharmaRithik cad9b7f708 [analyzer] Print time taken to analyze each function
Summary: This patch is a part of an attempt to obtain more
timer data from the analyzer. In this patch, we try to use
LLVM::TimeRecord to save time before starting the analysis
and to print the time that a specific function takes while
getting analyzed.

The timer data is printed along with the
-analyzer-display-progress outputs.

ANALYZE (Syntax): test.c functionName : 0.4 ms
ANALYZE (Path,  Inline_Regular): test.c functionName : 2.6 ms
Authored By: RithikSharma
Reviewer: NoQ, xazax.hun, teemperor, vsavchenko
Reviewed By: NoQ
Differential Revision: https://reviews.llvm.org/D105565
2021-07-13 04:52:47 +00:00

31 lines
913 B
C++

// RUN: %clang_analyze_cc1 -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(int) {}
void f(float, ::SomeStruct) {}
void f(float, SomeStruct) {}
};
}
// CHECK: analyzer-display-progress.cpp f() : {{[0-9]+}}
// CHECK: analyzer-display-progress.cpp g() : {{[0-9]+}}
// CHECK: analyzer-display-progress.cpp h() : {{[0-9]+}}
// CHECK: analyzer-display-progress.cpp SomeStruct::f() : {{[0-9]+}}
// CHECK: analyzer-display-progress.cpp SomeOtherStruct::f() : {{[0-9]+}}
// CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(int) : {{[0-9]+}}
// CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(float, ::SomeStruct) : {{[0-9]+}}
// CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(float, struct ns::SomeStruct) : {{[0-9]+}}