r177336 - [frontend] Initialize the diagnostic client before loading an ast file.

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Mar 21 11:53:18 PDT 2013


On Mar 21, 2013, at 11:08 AM, Richard Smith <richard at metafoo.co.uk> wrote:

> Delayed template parsing is not supported by the ast serialization system yet. Maybe use-fno-delayed-template-parsing or run cc1 directly instead of the driver?
> 
> 

Aaron, could you try Richard's suggestion, I don't have a windows machine to test.


> On 21 Mar 2013 09:17, "Aaron Ballman" <aaron at aaronballman.com> wrote:
> I am seeing the same breakage as Guy, and it's turning the build bots
> red.  Can you look into this?
> 
> Thanks!
> 
> ~Aaron
> 
> On Tue, Mar 19, 2013 at 9:15 AM, Benyei, Guy <guy.benyei at intel.com> wrote:
> > Hi Argyrios,
> > The test you've added here fails when I build it on Windows. For some reason, when compiling C++ to AST and then compiling AST to llvm, the S<T>::mf function is declared but not defined in the resulting module. It seems to me a buggy behavior.
> >
> > Any insights on this issue?
> >
> > Thanks
> >    Guy
> >
> > -----Original Message-----
> > From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-bounces at cs.uiuc.edu] On Behalf Of Argyrios Kyrtzidis
> > Sent: Tuesday, March 19, 2013 00:55
> > To: cfe-commits at cs.uiuc.edu
> > Subject: r177336 - [frontend] Initialize the diagnostic client before loading an ast file.
> >
> > Author: akirtzidis
> > Date: Mon Mar 18 17:55:24 2013
> > New Revision: 177336
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=177336&view=rev
> > Log:
> > [frontend] Initialize the diagnostic client before loading an ast file.
> >
> > Issue reported by Tom Honermann!
> > http://llvm.org/bugs/show_bug.cgi?id=15377
> >
> > Added:
> >     cfe/trunk/test/Frontend/ast-main.cpp
> > Modified:
> >     cfe/trunk/lib/Frontend/FrontendAction.cpp
> >
> > Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
> > URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendAction.cpp?rev=177336&r1=177335&r2=177336&view=diff
> > ==============================================================================
> > --- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
> > +++ cfe/trunk/lib/Frontend/FrontendAction.cpp Mon Mar 18 17:55:24 2013
> > @@ -188,6 +188,10 @@ bool FrontendAction::BeginSourceFile(Com
> >
> >      setCurrentInput(Input, AST);
> >
> > +    // Inform the diagnostic client we are processing a source file.
> > +    CI.getDiagnosticClient().BeginSourceFile(CI.getLangOpts(), 0);
> > +    HasBegunSourceFile = true;
> > +
> >      // Set the shared objects, these are reset when we finish processing the
> >      // file, otherwise the CompilerInstance will happily destroy them.
> >      CI.setFileManager(&AST->getFileManager());
> >
> > Added: cfe/trunk/test/Frontend/ast-main.cpp
> > URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/ast-main.cpp?rev=177336&view=auto
> > ==============================================================================
> > --- cfe/trunk/test/Frontend/ast-main.cpp (added)
> > +++ cfe/trunk/test/Frontend/ast-main.cpp Mon Mar 18 17:55:24 2013
> > @@ -0,0 +1,22 @@
> > +// RUN: %clang -emit-llvm -S -o %t1.ll -x c++ - < %s // RUN: %clang
> > +-emit-ast -o %t.ast %s // RUN: %clang -emit-llvm -S -o %t2.ll -x ast -
> > +< %t.ast // RUN: diff %t1.ll %t2.ll
> > +
> > +// http://llvm.org/bugs/show_bug.cgi?id=15377
> > +template<typename T>
> > +struct S {
> > +    T *mf();
> > +};
> > +template<typename T>
> > +T *S<T>::mf() {
> > +    // warning: control reaches end of non-void function
> > +[-Wreturn-type] }
> > +
> > +void f() {
> > +    S<int>().mf();
> > +}
> > +
> > +int main() {
> > +  return 0;
> > +}
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> > ---------------------------------------------------------------------
> > Intel Israel (74) Limited
> >
> > This e-mail and any attachments may contain confidential material for
> > the sole use of the intended recipient(s). Any review or distribution
> > by others is strictly prohibited. If you are not the intended
> > recipient, please contact the sender and delete all copies.
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130321/73eb4a49/attachment.html>


More information about the cfe-commits mailing list