mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 19:49:36 +00:00
95dd80c2e8
Summary: The loop-widening code processes c++ methods looking for `this` pointers. In the case of static methods (which do not have `this` pointers), an assertion was triggering. This patch avoids trying to process `this` pointers for static methods, and thus avoids triggering the assertion . Reviewers: dcoughlin, george.karpenkov, NoQ Reviewed By: NoQ Subscribers: NoQ, xazax.hun, szepet, a.sidorin, mikhail.ramalho, cfe-commits Differential Revision: https://reviews.llvm.org/D50408 llvm-svn: 339201
13 lines
351 B
C++
13 lines
351 B
C++
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-config widen-loops=true -analyzer-max-loop 2 %s
|
|
// REQUIRES: asserts
|
|
// expected-no-diagnostics
|
|
//
|
|
// This test checks that the loop-widening code ignores static methods. If that is not the
|
|
// case, then an assertion will trigger.
|
|
|
|
class Test {
|
|
static void foo() {
|
|
for (;;) {}
|
|
}
|
|
};
|