[PATCH] D122155: Add warning when eval-method is set in the presence of value unsafe floating-point calculations.
Zahira Ammarguellat via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 21 12:25:54 PDT 2022
zahiraam added inline comments.
================
Comment at: clang/lib/Parse/ParseStmt.cpp:1065
+ if (Tok.isNot(tok::annot_pragma_fp) &&
+ getLangOpts().getFPEvalMethod() != LangOptions::FEM_UnsetOnCommandLine &&
----------------
aaron.ballman wrote:
> This looks like it's going to diagnose on every compound statement regardless of whether the function contains any floating-point operations at all. If so, that's way too chatty.
>
> It seems like the issue here is "the command line options disagree", so why is this not a frontend warning when processing the command line options?
I tried to do that initially but I don't have a Location for the diagnostic.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122155/new/
https://reviews.llvm.org/D122155
More information about the cfe-commits
mailing list