PR4122: Tweak the ambiguity handling to handle (S())() correctly.  I've 
left out handling for stuff like (S())++ for the moment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72394 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx-ambig-paren-expr.cpp b/test/Parser/cxx-ambig-paren-expr.cpp
index 0069561..6f23b35 100644
--- a/test/Parser/cxx-ambig-paren-expr.cpp
+++ b/test/Parser/cxx-ambig-paren-expr.cpp
@@ -16,4 +16,11 @@
   typedef int *PT;
   // Make sure stuff inside the parens are parsed only once (only one warning).
   x = (PT()[(int){1}]); // expected-warning {{compound literals}}
+
+  // Special case: empty parens is a call, not an expression
+  struct S{int operator()();};
+  (S())();
+
+  // FIXME: Special case: "++" is postfix here, not prefix
+  // (S())++;
 }