Commit fe47e8f
committed
[NFC] [ASTUnit] [Serialization] Transalte local decl ID to global decl ID before consuming
Discovered from
d86cc73.
There is a potential issue of using DeclID in ASTUnit. ASTUnit may
record the declaration ID from ASTWriter. And after loading the
preamble, the ASTUnit may consume the recorded declaration ID directly
in ExternalASTSource. This is not good. According to the design, all
local declaration ID consumed in ASTReader need to be translated by
`ASTReader::getGlobaldeclID()`.
This will be problematic if we changed the encodings of declaration IDs or if we
make preamble to work more complexly.1 parent 51f6570 commit fe47e8f
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1467 | 1467 | | |
1468 | 1468 | | |
1469 | 1469 | | |
1470 | | - | |
| 1470 | + | |
| 1471 | + | |
1471 | 1472 | | |
1472 | 1473 | | |
1473 | 1474 | | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
| 1475 | + | |
1477 | 1476 | | |
1478 | 1477 | | |
1479 | 1478 | | |
| |||
0 commit comments