Add fixits suggesting parenthesis around type name in expressions like sizeof.
This fixes PR16992 - Fixit missing when "sizeof type" found.

llvm-svn: 192200
diff --git a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp
index 93b1c64..05a3926 100644
--- a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp
+++ b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp
@@ -14,3 +14,7 @@
 
 static_assert(alignof(Y<char, int, sizeof(int)>) == alignof(int), "");
 static_assert(alignof(Y<int, char, 1>) == alignof(int), ""); // expected-note {{in instantiation of}}
+
+void pr16992 () {
+  int x = alignof int;  // expected-error{{missed parenthesis around the type name in alignof}}
+}
diff --git a/clang/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp b/clang/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp
index 77d7865..cd0747f 100644
--- a/clang/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp
+++ b/clang/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp
@@ -26,3 +26,23 @@
   x = sizeof(test2()); // expected-error {{invalid application of 'sizeof' to an incomplete type 'void'}}
   x = sizeof(test2); // expected-error {{invalid application of 'sizeof' to a function type}}
 }
+
+namespace pr16992 {
+
+template<typename T> struct ABC {
+  int func () {
+    return sizeof T;  //expected-error{{missed parenthesis around the type name in sizeof}}
+  }
+};
+
+ABC<int> qq;
+
+template<typename T> struct ABC2 {
+  int func () {
+    return sizeof T::A;
+  }
+};
+
+struct QQ { int A; };
+ABC2<QQ> qq2;
+}
diff --git a/clang/test/Parser/expressions.c b/clang/test/Parser/expressions.c
index 0d1b6c9..6c567f9 100644
--- a/clang/test/Parser/expressions.c
+++ b/clang/test/Parser/expressions.c
@@ -57,3 +57,13 @@
     ({} // expected-note {{to match}}
     ;   // expected-error {{expected ')'}}
 }
+
+// PR16992
+struct pr16992 { int x; };
+
+void func_16992 () {
+  int x1 = sizeof int;  // expected-error{{missed parenthesis around the type name in sizeof}}
+  int x2 = sizeof struct pr16992;  // expected-error{{missed parenthesis around the type name in sizeof}}
+  int x3 = __alignof int;  // expected-error{{missed parenthesis around the type name in __alignof}}
+  int x4 = _Alignof int;  // expected-error{{missed parenthesis around the type name in _Alignof}}
+}