]> granicus.if.org Git - clang/commitdiff
Document how we intepret C++ DR 382
authorDouglas Gregor <dgregor@apple.com>
Wed, 2 Sep 2009 13:12:51 +0000 (13:12 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 2 Sep 2009 13:12:51 +0000 (13:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80785 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplate.cpp

index 8566789ccdf0e91acdb240bc5b3755a02b2a1350..f0165c91e10683169c9d4ada1a2e6c0038118fe7 100644 (file)
@@ -3033,6 +3033,12 @@ Sema::CheckTypenameType(NestedNameSpecifier *NNS, const IdentifierInfo &II,
     // instantiation, then build a typename type.
     if (!CurrentInstantiation)
       return Context.getTypenameType(NNS, &II);
+    
+    // The nested-name-specifier refers to the current instantiation, so the
+    // "typename" keyword itself is superfluous. In C++03, the program is
+    // actually ill-formed. However, DR 382 (in C++0x CD1) allows such 
+    // extraneous "typename" keywords, and we retroactively apply this DR to
+    // C++03 code.
   }
 
   DeclContext *Ctx = 0;