PR19936: Fix a really dumb bug where we would profile dependent operator* expressions incorrectly.

llvm-svn: 210296
diff --git a/clang/test/SemaTemplate/dependent-names.cpp b/clang/test/SemaTemplate/dependent-names.cpp
index 5a25030..011e073 100644
--- a/clang/test/SemaTemplate/dependent-names.cpp
+++ b/clang/test/SemaTemplate/dependent-names.cpp
@@ -399,3 +399,18 @@
 using size_t = decltype(sizeof(0));
 void *operator new(size_t, OperatorNew::X); // expected-note-re {{should be declared prior to the call site{{$}}}}
 template void OperatorNew::f(OperatorNew::X); // expected-note {{instantiation of}}
+
+namespace PR19936 {
+  template<typename T> decltype(*T()) f() {} // expected-note {{previous}}
+  template<typename T> decltype(T() * T()) g() {} // expected-note {{previous}}
+
+  // Create some overloaded operators so we build an overload operator call
+  // instead of a builtin operator call for the dependent expression.
+  enum E {};
+  int operator*(E);
+  int operator*(E, E);
+
+  // Check that they still profile the same.
+  template<typename T> decltype(*T()) f() {} // expected-error {{redefinition}}
+  template<typename T> decltype(T() * T()) g() {} // expected-error {{redefinition}}
+}