================
@@ -0,0 +1,55 @@
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir 
-emit-cir %s -o - 2>&1 | FileCheck %s
+
+// Test anonymous namespace.
+namespace {
+  int g1 = 1;
+
+  // Note: This causes a warning about the function being undefined, but we
+  // currently have a problem with duplicate definitions when we call 
functions.
+  // This should be updated when that problem is fixed.
+  void f1(void);
----------------
erichkeane wrote:

The problem here is a function that cannot be defined, since the unnamed 
namespace results in no linkage, so you have a name that can be called now, but 
isn't defined.  Do you mean that once we fix the call-functions bug, that we 
can actually jsut toss a definition in here?

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

Reply via email to