Re: [PATCH] D14615: [C++] Add the "norecurse" attribute to main() if in C++ mode

2015-11-12 Thread James Molloy via cfe-commits
jmolloy updated this revision to Diff 40050. jmolloy added a comment. Hi Aaron, Thanks, this should all be fixed now. Cheers, James Repository: rL LLVM http://reviews.llvm.org/D14615 Files: lib/CodeGen/CodeGenFunction.cpp test/CodeGenCXX/main-norecurse.cpp test/CodeGenObjC/objc-lite

Re: [PATCH] D14615: [C++] Add the "norecurse" attribute to main() if in C++ mode

2015-11-12 Thread James Molloy via cfe-commits
jmolloy closed this revision. jmolloy added a comment. Thanks Aaron, committed in r252902. Repository: rL LLVM http://reviews.llvm.org/D14615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

Re: [PATCH] D14615: [C++] Add the "norecurse" attribute to main() if in C++ mode

2015-11-12 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. Yup. LG, thanks! Repository: rL LLVM http://reviews.llvm.org/D14615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14615: [C++] Add the "norecurse" attribute to main() if in C++ mode

2015-11-12 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. After fixing the FileCheck and grammar issues, LGTM! Repository: rL LLVM http://reviews.llvm.org/D14615 ___ cfe-commits mailing

Re: [PATCH] D14615: [C++] Add the "norecurse" attribute to main() if in C++ mode

2015-11-12 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:721 @@ +720,3 @@ + // to be norecurse by the standard (3.6.1.3 "The function main shall not be + // used within a program") + if (getLangOpts().CPlusPlus) Missing a period at the e

Re: [PATCH] D14615: [C++] Add the "norecurse" attribute to main() if in C++ mode

2015-11-12 Thread James Molloy via cfe-commits
jmolloy added inline comments. Comment at: test/CodeGenCXX/main-norecurse.cpp:1 @@ +1,2 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - + Wow, I managed to forget in my copy-paste from another test to add "| FileCheck %s" here. I'll update this before committing. Re

[PATCH] D14615: [C++] Add the "norecurse" attribute to main() if in C++ mode

2015-11-12 Thread James Molloy via cfe-commits
jmolloy created this revision. jmolloy added a reviewer: aaron.ballman. jmolloy added a subscriber: cfe-commits. jmolloy set the repository for this revision to rL LLVM. The C++ spec (3.6.1.3) says "The function `main` shall not be used within a program". This implies that it cannot recurse, so a