Index: test/SemaOpenCL/warn-missing-prototypes.cl
===================================================================
--- test/SemaOpenCL/warn-missing-prototypes.cl	(revision 0)
+++ test/SemaOpenCL/warn-missing-prototypes.cl	(revision 0)
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-prototypes %s
+
+void f() { } // expected-warning {{no previous prototype for function 'f'}}
+
+// Don't warn about kernel functions.
+kernel void g() { }
\ No newline at end of file
Index: lib/Sema/SemaDecl.cpp
===================================================================
--- lib/Sema/SemaDecl.cpp	(revision 160178)
+++ lib/Sema/SemaDecl.cpp	(working copy)
@@ -7478,6 +7478,10 @@
   if (FD->isFunctionTemplateSpecialization())
     return false;
 
+  // Don't warn for OpenCL kernels.
+  if (FD->hasAttr<OpenCLKernelAttr>())
+    return false;
+  
   bool MissingPrototype = true;
   for (const FunctionDecl *Prev = FD->getPreviousDecl();
        Prev; Prev = Prev->getPreviousDecl()) {
