================
@@ -13386,6 +13386,62 @@ void Sema::checkNonTrivialCUnion(QualType QT, 
SourceLocation Loc,
         .visit(QT, nullptr, false);
 }
 
+bool Sema::GloballyUniqueObjectMightBeAccidentallyDuplicated(
+    const VarDecl *dcl) {
+  if (!dcl || !getLangOpts().CPlusPlus)
+    return false;
+
+  // If an object is defined in a source file, its definition can't get
----------------
zmodem wrote:

At this point it's not clear that we're looking at a definition, so maybe move 
this check below the "is this a definition" check below?

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

Reply via email to