https://llvm.org/bugs/show_bug.cgi?id=24330
Bug ID: 24330 Summary: clang could emit a different diagnosti when main() uses type deduction + fixIt Product: clang Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: dav...@freebsd.org CC: dgre...@apple.com, llvmbugs@cs.uiuc.edu Classification: Unclassified This is mainly my personal taste, but I think clang could emit a different diagnostic when 'auto' is used as return type, e.g. " type-deduction is not allowed for main". main.cpp:1:1: error: 'main' must return 'int' auto main() ^~~~ int 1 error generated. Also, it seems we emit a note in C but we don't in C++. Maybe a FixIt could be used? i.e. "maybe you int main(void)" ./clang main.c main.c:1:1: warning: return type of 'main' is not 'int' [-Wmain-return-type] float main() ^ main.c:1:1: note: change return type to 'int' float main() ^~~~~ int -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ LLVMbugs mailing list LLVMbugs@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs