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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 16 07:22:06 PDT 2016


aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added a reviewer: rsmith.

================
Comment at: lib/Sema/SemaDecl.cpp:3803
@@ +3802,3 @@
+    
+    // Per C++ standard [n3485] 3.4.4 Elaborated type specifiers, section 3:
+    // "Cannot introduce an qualified".
----------------
Can drop the N-paper reference, and replace "3.4.4, section 3" with [basic.lookup.elab]p3

================
Comment at: lib/Sema/SemaDecl.cpp:3804
@@ +3803,3 @@
+    // Per C++ standard [n3485] 3.4.4 Elaborated type specifiers, section 3:
+    // "Cannot introduce an qualified".
+    // A clang::NestedNameSpecifier can represent many kinds of specifiers.
----------------
Ah, you're referring to text in the example; I think the reference above should actually be to [dcl.type.elab]

================
Comment at: lib/Sema/SemaDecl.cpp:3805
@@ +3804,3 @@
+    // "Cannot introduce an qualified".
+    // A clang::NestedNameSpecifier can represent many kinds of specifiers.
+    // A global-specifier with no nested-name-specifier requires a different
----------------
Can drop the clang::

================
Comment at: lib/Sema/SemaDecl.cpp:3811
@@ +3810,3 @@
+      ? diag::err_standalone_class_specifier
+      : diagId = diag::err_standalone_class_nested_name_specifier;
+
----------------
Should remove the diagId = from the else clause.


http://reviews.llvm.org/D16965





More information about the cfe-commits mailing list