[clang] Enable -Wunique-object-duplication inside templated code (PR #125902)
    Devon Loehr via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Feb 11 08:24:10 PST 2025
    
    
  
================
@@ -3669,6 +3669,7 @@ class Sema final : public SemaBase {
   /// cause problems if the variable is mutable, its initialization is
   /// effectful, or its address is taken.
   bool GloballyUniqueObjectMightBeAccidentallyDuplicated(const VarDecl *Dcl);
+  void DiagnoseDangerousUniqueObjectDuplication(const VarDecl *Dcl);
----------------
DKLoehr wrote:
Not sure I agree, but not too important so changed it.
https://github.com/llvm/llvm-project/pull/125902
    
    
More information about the cfe-commits
mailing list