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
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
+++
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()) {
if