[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 28 11:13:56 PST 2024


================
@@ -281,7 +281,7 @@ namespace dr1837 { // dr1837: 3.3
 
   struct A {
     int f();
-    bool b = [] {
+    bool b = [] { // since-cxx11-warning{{address of lambda function pointer conversion operator will always evaluate to 'true'}}
----------------
Endilll wrote:

Convert this to `// since-cxx11-warning at -1` style, to follow the rest of the file.

https://github.com/llvm/llvm-project/pull/83152


More information about the cfe-commits mailing list