r259192 - Implement TemplateArgument::dump() method for debugging, patterned after TemplateName::dump().

Yaron Keren via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 29 11:13:46 PST 2016


OK.  There are more un-annotated dump() methods such
as TemplateName::dump(),
NestedNameSpecifier::dump(), ASTReader::dump(), ModuleMap::dump(),
MacroInfo::dump(),
...

Annotate all dump() methods LLVM_DUMP_METHOD ?



2016-01-29 19:37 GMT+02:00 Richard Smith <richard at metafoo.co.uk>:

> On 29 Jan 2016 5:50 a.m., "Yaron Keren via cfe-commits" <
> cfe-commits at lists.llvm.org> wrote:
> >
> > Author: yrnkrn
> > Date: Fri Jan 29 07:46:15 2016
> > New Revision: 259192
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=259192&view=rev
> > Log:
> > Implement TemplateArgument::dump() method for debugging, patterned after
> TemplateName::dump().
> >
> >
> > Modified:
> >     cfe/trunk/include/clang/AST/TemplateBase.h
> >     cfe/trunk/lib/AST/TemplateBase.cpp
> >
> > Modified: cfe/trunk/include/clang/AST/TemplateBase.h
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TemplateBase.h?rev=259192&r1=259191&r2=259192&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/include/clang/AST/TemplateBase.h (original)
> > +++ cfe/trunk/include/clang/AST/TemplateBase.h Fri Jan 29 07:46:15 2016
> > @@ -354,6 +354,12 @@ public:
> >    /// \brief Print this template argument to the given output stream.
> >    void print(const PrintingPolicy &Policy, raw_ostream &Out) const;
> >
> > +  /// \brief Debugging aid that dumps the template argument.
> > +  void dump(raw_ostream &Out) const;
> > +
> > +  /// \brief Debugging aid that dumps the template argument to standard
> error.
> > +  void dump() const;
> > +
> >    /// \brief Used to insert TemplateArguments into FoldingSets.
> >    void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context)
> const;
> >  };
> >
> > Modified: cfe/trunk/lib/AST/TemplateBase.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TemplateBase.cpp?rev=259192&r1=259191&r2=259192&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/lib/AST/TemplateBase.cpp (original)
> > +++ cfe/trunk/lib/AST/TemplateBase.cpp Fri Jan 29 07:46:15 2016
> > @@ -415,6 +415,15 @@ void TemplateArgument::print(const Print
> >    }
> >  }
> >
> > +void TemplateArgument::dump(raw_ostream &Out) const {
> > +  LangOptions LO; // FIXME! see also TemplateName::dump().
> > +  LO.CPlusPlus = true;
> > +  LO.Bool = true;
> > +  print(PrintingPolicy(LO), Out);
> > +}
> > +
> > +void TemplateArgument::dump() const { dump(llvm::errs()); }
>
> This should be annotated with LLVM_DUMP_METHOD.
>
> > +
> >
>  //===----------------------------------------------------------------------===//
> >  // TemplateArgumentLoc Implementation
> >
>  //===----------------------------------------------------------------------===//
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160129/1e590431/attachment.html>


More information about the cfe-commits mailing list