diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index cee107096947..0f5b5332364a 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -13873,7 +13873,7 @@ ShouldWarnAboutMissingPrototype(const FunctionDecl *FD, // Don't warn about 'main'. if (isa(FD->getDeclContext()->getRedeclContext())) if (IdentifierInfo *II = FD->getIdentifier()) - if (II->isStr("main")) + if (II->isStr("main") || II->isStr("efi_main")) return false; // Don't warn about inline functions. diff --git a/clang/test/Sema/no-warn-missing-prototype.c b/clang/test/Sema/no-warn-missing-prototype.c index 4dbc25755922..6059b6aa0f14 100644 --- a/clang/test/Sema/no-warn-missing-prototype.c +++ b/clang/test/Sema/no-warn-missing-prototype.c @@ -4,3 +4,7 @@ int main() { return 0; } + +int efi_main() { + return 0; +}