Author: Vlad Serebrennikov
Date: 2023-11-07T22:24:59+03:00
New Revision: fb8ff4cdaecb7fe498d4e3a9cbcb33d40cccd29a

URL: 
https://github.com/llvm/llvm-project/commit/fb8ff4cdaecb7fe498d4e3a9cbcb33d40cccd29a
DIFF: 
https://github.com/llvm/llvm-project/commit/fb8ff4cdaecb7fe498d4e3a9cbcb33d40cccd29a.diff

LOG: [clang][NFC] Add a missing comment to #71322 changes

It was an unfortunate oversight from my side to forget to include this comment 
into the PR.

Added: 
    

Modified: 
    clang/lib/Sema/SemaExprCXX.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 67bc847ff2a60e6..023411c7edc946b 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -2443,6 +2443,11 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool 
UseGlobal,
       FullInit = Binder->getSubExpr();
 
     Initializer = FullInit.get();
+    // We don't know that we're generating an implicit initializer until now, 
so
+    // we have to update the initialization style as well.
+    //
+    // FIXME: it would be nice to determine the correct initialization style
+    // earlier so InitStyle doesn't need adjusting.
     if (InitStyle == CXXNewInitializationStyle::None && Initializer) {
       InitStyle = CXXNewInitializationStyle::Implicit;
     }


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

Reply via email to