Configure a basic .clang-tidy.
Also, fix some issues that it found.
We will enable more rules in the future. In particular, some google-*
rules should already pass, but appear not to at the moment.
Once we have enabled enough of these rules, we intend to drop the
dependency on cpplint.
Change-Id: I107231cf57b5500a3f1b623510419665589531dc
diff --git a/src/cpu-features.h b/src/cpu-features.h
index 012c5e4..50ddc26 100644
--- a/src/cpu-features.h
+++ b/src/cpu-features.h
@@ -333,8 +333,10 @@
CPUFeatures::Feature feature_;
bool IsValid() const {
- return ((cpu_features_ == NULL) && (feature_ == CPUFeatures::kNone)) ||
- cpu_features_->Has(feature_);
+ if (cpu_features_ == NULL) {
+ return feature_ == CPUFeatures::kNone;
+ }
+ return cpu_features_->Has(feature_);
}
};