r195160 - Switching some string literals to be generated by the AttributeList object itself.
Aaron Ballman
aaron at aaronballman.com
Tue Nov 19 14:18:24 PST 2013
Author: aaronballman
Date: Tue Nov 19 16:18:24 2013
New Revision: 195160
URL: http://llvm.org/viewvc/llvm-project?rev=195160&view=rev
Log:
Switching some string literals to be generated by the AttributeList object itself.
Modified:
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=195160&r1=195159&r2=195160&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Tue Nov 19 16:18:24 2013
@@ -3662,7 +3662,7 @@ static void handleConstantAttr(Sema &S,
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, De
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, De
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
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, De
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();
}
}
More information about the cfe-commits
mailing list