Browse Source

Fixed naming conflict in Location field in the AST.

pull/208/head
triton 11 years ago
parent
commit
c67e6a5ffb
  1. 2
      src/CppParser/AST.cpp
  2. 2
      src/CppParser/AST.h
  3. 4
      src/CppParser/Parser.cpp

2
src/CppParser/AST.cpp

@ -557,7 +557,7 @@ Namespace::Namespace() @@ -557,7 +557,7 @@ Namespace::Namespace()
PreprocessedEntity::PreprocessedEntity()
: Declaration(DeclarationKind::PreprocessedEntity),
Location(MacroLocation::Unknown) {}
MacroLocation(MacroLocation::Unknown) {}
MacroDefinition::MacroDefinition() { Kind = DeclarationKind::MacroDefinition; }

2
src/CppParser/AST.h

@ -707,7 +707,7 @@ enum struct MacroLocation @@ -707,7 +707,7 @@ enum struct MacroLocation
struct CS_API PreprocessedEntity : public Declaration
{
PreprocessedEntity();
MacroLocation Location;
MacroLocation MacroLocation;
};
struct CS_API MacroDefinition : public PreprocessedEntity

4
src/CppParser/Parser.cpp

@ -2389,8 +2389,8 @@ void Parser::HandlePreprocessedEntities(Declaration* Decl, @@ -2389,8 +2389,8 @@ void Parser::HandlePreprocessedEntities(Declaration* Decl,
auto Entity = WalkPreprocessedEntity(Decl, PPEntity);
if (!Entity) continue;
if (Entity->Location == MacroLocation::Unknown)
Entity->Location = macroLocation;
if (Entity->MacroLocation == MacroLocation::Unknown)
Entity->MacroLocation = macroLocation;
}
}

Loading…
Cancel
Save