================
@@ -505,6 +505,9 @@ COMPATIBLE_LANGOPT(IncrementalExtensions, 1, 0, " True if 
we want to process sta
 
 BENIGN_LANGOPT(CheckNew, 1, 0, "Do not assume C++ operator new may not return 
NULL")
 
+BENIGN_LANGOPT(CheckConstexprFunctionBodies, 1, 1,
+               "True if we want to emit a diagnostics for a constexpr function 
"
----------------
erichkeane wrote:

```suggestion
               "Emit diagnostics for a constexpr function body that can never 
be used in a constant expression."
```

Also: I think this is hacky and unfortunate that we're using a bit in 
`LangOpts` to control a warning's state, which feels kind of dangerous.  I'd 
love a `FIXME` above this that proposes 1 of 2 ideas: Either find a way for 
Diagnostics TableGen to be language mode specific, or find a way to put this 
into CompilerInvocatoin in a way that survives argument rewriting.

https://github.com/llvm/llvm-project/pull/94347
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to