summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmtAttr.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-01-16 13:03:14 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-01-16 13:03:14 +0000
commit591427889ead8b7c4c3211ef8cc55a9501eac064 (patch)
tree10787243973b03e34f7c66bd3d844d7dbf8e110a /lib/Sema/SemaStmtAttr.cpp
parentb52564aa96febc1e791dd26213c87c4a591251dc (diff)
downloadclang-591427889ead8b7c4c3211ef8cc55a9501eac064.tar.gz
Distinguish between attributes explicitly written at the request of the user, and attributes implicitly generated to assist in bookkeeping by the compiler. This is done so by table generating a CreateImplicit method for each attribute.
Additionally, remove the optional nature of the spelling list index when creating attributes. This is supported by table generating a Spelling enumeration when the spellings for an attribute are distinct enough to warrant it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmtAttr.cpp')
-rw-r--r--lib/Sema/SemaStmtAttr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmtAttr.cpp b/lib/Sema/SemaStmtAttr.cpp
index 80d203e3f5..9bb191d52b 100644
--- a/lib/Sema/SemaStmtAttr.cpp
+++ b/lib/Sema/SemaStmtAttr.cpp
@@ -40,7 +40,8 @@ static Attr *handleFallThroughAttr(Sema &S, Stmt *St, const AttributeList &A,
S.Diag(A.getRange().getBegin(), diag::err_fallthrough_attr_outside_switch);
return 0;
}
- return ::new (S.Context) FallThroughAttr(A.getRange(), S.Context);
+ return ::new (S.Context) FallThroughAttr(A.getRange(), S.Context,
+ A.getAttributeSpellingListIndex());
}