Follow-up to r281367: Compare uuids case-insensitively.

llvm-svn: 281430
This commit is contained in:
Nico Weber 2016-09-14 01:16:54 +00:00
parent 1c16d1b576
commit d58c26090d
2 changed files with 3 additions and 2 deletions

View File

@ -4607,7 +4607,7 @@ static void handleObjCPreciseLifetimeAttr(Sema &S, Decl *D,
UuidAttr *Sema::mergeUuidAttr(Decl *D, SourceRange Range,
unsigned AttrSpellingListIndex, StringRef Uuid) {
if (const auto *UA = D->getAttr<UuidAttr>()) {
if (UA->getGuid() == Uuid)
if (UA->getGuid().equals_lower(Uuid))
return nullptr;
Diag(UA->getLocation(), diag::err_mismatched_uuid);
Diag(Range.getBegin(), diag::note_previous_uuid);

View File

@ -29,7 +29,8 @@ namespace {
// Both cl and clang-cl accept this:
class __declspec(uuid("000000A0-0000-0000-C000-000000000049")) C1;
class __declspec(uuid("000000A0-0000-0000-C000-000000000049")) C1;
class __declspec(uuid("000000a0-0000-0000-c000-000000000049")) C1;
class __declspec(uuid("{000000a0-0000-0000-C000-000000000049}")) C1;
class __declspec(uuid("000000A0-0000-0000-C000-000000000049")) C1 {};
// Both cl and clang-cl error out on this: