alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land.
LG with one nit. ================ Comment at: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp:145-153 + bool StdFnRequresCpp11 = + llvm::StringSwitch<bool>(OldFnName) + .Cases("acosh", "asinh", "atanh", "cbrt", "copysign", "erf", "erfc", + "exp2", "expm1", "fdim", true) + .Cases("fma", "fmax", "fmin", "hypot", "ilogb", "lgamma", "llrint", + "llround", "log1p", true) + .Cases("log2", "logb", "lrint", "lround", "nearbyint", "nextafter", ---------------- Maybe just make a static StringSet of all the names and check whether the name is in it? ================ Comment at: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp:167-168 + + // FIXME: Perhaps we should suggest #include <cmath> if we suggest a cmath + // function and cmath is not already included. +} ---------------- We definitely should. See the use of IncludeInserter in UnnecessaryValueParamCheck, for example. Fine for a follow-up. https://reviews.llvm.org/D27284 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits