Changeset 6380f78 for src/AST/Decl.hpp
- Timestamp:
- May 22, 2019, 3:40:36 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 76ed81f
- Parents:
- d8938622 (diff), f4c2f1a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
rd8938622 r6380f78 232 232 AggregateDecl* set_body( bool b ) { body = b; return this; } 233 233 234 private:235 AggregateDecl * clone() const override = 0;236 MUTATE_FRIEND237 238 protected:239 234 /// Produces a name for the kind of aggregate 240 235 virtual std::string typeString() const = 0; 236 237 private: 238 AggregateDecl * clone() const override = 0; 239 MUTATE_FRIEND 241 240 }; 242 241 … … 256 255 257 256 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } 257 258 std::string typeString() const override { return "struct"; } 259 258 260 private: 259 261 StructDecl * clone() const override { return new StructDecl{ *this }; } 260 262 MUTATE_FRIEND 261 262 std::string typeString() const override { return "struct"; }263 263 }; 264 264 … … 271 271 272 272 const Decl * accept( Visitor& v ) const override { return v.visit( this ); } 273 274 std::string typeString() const override { return "union"; } 275 273 276 private: 274 277 UnionDecl * clone() const override { return new UnionDecl{ *this }; } 275 278 MUTATE_FRIEND 276 277 std::string typeString() const override { return "union"; }278 279 }; 279 280 … … 289 290 290 291 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } 292 293 std::string typeString() const override { return "enum"; } 294 291 295 private: 292 296 EnumDecl * clone() const override { return new EnumDecl{ *this }; } 293 297 MUTATE_FRIEND 294 295 std::string typeString() const override { return "enum"; }296 298 297 299 /// Map from names to enumerator values; kept private for lazy initialization … … 307 309 308 310 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } 311 312 std::string typeString() const override { return "trait"; } 313 309 314 private: 310 315 TraitDecl * clone() const override { return new TraitDecl{ *this }; } 311 316 MUTATE_FRIEND 312 313 std::string typeString() const override { return "trait"; }314 317 }; 315 318
Note: See TracChangeset
for help on using the changeset viewer.