[PATCH] D16965: Fix for Bug 14644 - clang confuses scope operator for global namespace giving extra qualification on member

Ryan Yee via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 13 18:37:49 PST 2016


ryee88 updated this revision to Diff 47922.
ryee88 added a comment.

Added unit tests.


http://reviews.llvm.org/D16965

Files:
  test/Parser/forward-declaration.cpp

Index: test/Parser/forward-declaration.cpp
===================================================================
--- /dev/null
+++ test/Parser/forward-declaration.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 %s -fsyntax-only -verify
+
+class Outer {class Inner;};
+
+class ::Outer; // expected-error {{forward declaration of qualified class not allowed}} expected-warning {{extra qualification on member 'Outer'}}
+
+class Outer;
+
+// specializations of qualified type introduction?
+class Outer::Inner; // expected-error {{forward declaration of class cannot have a nested name specifier}}
+class ::Outer::Inner; // expected-error {{forward declaration of class cannot have a nested name specifier}}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16965.47922.patch
Type: text/x-patch
Size: 696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160214/354b9150/attachment.bin>


More information about the cfe-commits mailing list