r198887 - Attempting to appease the build bots on systems with ansi escape sequences.

Aaron Ballman aaron at aaronballman.com
Thu Jan 9 12:12:13 PST 2014


Author: aaronballman
Date: Thu Jan  9 14:12:12 2014
New Revision: 198887

URL: http://llvm.org/viewvc/llvm-project?rev=198887&view=rev
Log:
Attempting to appease the build bots on systems with ansi escape sequences.

Modified:
    cfe/trunk/lib/Parse/ParseDecl.cpp

Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=198887&r1=198886&r2=198887&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Thu Jan  9 14:12:12 2014
@@ -292,13 +292,8 @@ void Parser::ParseGNUAttributeArgs(Ident
   // Ignore the left paren location for now.
   ConsumeParen();
 
-  OwningPtr<EnterExpressionEvaluationContext> Unevaluated;
   ArgsVector ArgExprs;
 
-  if (attributeParsedArgsUnevaluated(*AttrName))
-    Unevaluated.reset(new EnterExpressionEvaluationContext(Actions,
-                                                           Sema::Unevaluated));
-
   if (Tok.is(tok::identifier)) {
     // If this attribute wants an 'identifier' argument, make it so.
     bool IsIdentifierArg = attributeHasIdentifierArg(*AttrName);
@@ -322,6 +317,11 @@ void Parser::ParseGNUAttributeArgs(Ident
 
     // Parse the non-empty comma-separated list of expressions.
     do {
+      OwningPtr<EnterExpressionEvaluationContext> Unevaluated;
+      if (attributeParsedArgsUnevaluated(*AttrName))
+        Unevaluated.reset(new EnterExpressionEvaluationContext(Actions,
+        Sema::Unevaluated));
+
       ExprResult ArgExpr(ParseAssignmentExpression());
       if (ArgExpr.isInvalid()) {
         SkipUntil(tok::r_paren, StopAtSemi);
@@ -338,6 +338,9 @@ void Parser::ParseGNUAttributeArgs(Ident
     Attrs.addNew(AttrName, SourceRange(AttrLoc, RParen), ScopeName, ScopeLoc,
                  ArgExprs.data(), ArgExprs.size(), Syntax);
   }
+
+  if (EndLoc)
+    *EndLoc = RParen;
 }
 
 /// \brief Parses a single argument for a declspec, including the





More information about the cfe-commits mailing list