Skip to content

Commit

Permalink
[clang] Add a C++17 deduction guide testcase.
Browse files Browse the repository at this point in the history
From https://bugs.llvm.org/show_bug.cgi?id=47219.

It was crashing before the commit 1e14588.

Differential Revision: https://reviews.llvm.org/D92573
  • Loading branch information
hokein committed Dec 4, 2020
1 parent e2fc11c commit 5b9fc44
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions clang/test/PCH/cxx17-deduction-guide-decl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Test with pch.
// RUN: %clang_cc1 -emit-pch -std=c++17 -o %t %s
// RUN: %clang_cc1 -include-pch %t -emit-llvm -std=c++17 -o - %s

#ifndef HEADER
#define HEADER

namespace RP47219 {
typedef int MyInt;
template <typename T>
class Some {
public:
explicit Some(T, MyInt) {}
};

struct Foo {};
void ParseNatural() {
Some(Foo(), 1);
}
}

#else

#endif

0 comments on commit 5b9fc44

Please sign in to comment.