<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">These tests are failing on a windows buildbot.<div><br></div><div><pre style="font-family: 'Courier New', courier, monotype, monospace; "><span class="stdout">Failing Tests (3):
      Clang :: CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp
      Clang :: CXX/expr/expr.unary/expr.sizeof/p1.cpp
      Clang :: Parser/expressions.c</span></pre><div><br></div><div>- Fariborz</div><div><br></div><div><div>On Oct 8, 2013, at 9:56 AM, Serge Pavlov <<a href="mailto:sepavloff@gmail.com">sepavloff@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Author: sepavloff<br>Date: Tue Oct  8 11:56:30 2013<br>New Revision: 192200<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=192200&view=rev">http://llvm.org/viewvc/llvm-project?rev=192200&view=rev</a><br>Log:<br>Add fixits suggesting parenthesis around type name in expressions like sizeof.<br>This fixes PR16992 - Fixit missing when "sizeof type" found.<br><br>Modified:<br>    cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td<br>    cfe/trunk/lib/Parse/ParseExpr.cpp<br>    cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp<br>    cfe/trunk/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp<br>    cfe/trunk/test/Parser/expressions.c<br><br>Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=192200&r1=192199&r2=192200&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=192200&r1=192199&r2=192200&view=diff</a><br>==============================================================================<br>--- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)<br>+++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Tue Oct  8 11:56:30 2013<br>@@ -310,6 +310,8 @@ def err_unspecified_vla_size_with_static<br> def warn_deprecated_register : Warning<<br>   "'register' storage class specifier is deprecated">,<br>   InGroup<DeprecatedRegister>;<br>+def err_missed_parenthesis_around_typename : Error<<br>+  "missed parenthesis around the type name in %0">;<br><br> def err_expected_case_before_expression: Error<<br>   "expected 'case' keyword before expression">;<br><br>Modified: cfe/trunk/lib/Parse/ParseExpr.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=192200&r1=192199&r2=192200&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=192200&r1=192199&r2=192200&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)<br>+++ cfe/trunk/lib/Parse/ParseExpr.cpp Tue Oct  8 11:56:30 2013<br>@@ -1589,6 +1589,28 @@ Parser::ParseExprAfterUnaryExprOrTypeTra<br><br>   // If the operand doesn't start with an '(', it must be an expression.<br>   if (Tok.isNot(tok::l_paren)) {<br>+    // If construct allows a form without parenthesis, user may forget to put<br>+    // pathenthesis around type name.<br>+    if (<a href="http://OpTok.is">OpTok.is</a>(tok::kw_sizeof)  || <a href="http://OpTok.is">OpTok.is</a>(tok::kw___alignof) ||<br>+        <a href="http://OpTok.is">OpTok.is</a>(tok::kw_alignof) || <a href="http://OpTok.is">OpTok.is</a>(tok::kw__Alignof)) {<br>+      bool isAmbiguousTypeId;<br>+      if (isTypeIdInParens(isAmbiguousTypeId)) {<br>+        DeclSpec DS(AttrFactory);<br>+        ParseSpecifierQualifierList(DS);<br>+        Declarator DeclaratorInfo(DS, Declarator::TypeNameContext);<br>+        ParseDeclarator(DeclaratorInfo);<br>+<br>+        SourceLocation LParenLoc = PP.getLocForEndOfToken(OpTok.getLocation());<br>+        SourceLocation RParenLoc = PP.getLocForEndOfToken(PrevTokLocation);<br>+        Diag(LParenLoc, diag::err_missed_parenthesis_around_typename)<br>+          << OpTok.getName()<br>+          << FixItHint::CreateInsertion(LParenLoc, "(")<br>+          << FixItHint::CreateInsertion(RParenLoc, ")");<br>+        isCastExpr = true;<br>+        return ExprEmpty();<br>+      }<br>+    }<br>+<br>     isCastExpr = false;<br>     if (<a href="http://OpTok.is">OpTok.is</a>(tok::kw_typeof) && !getLangOpts().CPlusPlus) {<br>       Diag(Tok,diag::err_expected_lparen_after_id) << OpTok.getIdentifierInfo();<br><br>Modified: cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp?rev=192200&r1=192199&r2=192200&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp?rev=192200&r1=192199&r2=192200&view=diff</a><br>==============================================================================<br>--- cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp (original)<br>+++ cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.align/p7.cpp Tue Oct  8 11:56:30 2013<br>@@ -14,3 +14,7 @@ template<typename T, typename A, int N><br><br> static_assert(alignof(Y<char, int, sizeof(int)>) == alignof(int), "");<br> static_assert(alignof(Y<int, char, 1>) == alignof(int), ""); // expected-note {{in instantiation of}}<br>+<br>+void pr16992 () {<br>+  int x = alignof int;  // expected-error{{missed parenthesis around the type name in alignof}}<br>+}<br><br>Modified: cfe/trunk/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp?rev=192200&r1=192199&r2=192200&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp?rev=192200&r1=192199&r2=192200&view=diff</a><br>==============================================================================<br>--- cfe/trunk/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp (original)<br>+++ cfe/trunk/test/CXX/expr/expr.unary/expr.sizeof/p1.cpp Tue Oct  8 11:56:30 2013<br>@@ -26,3 +26,23 @@ void test2() {<br>   x = sizeof(test2()); // expected-error {{invalid application of 'sizeof' to an incomplete type 'void'}}<br>   x = sizeof(test2); // expected-error {{invalid application of 'sizeof' to a function type}}<br> }<br>+<br>+namespace pr16992 {<br>+<br>+template<typename T> struct ABC {<br>+  int func () {<br>+    return sizeof T;  //expected-error{{missed parenthesis around the type name in sizeof}}<br>+  }<br>+};<br>+<br>+ABC<int> qq;<br>+<br>+template<typename T> struct ABC2 {<br>+  int func () {<br>+    return sizeof T::A;<br>+  }<br>+};<br>+<br>+struct QQ { int A; };<br>+ABC2<QQ> qq2;<br>+}<br><br>Modified: cfe/trunk/test/Parser/expressions.c<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/expressions.c?rev=192200&r1=192199&r2=192200&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/expressions.c?rev=192200&r1=192199&r2=192200&view=diff</a><br>==============================================================================<br>--- cfe/trunk/test/Parser/expressions.c (original)<br>+++ cfe/trunk/test/Parser/expressions.c Tue Oct  8 11:56:30 2013<br>@@ -57,3 +57,13 @@ void test7() {<br>     ({} // expected-note {{to match}}<br>     ;   // expected-error {{expected ')'}}<br> }<br>+<br>+// PR16992<br>+struct pr16992 { int x; };<br>+<br>+void func_16992 () {<br>+  int x1 = sizeof int;  // expected-error{{missed parenthesis around the type name in sizeof}}<br>+  int x2 = sizeof struct pr16992;  // expected-error{{missed parenthesis around the type name in sizeof}}<br>+  int x3 = __alignof int;  // expected-error{{missed parenthesis around the type name in __alignof}}<br>+  int x4 = _Alignof int;  // expected-error{{missed parenthesis around the type name in _Alignof}}<br>+}<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote></div><br></div></body></html>