forked from OSchip/llvm-project
clang: Exclude efi_main from -Wmissing-prototypes
When compiling UEFI applications, the main function is named efi_main() instead of main(). Let's exclude efi_main() from -Wmissing-prototypes as well to avoid warnings when working on UEFI applications. Differential Revision: https://reviews.llvm.org/D95746
This commit is contained in:
parent
5ec75c6007
commit
7dd42ecfa2
|
@ -13873,7 +13873,7 @@ ShouldWarnAboutMissingPrototype(const FunctionDecl *FD,
|
|||
// Don't warn about 'main'.
|
||||
if (isa<TranslationUnitDecl>(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.
|
||||
|
|
|
@ -4,3 +4,7 @@
|
|||
int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int efi_main() {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue