[cfe-commits] r128075 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/warn-missing-prototypes.cpp

John McCall rjmccall at apple.com
Tue Mar 22 00:16:37 PDT 2011


Author: rjmccall
Date: Tue Mar 22 02:16:37 2011
New Revision: 128075

URL: http://llvm.org/viewvc/llvm-project?rev=128075&view=rev
Log:
Apply Jonathan Sauer's proposed solution to PR9519.  Thanks!


Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp
    cfe/trunk/test/SemaCXX/warn-missing-prototypes.cpp

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=128075&r1=128074&r2=128075&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Tue Mar 22 02:16:37 2011
@@ -5513,7 +5513,7 @@
     return false;
 
   // Don't warn about inline functions.
-  if (FD->isInlineSpecified())
+  if (FD->isInlined())
     return false;
 
   // Don't warn about function templates.

Modified: cfe/trunk/test/SemaCXX/warn-missing-prototypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/warn-missing-prototypes.cpp?rev=128075&r1=128074&r2=128075&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/warn-missing-prototypes.cpp (original)
+++ cfe/trunk/test/SemaCXX/warn-missing-prototypes.cpp Tue Mar 22 02:16:37 2011
@@ -24,3 +24,9 @@
 
 // Don't warn when instantiating function templates.
 template void h<int>();
+
+// PR9519: don't warn about friend functions.
+class I {
+  friend void I_friend() {}
+};
+





More information about the cfe-commits mailing list