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()
PreprocessedEntity::PreprocessedEntity() PreprocessedEntity::PreprocessedEntity()
: Declaration(DeclarationKind::PreprocessedEntity), : Declaration(DeclarationKind::PreprocessedEntity),
Location(MacroLocation::Unknown) {} MacroLocation(MacroLocation::Unknown) {}
MacroDefinition::MacroDefinition() { Kind = DeclarationKind::MacroDefinition; } MacroDefinition::MacroDefinition() { Kind = DeclarationKind::MacroDefinition; }

2
src/CppParser/AST.h

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

4
src/CppParser/Parser.cpp

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

Loading…
Cancel
Save