summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/ms-uuid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/ms-uuid.cpp')
-rw-r--r--clang/test/SemaCXX/ms-uuid.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/ms-uuid.cpp b/clang/test/SemaCXX/ms-uuid.cpp
index c26ea688e37..624ac0541db 100644
--- a/clang/test/SemaCXX/ms-uuid.cpp
+++ b/clang/test/SemaCXX/ms-uuid.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -Wno-deprecated-declarations
+// RUN: %clang_cc1 -fsyntax-only -std=c++17 -verify -fms-extensions %s -Wno-deprecated-declarations
typedef struct _GUID {
unsigned long Data1;
@@ -92,4 +93,16 @@ class __declspec(uuid("000000A0-0000-0000-C000-000000000049"))
// the previous case).
[uuid("000000A0-0000-0000-C000-000000000049"),
uuid("000000A0-0000-0000-C000-000000000049")] class C10;
+
+template <const GUID* p>
+void F1() {
+ // Regression test for PR24986. The given GUID should just work as a pointer.
+ const GUID* q = p;
+}
+
+void F2() {
+ // The UUID should work for a non-type template parameter.
+ F1<&__uuidof(C1)>();
+}
+
}
OpenPOWER on IntegriCloud