On Fri, Aug 14, 2015 at 7:15 AM, Davide Italiano
wrote:
> davide added a comment.
>
> Oops, I uploaded the wrong diff. Anyway, I changed can't to cannot and
> committed this as r245051.
> While looking at DiagnosticSemaKind.td I noticed there are still 7
> diagnostics that use can't instead of ca
davide added a comment.
Oops, I uploaded the wrong diff. Anyway, I changed can't to cannot and
committed this as r245051.
While looking at DiagnosticSemaKind.td I noticed there are still 7 diagnostics
that use can't instead of cannot. Are you OK if I change those? (in a
subsequent commit, of co
rsmith added a comment.
Looks good other than the diagnostic wording.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:513
@@ -512,1 +512,3 @@
"platform-specific data}0) must be of type %1">;
+def err_main_global_variable : Error<"main can't be declared as global
var
davide updated this revision to Diff 31932.
davide added a comment.
- Refactored check
- Added test for -ffreestanding in C
- Changed the diagnostic emitted
Also, thanks for your time and guidance.
http://reviews.llvm.org/D11658
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/Se
rsmith added a comment.
Maybe you could refactor the check to something like:
if (Name.isIdentifier() && Name.getAsIdentifierInfo()->isStr("main")
NewVD->getDeclContext()->getRedeclContext()->isTranslationUnit() &&
!getLangOpts().Freestanding && !NewVD->getDescribedVarTemplate()) {
On Thu, Jul 30, 2015 at 07:01:22PM +, Davide Italiano wrote:
> Index: test/CXX/basic/basic.start/basic.start.main/p3.cpp
> ===
> --- test/CXX/basic/basic.start/basic.start.main/p3.cpp
> +++ test/CXX/basic/basic.start/basic.start.ma
davide added a comment.
Hi Richard, do you have any comments on the new patch?
http://reviews.llvm.org/D11658
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits