Changeset View
Changeset View
Standalone View
Standalone View
clang/test/Analysis/Checkers/WebKit/uncounted-local-vars.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
void foo() { | void foo() { | ||||
// no warnings | // no warnings | ||||
if (RefCountable *a = provide_ref_ctnbl()) { } | if (RefCountable *a = provide_ref_ctnbl()) { } | ||||
for (RefCountable *a = provide_ref_ctnbl(); a != nullptr;) { } | for (RefCountable *a = provide_ref_ctnbl(); a != nullptr;) { } | ||||
RefCountable *array[1]; | RefCountable *array[1]; | ||||
for (RefCountable *a : array) { } | for (RefCountable *a : array) { } | ||||
} | } | ||||
} // namespace ignore_for_if | } // namespace ignore_for_if | ||||
namespace suppression { | |||||
void foo_ref() { | |||||
RefCountable automatic; | |||||
RefCountable &bar [[clang::NoUncountedLocalVars]] = automatic; | |||||
} | |||||
} |