]> granicus.if.org Git - clang/commitdiff
Apply Jonathan Sauer's proposed solution to PR9519. Thanks!
authorJohn McCall <rjmccall@apple.com>
Tue, 22 Mar 2011 07:16:37 +0000 (07:16 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 22 Mar 2011 07:16:37 +0000 (07:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128075 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp
test/SemaCXX/warn-missing-prototypes.cpp

index f4381b235d5482b60631fc39690e7459cfbb8711..e4058d2c6ec805151c8c60ea6e25eb83ec65dd38 100644 (file)
@@ -5513,7 +5513,7 @@ static bool ShouldWarnAboutMissingPrototype(const FunctionDecl *FD) {
     return false;
 
   // Don't warn about inline functions.
-  if (FD->isInlineSpecified())
+  if (FD->isInlined())
     return false;
 
   // Don't warn about function templates.
index b6ebe820f39cd76c687109dbda5394241a052dfe..f7e8db38a4f699b9649aa81365a209e98b78b444 100644 (file)
@@ -24,3 +24,9 @@ template<typename> void h() { }
 
 // Don't warn when instantiating function templates.
 template void h<int>();
+
+// PR9519: don't warn about friend functions.
+class I {
+  friend void I_friend() {}
+};
+