Ignore:
Timestamp:
Jul 12, 2017, 1:27:01 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
30f9072
Parents:
f73f5f4
Message:

Some fixes after the header cleaning-tool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeTools/TrackLoc.cc

    rf73f5f4 r3268a58  
    1616#include "TrackLoc.h"
    1717
    18 #include <cstdlib>                    // for size_t, exit, EXIT_FAILURE
    19 #include <iostream>                   // for operator<<, ostream, basic_ostream
    20 #include <iterator>                   // for back_inserter, inserter
    21 #include <stack>                      // for stack
    22 #include <string>                     // for operator<<, string
    23 #include <typeindex>                  // for type_index
     18#include <cstdlib>                   // for exit, EXIT_FAILURE
     19#include <iostream>                  // for operator<<, ostream, basic_ostream
     20#include <stack>                     // for stack
     21#include <string>                    // for operator<<, string
     22#include <typeindex>                 // for type_index
    2423
    25 #include "Common/PassVisitor.h"       // for PassVisitor
    26 #include "Common/PassVisitor.impl.h"  // for acceptAll
    27 #include "Common/SemanticError.h"     // for SemanticError
    28 #include "Common/utility.h"           // for CodeLocation
    29 #include "SynTree/BaseSyntaxNode.h"   // for BaseSyntaxNode
    30 #include "SynTree/Mutator.h"          // for mutateAll
    31 #include "SynTree/Visitor.h"          // for acceptAll
     24#include "Common/PassVisitor.h"      // for PassVisitor
     25#include "Common/utility.h"          // for CodeLocation
     26#include "SynTree/BaseSyntaxNode.h"  // for BaseSyntaxNode
    3227
    3328class Declaration;
     
    4641                std::stack< CodeLocation * > parents;
    4742        public:
    48                 LocationPrinter(size_t printLevel) : 
     43                LocationPrinter(size_t printLevel) :
    4944                        printLevel(printLevel), lastNode(nullptr)
    5045                {}
     
    6560                                if ( !parents.empty() ) {
    6661                                        node->location = *parents.top();
    67                                 } 
     62                                }
    6863                                else if (nullptr != lastNode) {
    6964                                        node->location = *lastNode;
    70                                 } 
     65                                }
    7166                                else {
    7267                                        std::cerr << "Top level node has no CodeLocation " << name << std::endl;
Note: See TracChangeset for help on using the changeset viewer.