[cfe-commits] r47693 - /cfe/trunk/Sema/SemaDecl.cpp

Ted Kremenek kremenek at apple.com
Wed Feb 27 14:18:09 PST 2008


Author: kremenek
Date: Wed Feb 27 16:18:07 2008
New Revision: 47693

URL: http://llvm.org/viewvc/llvm-project?rev=47693&view=rev
Log:
Added parsing of attributes for functions.

Modified:
    cfe/trunk/Sema/SemaDecl.cpp

Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=47693&r1=47692&r2=47693&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Wed Feb 27 16:18:07 2008
@@ -732,8 +732,10 @@
     FunctionDecl *NewFD = new FunctionDecl(D.getIdentifierLoc(), II, R, SC,
                                            D.getDeclSpec().isInlineSpecified(),
                                            LastDeclarator);
-    // FIXME: Handle attributes: should delete anything left.
-    D.getDeclSpec().SetAttributes(0);
+    // Handle attributes.
+
+    HandleDeclAttributes(NewFD, D.getDeclSpec().getAttributes(),
+                         D.getAttributes());
     
     // Merge the decl with the existing one if appropriate. Since C functions
     // are in a flat namespace, make sure we consider decls in outer scopes.





More information about the cfe-commits mailing list