summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2013-12-12 01:34:39 +0000
committerAaron Ballman <aaron@aaronballman.com>2013-12-12 01:34:39 +0000
commit75a1729c4b474e588586594ff6b12434360306ab (patch)
tree27555846d67a5b9acec3d0b123eacdcd8e61a2ae /clang/lib/Sema/SemaDeclAttr.cpp
parentc934e4fd2ce25d0fece0e7aa04c4a4c52edb62ff (diff)
downloadbcm5719-llvm-75a1729c4b474e588586594ff6b12434360306ab.tar.gz
bcm5719-llvm-75a1729c4b474e588586594ff6b12434360306ab.zip
Added a Subjects clause to the section attribute and made its diagnostics more consistent with other attributes.
llvm-svn: 197104
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 0edef9e52a4..f96add14826 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -2349,12 +2349,6 @@ static void handleSectionAttr(Sema &S, Decl *D, const AttributeList &Attr) {
return;
}
- // This attribute cannot be applied to local variables.
- if (isa<VarDecl>(D) && cast<VarDecl>(D)->hasLocalStorage()) {
- S.Diag(LiteralLoc, diag::err_attribute_section_local_variable);
- return;
- }
-
unsigned Index = Attr.getAttributeSpellingListIndex();
SectionAttr *NewAttr = S.mergeSectionAttr(D, Attr.getRange(), Str, Index);
if (NewAttr)
OpenPOWER on IntegriCloud