diff options
| author | Bill Wendling <isanbard@gmail.com> | 2019-01-27 07:24:03 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2019-01-27 07:24:03 +0000 |
| commit | ff57307bd6b19420e21bd3000ecc346f5c65048b (patch) | |
| tree | 7b701ec7bb6ef9f120372bb06a6d95d5d91e643b /clang/test | |
| parent | a0f743b77a9e7ee061ed052537a2a7df7b9475bc (diff) | |
| download | bcm5719-llvm-ff57307bd6b19420e21bd3000ecc346f5c65048b.tar.gz bcm5719-llvm-ff57307bd6b19420e21bd3000ecc346f5c65048b.zip | |
Remove Expr sugar decorating the CXXUuidofExpr node.
Summary: Sugar, like ConstantExpr, causes an infinite expansion of the template object.
Reviewers: rsmith, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: riccibruno, aaron.ballman, cfe-commits, tzik, rnk
Differential Revision: https://reviews.llvm.org/D57114
llvm-svn: 352307
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaCXX/PR40395.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/PR40395.cpp b/clang/test/SemaCXX/PR40395.cpp new file mode 100644 index 00000000000..469c86d5620 --- /dev/null +++ b/clang/test/SemaCXX/PR40395.cpp @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -std=c++17 -fms-extensions -triple=x86_64-pc-win32 -verify %s +// expected-no-diagnostics + +// PR40395 - ConstantExpr shouldn't cause the template object to infinitely +// expand. +struct _GUID {}; +struct __declspec(uuid("{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}")) B {}; + +template <const _GUID* piid> +struct A { + virtual void baz() { A<piid>(); } +}; + +void f() { + A<&__uuidof(B)>(); +} |

