summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2013-08-10 05:54:47 +0000
committerSerge Pavlov <sepavloff@gmail.com>2013-08-10 05:54:47 +0000
commitb716b3ca1ff1fa66697a9506b9c347a4717b80e1 (patch)
treed926bae60339a48bd8d61a5b2adc9c975f3b5f9a /clang/lib
parent0b8e4a1e215d348ddd829b29f7ab3900d0d9e2ef (diff)
downloadbcm5719-llvm-b716b3ca1ff1fa66697a9506b9c347a4717b80e1.tar.gz
bcm5719-llvm-b716b3ca1ff1fa66697a9506b9c347a4717b80e1.zip
Avoid spurious error messages if parent template class cannot be instantiated
Differential Revision: http://llvm-reviews.chandlerc.com/D924 llvm-svn: 188133
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Parse/ParseDeclCXX.cpp7
-rw-r--r--clang/lib/Parse/ParseTemplate.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp
index e62be697893..64465bf66e2 100644
--- a/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/clang/lib/Parse/ParseDeclCXX.cpp
@@ -920,8 +920,13 @@ Parser::TypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc,
<< Id;
}
- if (!Template)
+ if (!Template) {
+ TemplateArgList TemplateArgs;
+ SourceLocation LAngleLoc, RAngleLoc;
+ ParseTemplateIdAfterTemplateName(TemplateTy(), IdLoc, SS,
+ true, LAngleLoc, TemplateArgs, RAngleLoc);
return true;
+ }
// Form the template name
UnqualifiedId TemplateName;
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp
index 92c59b029f9..5ab5cec0289 100644
--- a/clang/lib/Parse/ParseTemplate.cpp
+++ b/clang/lib/Parse/ParseTemplate.cpp
@@ -679,6 +679,8 @@ Parser::ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position) {
/// \param RAngleLoc the location of the consumed '>'.
///
/// \param ConsumeLastToken if true, the '>' is not consumed.
+///
+/// \returns true, if current token does not start with '>', false otherwise.
bool Parser::ParseGreaterThanInTemplateList(SourceLocation &RAngleLoc,
bool ConsumeLastToken) {
// What will be left once we've consumed the '>'.
OpenPOWER on IntegriCloud