functions. Fixes <rdar://problem/
9731999>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134897
91177308-0d34-0410-b5e6-
96231b3b80d8
// Implements C++ [basic.start.main]p5 and C99 5.1.2.2.3.
FD->setHasImplicitReturnZero(true);
WP.disableCheckFallThrough();
+ } else if (FD->hasAttr<NakedAttr>()) {
+ // If the function is marked 'naked', don't complain about missing return
+ // statements.
+ WP.disableCheckFallThrough();
}
// MSVC permits the use of pure specifier (=0) on function definition,
int a __attribute__((naked)); // expected-warning {{'naked' attribute only applies to functions}}
+__attribute__((naked)) int t0(void) {
+ __asm__ volatile("mov r0, #0");
+}
+
void t1() __attribute__((naked));
void t2() __attribute__((naked(2))); // expected-error {{attribute takes no arguments}}