[PATCH] D95746: clang: Exclude efi_main from -Wmissing-prototypes
Daan De Meyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 20 12:04:12 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7dd42ecfa2a2: clang: Exclude efi_main from -Wmissing-prototypes (authored by DaanDeMeyer).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95746/new/
https://reviews.llvm.org/D95746
Files:
clang/lib/Sema/SemaDecl.cpp
clang/test/Sema/no-warn-missing-prototype.c
Index: clang/test/Sema/no-warn-missing-prototype.c
===================================================================
--- clang/test/Sema/no-warn-missing-prototype.c
+++ clang/test/Sema/no-warn-missing-prototype.c
@@ -4,3 +4,7 @@
int main() {
return 0;
}
+
+int efi_main() {
+ return 0;
+}
Index: clang/lib/Sema/SemaDecl.cpp
===================================================================
--- clang/lib/Sema/SemaDecl.cpp
+++ clang/lib/Sema/SemaDecl.cpp
@@ -13873,7 +13873,7 @@
// 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95746.325225.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210220/0215a632/attachment.bin>
More information about the cfe-commits
mailing list