Skip to content

Commit

Permalink
Merge pull request #4737 from kinke/merge_stable
Browse files Browse the repository at this point in the history
Merge upstream stable
  • Loading branch information
kinke authored Aug 20, 2024
2 parents b731db4 + 68db4b9 commit dd0ff1e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# LDC master

#### Big news
- Frontend, druntime and Phobos are at version [2.110.0](https://dlang.org/changelog/2.110.0.html). (#4707)
- Frontend, druntime and Phobos are at version [2.110.0](https://dlang.org/changelog/2.110.0.html). (#4707, #4737)
- LLVM for prebuilt packages bumped to v18.1.8 (incl. macOS arm64). (#4712)
- Android: NDK for prebuilt package bumped from r26d to r27. (#4711)
- ldc2.conf: %%ldcconfigpath%% placeholder added - specifies the directory where current configuration file is located. (#4717)
Expand Down
6 changes: 6 additions & 0 deletions dmd/dtemplate.d
Original file line number Diff line number Diff line change
Expand Up @@ -4577,9 +4577,15 @@ version (IN_LLVM)

// The arguments are not treated as part of a default argument,
// because they are evaluated at compile time.
const inCondition = !!(sc.flags & SCOPE.condition);
// For master branch: const inCondition = sc.condition;
sc = sc.push();
sc.inDefaultArg = false;

// https://issues.dlang.org/show_bug.cgi?id=24699
sc.flags |= SCOPE.condition * inCondition;
// For master branch: sc.condition = inCondition;

for (size_t j = 0; j < tiargs.length; j++)
{
RootObject o = (*tiargs)[j];
Expand Down
7 changes: 5 additions & 2 deletions dmd/errors.d
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,11 @@ extern (C++) void verrorReportSupplemental(const ref Loc loc, const(char)* forma
goto case ErrorKind.error;
else if (global.params.useDeprecated == DiagnosticReporting.inform && !global.gag)
{
info.headerColor = Classification.deprecation;
verrorPrint(format, ap, info);
if (global.params.v.errorLimit == 0 || global.deprecations <= global.params.v.errorLimit)
{
info.headerColor = Classification.deprecation;
verrorPrint(format, ap, info);
}
}
break;

Expand Down
2 changes: 1 addition & 1 deletion runtime/phobos
Submodule phobos updated 1 files
+22 −1 std/bitmanip.d
5 changes: 5 additions & 0 deletions tests/dmd/compilable/compile1.d
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,11 @@ static assert (__traits(compiles, false && error) == false);
int f11042a3()() if (__traits(compiles, true || error) == false) { return 0; } enum x11042a3 = f11042a3();
int f11042b3()() if (__traits(compiles, false && error) == false) { return 0; } enum x11042b3 = f11042b3();

// https://issues.dlang.org/show_bug.cgi?id=24699
enum T24699(bool cond) = cond;
enum b24699a = T24699!(true || error);
enum b24699b = T24699!(false && error);

/***************************************************/
// https://issues.dlang.org/show_bug.cgi?id=11554

Expand Down
2 changes: 1 addition & 1 deletion tests/dmd/compilable/deprecationlimit.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ void main()
f();
f();
f();
f();
static assert("1"); // also surpress deprecationSupplemental
}

0 comments on commit dd0ff1e

Please sign in to comment.