mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-15 04:00:56 +00:00
a3f7b58742
Even for a checker being in alpha, some reports about pointees held so little value to the user that it's safer to disable pointer/reference chasing for now. It can be enabled with a new flag, in which case checker should function as it has always been. This can be set with `CheckPointeeInitialization`. Differential Revision: https://reviews.llvm.org/D49438 llvm-svn: 339135
19 lines
602 B
C++
19 lines
602 B
C++
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.cplusplus.UninitializedObject \
|
|
// RUN: -analyzer-config alpha.cplusplus.UninitializedObject:NotesAsWarnings=true \
|
|
// RUN: -analyzer-config alpha.cplusplus.UninitializedObject:CheckPointeeInitialization=true \
|
|
// RUN: -std=c++11 -verify %s
|
|
|
|
class NotesAsWarningsTest {
|
|
int a;
|
|
int b;
|
|
int dontGetFilteredByNonPedanticMode = 0;
|
|
|
|
public:
|
|
NotesAsWarningsTest() {} // expected-warning{{uninitialized field 'this->a'}}
|
|
// expected-warning@-1{{uninitialized field 'this->b'}}
|
|
};
|
|
|
|
void fNotesAsWarningsTest() {
|
|
NotesAsWarningsTest();
|
|
}
|