summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-05 18:15:24 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-05 18:15:24 +0000
commit5101c24f60997b3775624f5c9488ded8e9f3cdf2 (patch)
tree2807802cd135f700026aa90f8d842508b2630d5a /clang/lib/Parse
parent43c08918389ca2f928a94a4f2a5faa256a10e8e4 (diff)
downloadbcm5719-llvm-5101c24f60997b3775624f5c9488ded8e9f3cdf2.tar.gz
bcm5719-llvm-5101c24f60997b3775624f5c9488ded8e9f3cdf2.zip
Representation of template type parameters and non-type template
parameters, with some semantic analysis: - Template parameters are introduced into template parameter scope - Complain about template parameter shadowing (except in Microsoft mode) Note that we leak template parameter declarations like crazy, a problem we'll remedy once we actually create proper declarations for templates. Next up: dependent types and value-dependent/type-dependent expressions. llvm-svn: 60597
Diffstat (limited to 'clang/lib/Parse')
-rw-r--r--clang/lib/Parse/ParseTemplate.cpp2
-rw-r--r--clang/lib/Parse/Parser.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp
index 6bcf81d906a..5801f9ecb77 100644
--- a/clang/lib/Parse/ParseTemplate.cpp
+++ b/clang/lib/Parse/ParseTemplate.cpp
@@ -41,7 +41,7 @@ Parser::DeclTy *Parser::ParseTemplateDeclaration(unsigned Context) {
SourceLocation TemplateLoc = ConsumeToken();
// Enter template-parameter scope.
- EnterScope(Scope::TemplateParamScope|Scope::DeclScope);
+ EnterScope(Scope::TemplateParamScope);
// Try to parse the template parameters, and the declaration if
// successful.
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index f23fedf2b1b..bce73ccdeb4 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -441,7 +441,7 @@ Parser::DeclTy *Parser::ParseDeclarationOrFunctionDefinition() {
if (Tok.is(tok::l_brace)) {
// This recovery skips the entire function body. It would be nice
- // to simply call ParseFunctionDefintion() below, however Sema
+ // to simply call ParseFunctionDefinition() below, however Sema
// assumes the declarator represents a function, not a typedef.
ConsumeBrace();
SkipUntil(tok::r_brace, true);
OpenPOWER on IntegriCloud