Document how we intepret C++ DR 382

llvm-svn: 80785
This commit is contained in:
Douglas Gregor 2009-09-02 13:12:51 +00:00
parent 2575dfc7ff
commit c707da6866
1 changed files with 6 additions and 0 deletions

View 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;