Save/clear/restore the lazy findAlias cache bits (PR #2849) so they don't enter the lookup/semantic hash. The bits reflect runtime cache state, not type identity; two compiles of the same source can leave them differently set depending on findAlias lifecycle, and we don't want that to leak.
| 484 | // type identity; two compiles of the same source can leave them differently |
| 485 | // set depending on findAlias lifecycle, and we don't want that to leak. |
| 486 | static __forceinline uint32_t flagsWithoutAliasCache(const TypeDecl * td) { |
| 487 | TypeDecl * mut = const_cast<TypeDecl*>(td); |
| 488 | const bool savedV = mut->aliasCacheValid; |
| 489 | const bool savedH = mut->aliasCacheHasAlias; |
| 490 | mut->aliasCacheValid = false; |
| 491 | mut->aliasCacheHasAlias = false; |
| 492 | const uint32_t result = mut->flags; |
| 493 | mut->aliasCacheValid = savedV; |
| 494 | mut->aliasCacheHasAlias = savedH; |
| 495 | return result; |
| 496 | } |
| 497 | |
| 498 | void TypeDecl::getLookupHash(uint64_t & hash) const { |
| 499 | hash = hashmix(hash, baseType); |
no outgoing calls
no test coverage detected