diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-11-20 04:42:34 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-11-20 04:42:34 +0000 |
| commit | 68e486804fc5cd636730090f454e642954a22083 (patch) | |
| tree | 5ffc2b9bf6f6b25dee120a59a9c076438a9381ff /clang/lib/Sema/SemaDeclAttr.cpp | |
| parent | e42592e33afcef2d9603e87f93175104534787c7 (diff) | |
| download | bcm5719-llvm-68e486804fc5cd636730090f454e642954a22083.tar.gz bcm5719-llvm-68e486804fc5cd636730090f454e642954a22083.zip | |
Rename IdentifierInfo::isName to ::isStr. Use a nifty trick
from Sebastian to enforce that a literal string is passed in,
and use this to avoid having to call strlen on it.
llvm-svn: 59706
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 57d1cc7fa0b..1e3a310305c 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -555,12 +555,12 @@ static void HandleObjCGCAttr(Decl *d, const AttributeList &Attr, Sema &S) { ObjCGCAttr::GCAttrTypes type; - if (Attr.getParameterName()->isName("weak")) { + if (Attr.getParameterName()->isStr("weak")) { if (isa<FieldDecl>(d)) S.Diag(Attr.getLoc(), diag::warn_attribute_weak_on_field); type = ObjCGCAttr::Weak; } - else if (Attr.getParameterName()->isName("strong")) + else if (Attr.getParameterName()->isStr("strong")) type = ObjCGCAttr::Strong; else { S.Diag(Attr.getLoc(), diag::warn_attribute_type_not_supported) @@ -584,7 +584,7 @@ static void HandleBlocksAttr(Decl *d, const AttributeList &Attr, Sema &S) { } BlocksAttr::BlocksAttrTypes type; - if (Attr.getParameterName()->isName("byref")) + if (Attr.getParameterName()->isStr("byref")) type = BlocksAttr::ByRef; else { S.Diag(Attr.getLoc(), diag::warn_attribute_type_not_supported) |

