Follow-up to r281367: Compare uuids case-insensitively.
authorNico Weber <nicolasweber@gmx.de>
Wed, 14 Sep 2016 01:16:54 +0000 (01:16 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 14 Sep 2016 01:16:54 +0000 (01:16 +0000)
llvm-svn: 281430

clang/lib/Sema/SemaDeclAttr.cpp
clang/test/SemaCXX/ms-uuid.cpp

index c23db57..a0c0e81 100644 (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);
index 2192f67..461e3c1 100644 (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: