Bump dmd version
This commit is contained in:
parent
c7df69a7a7
commit
96b1f61ec2
2
dmd
2
dmd
|
|
@ -1 +1 @@
|
|||
Subproject commit a4cbc08f5bc1a2f7ce3289103198c473671e94c0
|
||||
Subproject commit 2d5cd3166b6cce7404c812a8f04156dc2f1108b5
|
||||
2
dub.json
2
dub.json
|
|
@ -18,7 +18,7 @@
|
|||
"libddoc": "~>0.8.0",
|
||||
"dmd": {
|
||||
"repository": "git+https://github.com/dlang/dmd.git",
|
||||
"version": "a4cbc08f5bc1a2f7ce3289103198c473671e94c0"
|
||||
"version": "2d5cd3166b6cce7404c812a8f04156dc2f1108b5"
|
||||
}
|
||||
},
|
||||
"targetPath" : "bin",
|
||||
|
|
|
|||
39
makefile
39
makefile
|
|
@ -9,36 +9,19 @@ GDC := gdc
|
|||
LDC := ldc2
|
||||
|
||||
DMD_FRONTEND_SRC := \
|
||||
$(shell find dmd/compiler/src/dmd/common -name "*.d")\
|
||||
$(shell find dmd/compiler/src/dmd/root -name "*.d")\
|
||||
$(shell find dmd/compiler/src/dmd/visitor -name "*.d")\
|
||||
$(shell find dmd/compiler/src/dmd/mangle -name "*.d")\
|
||||
$(shell find dmd/compiler/src/dmd -maxdepth 1 -name "*.d" \
|
||||
$(shell find dmd/compiler/src/dmd -maxdepth 2 -name "*.d" \
|
||||
! -name "mars.d" \
|
||||
! -name "dmsc.d" \
|
||||
! -name "e2ir.d" \
|
||||
! -name "eh.d" \
|
||||
! -name "glue.d" \
|
||||
! -name "iasmdmd.d" \
|
||||
! -name "irstate.d" \
|
||||
! -name "lib.d" \
|
||||
! -name "libelf.d" \
|
||||
! -name "libmach.d" \
|
||||
! -name "libmscoff.d" \
|
||||
! -name "libomf.d" \
|
||||
! -name "objc_glue.d" \
|
||||
! -name "s2ir.d" \
|
||||
! -name "scanelf.d" \
|
||||
! -name "scanmach.d" \
|
||||
! -name "scanmscoff.d" \
|
||||
! -name "scanomf.d" \
|
||||
! -name "tocsym.d" \
|
||||
! -name "toctype.d" \
|
||||
! -name "tocvdebug.d" \
|
||||
! -name "toobj.d" \
|
||||
! -name "todt.d" \
|
||||
! -name "toir.d" \
|
||||
)
|
||||
! -name "*elf*.d" \
|
||||
! -name "*mscoff*.d" \
|
||||
! -name "*mach*.d" \
|
||||
! -name "*dwarfdbginf*.d" \
|
||||
! -path "*/glue/*" \
|
||||
! -path "*/lib/*" \
|
||||
! -path "*/backend/*" \
|
||||
! -path "*/iasm/dmd*" \
|
||||
) \
|
||||
|
||||
|
||||
LIB_SRC := \
|
||||
$(shell find containers/src -name "*.d")\
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ extern (C++) class LengthSubtractionCheck(AST) : BaseAnalyzerDmd
|
|||
if (left.ident.toString() == "length")
|
||||
addErrorMessage(
|
||||
cast(ulong) left.loc.linnum, cast(ulong) left.loc.charnum, KEY, MSG,
|
||||
[AutoFix.insertionAt(minExpr.loc.fileOffset, "cast(ptrdiff_t) ")]
|
||||
[AutoFix.insertionAt(left.e1.loc.fileOffset, "cast(ptrdiff_t) ")]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ module dscanner.analysis.mismatched_args;
|
|||
|
||||
import dscanner.analysis.base;
|
||||
import std.format : format;
|
||||
import dmd.arraytypes : Identifiers;
|
||||
import dmd.arraytypes : ArgumentLabels;
|
||||
|
||||
/// Checks for mismatched argument and parameter names
|
||||
extern (C++) class MismatchedArgumentCheck(AST) : BaseAnalyzerDmd
|
||||
|
|
@ -87,17 +87,18 @@ extern (C++) class MismatchedArgumentCheck(AST) : BaseAnalyzerDmd
|
|||
}
|
||||
}
|
||||
|
||||
private extern (D) bool[int] getNamedArgsPositions(Identifiers* names, string funcName)
|
||||
private extern (D) bool[int] getNamedArgsPositions(ArgumentLabels* labels, string funcName)
|
||||
{
|
||||
bool[int] namedArgsPositions;
|
||||
|
||||
if (names is null || (funcName in funcsWithParams) is null)
|
||||
if (labels is null || (funcName in funcsWithParams) is null)
|
||||
return namedArgsPositions;
|
||||
|
||||
auto funcParams = funcsWithParams[funcName];
|
||||
|
||||
foreach (name; *names)
|
||||
foreach (label; *labels)
|
||||
{
|
||||
const name = label.name;
|
||||
if (name is null)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue