From ecf81c09f5ac4de9910829dab947e5dc763bd6a8 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 19 Nov 2013 22:18:24 +0000 Subject: Switching some string literals to be generated by the AttributeList object itself. llvm-svn: 195160 --- clang/lib/Sema/SemaDeclAttr.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang/lib/Sema/SemaDeclAttr.cpp') diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 3e583862092..4d0c6771e98 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -3662,7 +3662,7 @@ static void handleConstantAttr(Sema &S, Decl *D, const AttributeList &Attr) { CUDAConstantAttr(Attr.getRange(), S.Context, Attr.getAttributeSpellingListIndex())); } else { - S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "constant"; + S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << Attr.getName(); } } @@ -3685,7 +3685,7 @@ static void handleDeviceAttr(Sema &S, Decl *D, const AttributeList &Attr) { CUDADeviceAttr(Attr.getRange(), S.Context, Attr.getAttributeSpellingListIndex())); } else { - S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "device"; + S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << Attr.getName(); } } @@ -3716,7 +3716,7 @@ static void handleGlobalAttr(Sema &S, Decl *D, const AttributeList &Attr) { CUDAGlobalAttr(Attr.getRange(), S.Context, Attr.getAttributeSpellingListIndex())); } else { - S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "global"; + S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << Attr.getName(); } } @@ -3732,7 +3732,7 @@ static void handleHostAttr(Sema &S, Decl *D, const AttributeList &Attr) { CUDAHostAttr(Attr.getRange(), S.Context, Attr.getAttributeSpellingListIndex())); } else { - S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "host"; + S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << Attr.getName(); } } @@ -3748,7 +3748,7 @@ static void handleSharedAttr(Sema &S, Decl *D, const AttributeList &Attr) { CUDASharedAttr(Attr.getRange(), S.Context, Attr.getAttributeSpellingListIndex())); } else { - S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << "shared"; + S.Diag(Attr.getLoc(), diag::warn_attribute_ignored) << Attr.getName(); } } -- cgit v1.2.3