Bug 1432410 - Add tests in tree to make sure we don't regress with clang-tidy on static-analisys. Tests wrote in part by :sylvestre. r=gps
MozReview-Commit-ID: IWxzKfWNIHG
This commit is contained in:
9
tools/clang-tidy/test/misc-assert-side-effect.cpp
Normal file
9
tools/clang-tidy/test/misc-assert-side-effect.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
#include "structures.h"
|
||||
|
||||
// misc-assert-side-effect
|
||||
void misc_assert_side_effect() {
|
||||
int X = 0;
|
||||
assert(X == 1);
|
||||
assert(X = 1);
|
||||
}
|
||||
Reference in New Issue
Block a user