Sema: Implement DR317

Summary:
Declaring a function as inline after it has been defined is in violation
of [dcl.fct.spec]p4.  The program would get a strong definition instead
of getting a function with linkonce_odr linkage.

Reviewers: rsmith

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3220

llvm-svn: 205129
diff --git a/clang/test/Parser/cxx-friend.cpp b/clang/test/Parser/cxx-friend.cpp
index a3b89cc..ace0ff2 100644
--- a/clang/test/Parser/cxx-friend.cpp
+++ b/clang/test/Parser/cxx-friend.cpp
@@ -30,7 +30,7 @@
   void f(A *a) { a->f(); }
 };
 
-void bar() {} // expected-note {{previous definition is here}}
+inline void bar() {} // expected-note {{previous definition is here}}
 class E {
   friend void bar() {} // expected-error {{redefinition of 'bar'}}
 };