]> granicus.if.org Git - clang/commitdiff
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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281430 91177308-0d34-0410-b5e6-96231b3b80d8

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

index c23db57141536f6a5816f78f9e5b6857cd77f5af..a0c0e81d7ea10b3e6b145d153e0ca52f1086f6cf 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 2192f67eabc21d1ea48f5ab6bc8089731e864484..461e3c12ff8a01284ef1fc1e1336d5a158401d66 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: