mibintc marked 5 inline comments as done.
mibintc added inline comments.

================
Comment at: clang/include/clang/Basic/LangOptions.h:234
+    FEM_Extended,
+    /// Use the default float eval method specified by Target
+    FEM_TargetDefault
----------------
mibintc wrote:
> aaron.ballman wrote:
> > FYI: it may be somewhat confusing that we have an enumerator with `default` 
> > in the name but that enumerator isn't the default.
> That's true. I had a heck of a time getting the initialization of the lang 
> option setting correct: the setting should come from the TargetInfo if 
> command line options don't override. That seems simple enough but there's 
> somethng really odd about initialization. Adding the "default target" 
> enumeral allowed me to get it initialized the way I wanted.
I redid the comments to eliminate the confusion


================
Comment at: clang/lib/Sema/SemaAttr.cpp:429
+  case PFC_Source:
+    //Builder.defineMacro("__FLT_EVAL_METHOD__", Twine("0"));
+    NewFPFeatures.setFPEvalMethodOverride(LangOptions::FEM_Source);
----------------
mibintc wrote:
> @rjmccall I would like to push a new value for __FLT_EVAL_METHOD__ at the 
> start of the scope of this pragma, then pop that value of the macro to 
> restore the previous setting when the scope is exited, should I do that in 
> ParsePragma? Can I do that by injecting "pragma push_macro(...)" into the 
> token stream, do you have other suggestion or is there something similar in 
> clang that I can study how to do this? 
Nevermind, I found a way to set the macro.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93769

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

Reply via email to