// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-config suppress-null-return-paths=false -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify -DSUPPRESSED=1 %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-config avoid-suppressing-null-argument-paths=true -DSUPPRESSED=1 -DNULL_ARGS=1 -verify %s
int ;
int ;
int *
int* ;
int *
int *
void
void
void
void
void
// Test that div by zero does not get suppressed. This is a policy choice.
int
int
// Treat a function-like macro similarly to an inlined function, so suppress
// warnings along paths resulting from inlined checks.
void
void
void
// This macro will dereference its argument if the argument is NULL.
void
// Here the check (the "if") is not in a macro, so we should still warn.
void
// When a nil case split is introduced in a macro and the macro is in a guard,
// we still shouldn't warn.
int ;
int ;
void
void
// Here the check is entirely in non-macro code even though the code itself
// is a macro argument.
void
// No warning should be emitted if dereference is performed from a different
// macro.
int
// --------------------------
// "Suppression suppression"
// --------------------------
void
void
int *
void
void
void
void
void
// ---------------------------------------
// FALSE NEGATIVES (over-suppression)
// ---------------------------------------
void
int *
void
int *
void
int
void
int
void
int
void
int *
int
// Test suppression of nested conditional operators.
int
int
int
int
int