diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2013-07-23 17:35:26 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2013-07-23 17:35:26 +0000 |
| commit | 086e428b5b9c0b8aef729f56522ffe1068a3cfd1 (patch) | |
| tree | 66f0d17f532e70d388c783881f2e1500044e82f9 /clang/lib/Sema | |
| parent | b08b115c4ad11cfc19abafd0778988ced4787c03 (diff) | |
| download | bcm5719-llvm-086e428b5b9c0b8aef729f56522ffe1068a3cfd1.tar.gz bcm5719-llvm-086e428b5b9c0b8aef729f56522ffe1068a3cfd1.zip | |
Going back to using getName for consistency.
llvm-svn: 186966
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 09d61e7b376..7a4a0caf943 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -2580,11 +2580,6 @@ static void handleSentinelAttr(Sema &S, Decl *D, const AttributeList &Attr) { return; } - // Normalize the attribute name, __foo__ becomes foo. - StringRef AttrName = Attr.getName()->getName(); - if (AttrName.startswith("__") && AttrName.endswith("__")) - AttrName = AttrName.substr(2, AttrName.size() - 4); - unsigned sentinel = 0; if (Attr.getNumArgs() > 0) { Expr *E = Attr.getArg(0); @@ -2592,7 +2587,7 @@ static void handleSentinelAttr(Sema &S, Decl *D, const AttributeList &Attr) { if (E->isTypeDependent() || E->isValueDependent() || !E->isIntegerConstantExpr(Idx, S.Context)) { S.Diag(Attr.getLoc(), diag::err_attribute_argument_n_type) - << "'" + AttrName.str() + "'" << 1 << ArgumentIntegerConstant + << Attr.getName() << 1 << ArgumentIntegerConstant << E->getSourceRange(); return; } @@ -2613,7 +2608,7 @@ static void handleSentinelAttr(Sema &S, Decl *D, const AttributeList &Attr) { if (E->isTypeDependent() || E->isValueDependent() || !E->isIntegerConstantExpr(Idx, S.Context)) { S.Diag(Attr.getLoc(), diag::err_attribute_argument_n_type) - << "'" + AttrName.str() + "'" << 2 << ArgumentIntegerConstant + << Attr.getName() << 2 << ArgumentIntegerConstant << E->getSourceRange(); return; } |

