Index: www/analyzer/alpha_checks.html =================================================================== --- www/analyzer/alpha_checks.html +++ www/analyzer/alpha_checks.html @@ -275,6 +275,33 @@ +
dispatch_after
or dispatch_async
. This checker is
+a part of core.StackAddressEscape, but is
+temporarily disabled until some
+false positives are fixed.+dispatch_block_t test_block_inside_block_async_leak() { + int x = 123; + void (^inner)(void) = ^void(void) { + int y = x; + ++y; + }; + void (^outer)(void) = ^void(void) { + int z = x; + ++z; + inner(); + }; + return outer; // warn: address of stack-allocated block is captured by a + // returned block +} +
Name, Description | Example |
-alpha.cplusplus.VirtualCall
+alpha.cplusplus.DeleteWithNonVirtualDtor
(C++)
-Check virtual member function calls during construction or
-destruction. |
+Reports destructions of polymorphic objects with a non-virtual destructor in
+their base class
+
-class A { -public: - A() { - f(); // warn - } - virtual void f(); -}; - |
+alpha.cplusplus.InvalidatedIterator
+(C++)
+Check for use of invalidated iterators.
+ |
+-class A { -public: - ~A() { - this->f(); // warn - } - virtual void f(); +void bad_copy_assign_operator_list1(std::list |
+alpha.cplusplus.IteratorRange
+(C++)
+Check for iterators used outside their valid ranges.
+ |
+
+ +void simple_bad_end(const std::vector |
+alpha.cplusplus.MismatchedIterator
+(C++)
+Check for use of iterators of different containers where iterators of the same
+container are expected.
+ |
+
+ +void bad_insert3(std::vector |
+alpha.cplusplus.MisusedMovedObject
+(C++)
+Method calls on a moved-from object and copying a moved-from object will be
+reported.
+ |
+
+ +struct A { + void foo() {} }; + +void f() { + A a; + A b = std::move(a); // note: 'a' became 'moved-from' here + a.foo(); // warn: method call on a 'moved-from' object 'a' +} |
alpha.cplusplus.UninitializedObject
(C++)
-This checker reports uninitialized fields in objects created
-after a constructor call. It doesn't only find direct uninitialized
-fields, but rather makes a deep inspection of the object,
-analyzing all of it's fields subfields. -The checker regards inherited fields as direct fields, so one -will recieve warnings for uninitialized inherited data members -as well. +This checker reports uninitialized fields in objects created after a constructor +call. It doesn't only find direct uninitialized fields, but rather makes a deep +inspection of the object, analyzing all of it's fields subfields. +The checker regards inherited fields as direct fields, so one will recieve +warnings for uninitialized inherited data members as well. It has several options:
|
@@ -437,14 +535,10 @@
A a(&b, &c); // warning: 3 uninitialized fields
// after the constructor call
}
- - - |
+class A { +public: + A() { + f(); // warn + } + virtual void f(); +}; +
+class A { +public: + ~A() { + this->f(); // warn + } + virtual void f(); +}; +