[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions
Salman Javed via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 26 02:08:35 PST 2021
salman-javed-nz added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions-narrowingintegertofloatingpoint-option.cpp:12
+ // CHECK-MESSAGES-DEFAULT: :[[@LINE-1]]:14: warning: narrowing conversion from 'unsigned long long' to 'double' [cppcoreguidelines-narrowing-conversions]
+ // DISABLED: No warning for integer to floating-point narrowing conversions when WarnOnIntegerToFloatingPointNarrowingConversion = false.
+}
----------------
salman-javed-nz wrote:
> Build is failing because you don't have a CHECK-MESSAGES-DISABLED line anywhere in the file.
> You could change `// DISABLED:` to `// CHECK-MESSAGES-DISABLED-NOT:` and check for the absence of the check warning.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112881/new/
https://reviews.llvm.org/D112881
More information about the cfe-commits
mailing list