Fix null pointer crash
This commit is contained in:
parent
380064de6a
commit
4e1cdf23be
2
dsymbol
2
dsymbol
|
@ -1 +1 @@
|
|||
Subproject commit 1c5579db6c1d88a097d46f5bee5ae1e2cf8fff02
|
||||
Subproject commit e83afca7cf2cac48084ba294926d4dd24945dc1a
|
2
makefile
2
makefile
|
@ -30,7 +30,7 @@ githash:
|
|||
git log -1 --format="%H" > githash.txt
|
||||
|
||||
debug:
|
||||
${DC} -w -g -ofdsc ${VERSIONS} ${DEBUG_VERSIONS} ${INCLUDE_PATHS} ${SRC}
|
||||
${DC} -w -g -J. -ofdsc ${VERSIONS} ${DEBUG_VERSIONS} ${INCLUDE_PATHS} ${SRC}
|
||||
|
||||
dmdbuild: githash $(SRC)
|
||||
mkdir -p bin
|
||||
|
|
|
@ -59,7 +59,7 @@ void assertAnalyzerWarnings(string code, const StaticAnalysisConfig config, stri
|
|||
ParseAllocator p = new ParseAllocator;
|
||||
const(Module) m = parseModule(file, cast(ubyte[]) code, p, cache, false);
|
||||
|
||||
ModuleCache moduleCache;
|
||||
auto moduleCache = ModuleCache(p);
|
||||
|
||||
// Run the code and get any warnings
|
||||
MessageSet rawWarnings = analyze("test", m, config, moduleCache);
|
||||
|
|
|
@ -118,7 +118,7 @@ int main(string[] args)
|
|||
const(string[]) absImportPaths = importPaths.map!(
|
||||
a => a.absolutePath().buildNormalizedPath()).array();
|
||||
|
||||
ModuleCache moduleCache;
|
||||
auto moduleCache = ModuleCache(new dsymbol.modulecache.ASTAllocator);
|
||||
|
||||
if (absImportPaths.length)
|
||||
moduleCache.addImportPaths(absImportPaths);
|
||||
|
|
Loading…
Reference in New Issue