• Home
  • Raw
  • Download

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
171 Note the two dashes after we specify the source file. The additional
227 Next, we want to specify that a single variable is declared in the first
228 portion of the loop, so we can extend the matcher to
234 Finally, we can add the condition that the variable is initialized to
250 as we will want to do something with it:
315 Our simple matcher is capable of discovering for loops, but we would
317 of the remaining work with some cleverly chosen matchers, but first we
318 need to decide exactly which properties we want to allow.
320 How can we characterize for loops over arrays which would be eligible
328 We already check for (1), so all we need to add is a check to the loop's
337 or not they are equal, so the best we can do is matching more than we
340 In any case, we can start building this sub-matcher. We can require that
351 specific declaration, we can simply add a second condition to it:
359 Furthermore, we can restrict our matcher to only match if the
369 that we can retrieve it in the callback:
383 Now, we just need to add a matcher to check if the condition part of the
385 only one problem - we don't know which array we're iterating over
387 approximating the result we want with matchers, filling in the details
388 in the callback. So we start with:
442 After adding binds to the expressions we wished to capture and
443 extracting the identifier strings into variables, we have array-step-2
450 loop's AST. At some point, we will need to make changes to the input
451 source code. Next, we'll work on using the nodes we bound in the
460 is the set of matched nodes, and how we retrieve them.
462 Since we bind three variables (identified by ConditionVarName,
463 InitVarName, and IncrementVarName), we can obtain the matched nodes by
511 address, all we need to do is make sure neither ``ValueDecl`` (base class of
521 If execution reaches the end of ``LoopPrinter::run()``, we know that the
528 For now, we will just print a message explaining that we found a loop.
552 those of its children. ``FoldingSetNodeID`` then serves as a hash we can