aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-02-27 22:18:07 +0000
committerTed Kremenek <kremenek@apple.com>2008-02-27 22:18:07 +0000
commitf5c93c160cb0c7d97d52bf7f26370d9453d99777 (patch)
treed07d026ffe11c809ec65424c9122c4a7e66f5a23
parent2bebc40995fcbd45d970e7efc0ef20f945a16ce4 (diff)
Added parsing of attributes for functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47693 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Sema/SemaDecl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index e841787a58..df6dd5c2e1 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -732,8 +732,10 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
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.