[PATCH] Introduce Parser::completeExpression.

Samuel Benzaquen sbenza at google.com
Mon Nov 25 06:57:33 PST 2013

Comment at: lib/ASTMatchers/Dynamic/Parser.cpp:294
@@ -262,2 +293,3 @@
             << CommaToken.Text;
+        ContextStack.pop_back();
         return false;
Can you add a scoped object that will pop_back automatically?

Comment at: lib/ASTMatchers/Dynamic/Parser.cpp:388
@@ +387,3 @@
+  // We cannot complete code if there is an invalid element on the context
+  // stack.
+  for (ContextStackTy::iterator I = ContextStack.begin(),
Is there a good use case for not aborting the parse if lookupMatcherCtor() returns null?
(instead of pushing it into the stack and then checking if there is a null in the stack)


More information about the cfe-commits mailing list