================
Comment at: lib/Parse/ParseDecl.cpp:4819
@@ -4816,1 +4818,3 @@
+         (D.getDeclSpec().isFriendSpecified() ||
+          D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static));
       Sema::CXXThisScopeRAII ThisScope(Actions,
----------------
Richard Smith wrote:
> This doesn't look right: you're checking for 'static' on member declarations 
> within a class, but not checking for staticness of method definitions outside 
> a class (and you're not applying the rule that 'operator new' and 'operator 
> delete' are implicitly static).
> 
> In short: you can't tell whether a method is static from here (because that 
> requires name lookup).
Thank you for clarification.

I will drop the 'static' case for now and file a bug for future reference, but 
'friend' case seems like fixed.


http://llvm-reviews.chandlerc.com/D468
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to