Ok, looks good now. Thanks! This is a really nice improvement.
================
Comment at: lib/Sema/SemaCodeComplete.cpp:3893-3896
@@ +3892,6 @@
+ else if (auto UME = dyn_cast<UnresolvedMemberExpr>(NakedFn)) {
+ TemplateArgumentListInfo TemplateArgsBuffer, *TemplateArgs = nullptr;
+ if (UME->hasExplicitTemplateArgs()) {
+ UME->copyTemplateArgumentsInto(TemplateArgsBuffer);
+ TemplateArgs = &TemplateArgsBuffer;
+ }
----------------
francisco.lopes wrote:
> klimek wrote:
> > I now understand the need for copying, but not why you need an extra
> > variable for the pointer instead of just passing &TemplateArgsBuffer below.
> There's a convention in the codebase that a parameter of type
> `TemplateArgumentListInfo *`, for explicit template arguments, may be checked
> for `nullptr` by the callee. Also, this snippet follows a pattern used
> elsewhere in the codebase.
/me headdesks; (the reason is that we only have it if
UME->hasExplicitTemplateArgs(), I completely missed that).
http://reviews.llvm.org/D6880
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits