djasper added inline comments.
================ Comment at: lib/Sema/SemaDecl.cpp:11652 static bool ShouldWarnAboutMissingPrototype(const FunctionDecl *FD, - const FunctionDecl*& PossibleZeroParamPrototype) { + const FunctionDecl*& PossibleZeroParamPrototype, + bool *PossibleMissingStatic) { ---------------- Fix the format while here? ================ Comment at: lib/Sema/SemaDecl.cpp:11653 + const FunctionDecl*& PossibleZeroParamPrototype, + bool *PossibleMissingStatic) { // Don't warn about invalid declarations. ---------------- Maybe s/Possible/Possibly/ ? ================ Comment at: lib/Sema/SemaDecl.cpp:11708 + FD->getDeclContext()->isTranslationUnit() && + FD->getStorageClass() == SC_None; + ---------------- Does this exclude templated functions? If not, the "static" might be put into the wrong place. ================ Comment at: lib/Sema/SemaDecl.cpp:12114 + auto DiagBuilder = + Diag(FD->getLocation(), diag::warn_missing_prototype_maybe_static) + << FD; ---------------- I wonder whether it is useful to display the changed message here. In the cases I have seen where the function definition is coming from a macro, you'd actually need to surround it with an unnamed namespace to fix. Maybe just add this logic to the outer if statement? https://reviews.llvm.org/D32170 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits