diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2016-08-08 16:01:02 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2016-08-08 16:01:02 +0000 |
commit | 6a76a1639f6ac3d1b1f9c661736f2cb91ce81825 (patch) | |
tree | d6d2641f0f7ab6bfb35f04aef5579240ee13599a /clang/test/Analysis/analyzer-display-progress.cpp | |
parent | 0aa29532b7a439f047c1573548b6458d00a2df54 (diff) | |
download | bcm5719-llvm-6a76a1639f6ac3d1b1f9c661736f2cb91ce81825.tar.gz bcm5719-llvm-6a76a1639f6ac3d1b1f9c661736f2cb91ce81825.zip |
[analyzer] Change -analyze-function to accept qualified names.
Both -analyze-function and -analyzer-display-progress now share the same
convention for naming functions, which allows discriminating between
methods with the same name in different classes, C++ overloads, and also
presents Objective-C instance and class methods in the convenient notation.
This also allows looking up the name for the particular function you're trying
to restrict analysis to in the -analyzer-display-progress output,
in case it was not instantly obvious.
Differential Revision: https://reviews.llvm.org/D22856
llvm-svn: 278018
Diffstat (limited to 'clang/test/Analysis/analyzer-display-progress.cpp')
-rw-r--r-- | clang/test/Analysis/analyzer-display-progress.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/clang/test/Analysis/analyzer-display-progress.cpp b/clang/test/Analysis/analyzer-display-progress.cpp new file mode 100644 index 00000000000..5d9f5e5b28f --- /dev/null +++ b/clang/test/Analysis/analyzer-display-progress.cpp @@ -0,0 +1,30 @@ +// 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(int) {} + void f(float, ::SomeStruct) {} + void f(float, SomeStruct) {} + }; +} + +// CHECK: analyzer-display-progress.cpp f() +// CHECK: analyzer-display-progress.cpp g() +// CHECK: analyzer-display-progress.cpp h() +// CHECK: analyzer-display-progress.cpp SomeStruct::f() +// CHECK: analyzer-display-progress.cpp SomeOtherStruct::f() +// CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(int) +// CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(float, ::SomeStruct) +// CHECK: analyzer-display-progress.cpp ns::SomeStruct::f(float, struct ns::SomeStruct) |