================
@@ -5,6 +5,40 @@
 // RUN: %clang_cc1 -x c++ -Wextra-semi -fixit %t
 // RUN: %clang_cc1 -x c++ -Wextra-semi -Werror %t
 
+#if __cplusplus >= 201103L && defined(PEDANTIC)
+// In C++11 extra semicolons inside classes are allowed via defect reports.
+// expected-no-diagnostics
+class A {
+  void A1();
+  void A2() { };
+  void A2b() { };; 
+  ; 
+  void A2c() { }
+  ;
+  void A3() { };  ;; 
+  ;;;;;;; 
+  ; 
+  ; ;;          ;  ;;; 
+    ;  ;       ;       ;  ;; 
+  void A4();
+
+  union {
+    ;
+    int a;
+    ;
+  };
+};
+
+union B {
+  int a1;
+  int a2;; 
+};
+
----------------
Sirraide wrote:

Can you also add some tests w/ `=default`/`=delete`/`=0` here

https://github.com/llvm/llvm-project/pull/172209
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to