[cfe-commits] r76804 - /cfe/trunk/lib/Sema/SemaDecl.cpp
Douglas Gregor
dgregor at apple.com
Wed Jul 22 15:05:02 PDT 2009
Author: dgregor
Date: Wed Jul 22 17:05:02 2009
New Revision: 76804
URL: http://llvm.org/viewvc/llvm-project?rev=76804&view=rev
Log:
Calls to Sema::MatchTemplateParametersToScopeSpecifier should not depend on the order of evaluation of their arguments to be correct.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=76804&r1=76803&r2=76804&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Jul 22 17:05:02 2009
@@ -1854,7 +1854,7 @@
= MatchTemplateParametersToScopeSpecifier(
D.getDeclSpec().getSourceRange().getBegin(),
D.getCXXScopeSpec(),
- (TemplateParameterList**)TemplateParamLists.release(),
+ (TemplateParameterList**)TemplateParamLists.get(),
TemplateParamLists.size())) {
if (TemplateParams->size() > 0) {
// There is no such thing as a variable template.
@@ -2229,7 +2229,7 @@
= MatchTemplateParametersToScopeSpecifier(
D.getDeclSpec().getSourceRange().getBegin(),
D.getCXXScopeSpec(),
- (TemplateParameterList**)TemplateParamLists.release(),
+ (TemplateParameterList**)TemplateParamLists.get(),
TemplateParamLists.size())) {
if (TemplateParams->size() > 0) {
// This is a function template
@@ -2241,6 +2241,9 @@
} else {
// FIXME: Handle function template specializations
}
+
+ // FIXME: Free this memory properly.
+ TemplateParamLists.release();
}
// C++ [dcl.fct.spec]p5:
More information about the cfe-commits
mailing list