diff --git a/dmd b/dmd index a4cbc08..2d5cd31 160000 --- a/dmd +++ b/dmd @@ -1 +1 @@ -Subproject commit a4cbc08f5bc1a2f7ce3289103198c473671e94c0 +Subproject commit 2d5cd3166b6cce7404c812a8f04156dc2f1108b5 diff --git a/dub.json b/dub.json index 9f038c7..d5cce9f 100644 --- a/dub.json +++ b/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", diff --git a/makefile b/makefile index b7b696b..2b758ec 100644 --- a/makefile +++ b/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")\ diff --git a/src/dscanner/analysis/length_subtraction.d b/src/dscanner/analysis/length_subtraction.d index 32c9229..fece877 100644 --- a/src/dscanner/analysis/length_subtraction.d +++ b/src/dscanner/analysis/length_subtraction.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) ")] ); } } diff --git a/src/dscanner/analysis/mismatched_args.d b/src/dscanner/analysis/mismatched_args.d index 3c04415..ea5e970 100644 --- a/src/dscanner/analysis/mismatched_args.d +++ b/src/dscanner/analysis/mismatched_args.d @@ -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;