================
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - 
-fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s 
--check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o - 
-fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s 
--check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++14 %s -triple x86_64-linux-gnu -emit-llvm -o - 
-fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s 
--check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -o - 
-fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s 
--check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++20 %s -triple x86_64-linux-gnu -emit-llvm -o - 
-fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s 
--check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -o - 
-fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s 
--check-prefixes CHECK
+// RUN: %clang_cc1 -std=c++2c %s -triple x86_64-linux-gnu -emit-llvm -o - 
-fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s 
--check-prefixes CHECK
+
+namespace dr571 { // dr571: 2.7
+  typedef int &ir;
+  int n;
+  const ir r = n;
+  // expected-warning@-1 {{'const' qualifier on reference type 'ir' (aka 'int 
&') has no effect}}
+  ir r2 = n;
+}
+
+// Entities have external linkage by default.
+
+// CHECK: @dr571::r = constant ptr @dr571::n
+// CHECK: @dr571::r2 = constant ptr @dr571::n
----------------
erichkeane wrote:

These are showing up as 'dso_local' here: https://godbolt.org/z/Mcxz9c7PG

It isn't clear to me why, or really what it means semantically 
(https://llvm.org/docs/LangRef.html#runtime-preemption-specifiers).

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

Reply via email to