[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 07:40:21 PDT 2024
================
@@ -1180,6 +1180,16 @@ void Sema::PrintPragmaAttributeInstantiationPoint() {
diag::note_pragma_attribute_applied_decl_here);
}
+void Sema::DiagnoseExcessPrecision() {
+ if (NumExcessPrecisionNotSatisfied > 0) {
+ for (auto &[Loc, Type, Num] : ExcessPrecisionNotSatisfied)
+ if (Num > 1)
+ Diag(Loc, diag::warn_excess_precision_not_supported) << 0 << Type << 1;
----------------
Endilll wrote:
You should be able to write this if statements more more succinctly like this.
https://github.com/llvm/llvm-project/pull/107397
More information about the cfe-commits
mailing list