aaron.ballman added inline comments.

================
Comment at: clang/lib/Parse/ParseStmt.cpp:1065
 
+  if (Tok.isNot(tok::annot_pragma_fp) &&
+      getLangOpts().getFPEvalMethod() != LangOptions::FEM_UnsetOnCommandLine &&
----------------
zahiraam wrote:
> 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.
We issue plenty of diagnostics when command line options don't match 
expectations, as examples:

https://github.com/llvm/llvm-project/blob/main/clang/lib/Frontend/CompilerInvocation.cpp#L525
https://github.com/llvm/llvm-project/blob/main/clang/lib/Frontend/CompilerInvocation.cpp#L1241

(and so on).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122155/new/

https://reviews.llvm.org/D122155

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to