rsmith added inline comments.
================
Comment at: lib/Parse/ParseTemplate.cpp:151-153
@@ -149,1 +150,5 @@
+ if (isSpecialization)
+ TemplateParmScopePtr->setFlags(TemplateParmScopePtr->getFlags() ^
+ Scope::TemplateParamScope);
+
----------------
Use `ParseScopeFlags` to change the flags here rather than calling `setFlags`
directly. Please also use `getFlags() & ~Scope::TemplateParamScope` rather than
`^` to make it more obvious that you're clearing the flag not just flipping it.
================
Comment at: lib/Sema/SemaLambda.cpp:818
@@ -817,3 +817,3 @@
if (Scope *TmplScope = CurScope->getTemplateParamParent())
- if (!TmplScope->decl_empty())
+ if (TmplScope->isTemplateParamScope())
KnownDependent = true;
----------------
This should not be necessary. It looks like `Scope::setFlags` fails to update
`TemplateParamParent` (etc) if the relevant flag changes. Instead of adding
this `if`, try changing the body of `Scope::setFlags` to call `Init(AnyParent,
F);`.
http://reviews.llvm.org/D19175
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits