Lines Matching refs:we
20 repositories, but we'll be accessing them through the git mirror. For
54 Okay. Now we'll build Clang!
66 And we're live.
72 Finally, we want to set Clang as its own compiler.
90 Now that we have enough background knowledge, it's time to create the
95 First, we'll need to create a new directory for our tool and tell CMake
175 Note the two dashes after we specify the source file. The additional
231 Next, we want to specify that a single variable is declared in the first
232 portion of the loop, so we can extend the matcher to
238 Finally, we can add the condition that the variable is initialized to
254 as we will want to do something with it:
319 Our simple matcher is capable of discovering for loops, but we would
321 of the remaining work with some cleverly chosen matchers, but first we
322 need to decide exactly which properties we want to allow.
324 How can we characterize for loops over arrays which would be eligible
332 We already check for (1), so all we need to add is a check to the loop's
341 or not they are equal, so the best we can do is matching more than we
344 In any case, we can start building this sub-matcher. We can require that
355 specific declaration, we can simply add a second condition to it:
363 Furthermore, we can restrict our matcher to only match if the
373 that we can retrieve it in the callback:
387 Now, we just need to add a matcher to check if the condition part of the
389 only one problem - we don't know which array we're iterating over
391 approximating the result we want with matchers, filling in the details
392 in the callback. So we start with:
446 After adding binds to the expressions we wished to capture and
447 extracting the identifier strings into variables, we have array-step-2
454 loop's AST. At some point, we will need to make changes to the input
455 source code. Next, we'll work on using the nodes we bound in the
464 is the set of matched nodes, and how we retrieve them.
466 Since we bind three variables (identified by ConditionVarName,
467 InitVarName, and IncrementVarName), we can obtain the matched nodes by
515 address, all we need to do is make sure neither ``ValueDecl`` (base class of
525 If execution reaches the end of ``LoopPrinter::run()``, we know that the
532 For now, we will just print a message explaining that we found a loop.
556 those of its children. ``FoldingSetNodeID`` then serves as a hash we can