Commit graph

2435 commits

Author SHA1 Message Date
Nicholas Wilson
449b972001
[s2ir.d] use early returns (#16992) 2024-10-11 11:14:09 +03:00
Dennis Korpel
f6f520aede Put -transition=in flag in CompileEnv 2024-10-10 23:54:58 +02:00
Nicholas Wilson
d2edb959e4 [errors.d] use early continue 2024-10-10 22:27:32 +08:00
Dennis Korpel
00df883e9f Fix bugzilla 24803 - __traits(location) is inconsistent with modules 2024-10-10 14:21:43 +02:00
The Dlang Bot
2db13b18d4
Merge pull request #16980 from dkorpel/loc-rm-constructors
Reduce reliance on Loc constructors

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2024-10-10 01:10:08 +02:00
Dennis Korpel
da3faeab47 backend: Remove unneeded extern(C) 2024-10-10 00:49:00 +02:00
Dennis
9d6ba5bead
Remove backend dependency on frontend error function (#16974)
* backend: Remove fatal()

* Remove backend dependency on frontend error function

* Make errorBackend extern(C++)

---------

Co-authored-by: Dennis Korpel <dennis@sarc.nl>
2024-10-09 22:46:35 +02:00
Dennis Korpel
52524f1c34 Add filename back into invalid lib test 2024-10-09 16:43:30 +02:00
Dennis Korpel
74e47d959a Reduce reliance on Loc constructors 2024-10-09 15:36:37 +02:00
Dennis
d5b3e7992b
Use new SourceLoc for error printing (#16977)
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
2024-10-09 13:11:02 +02:00
Nicholas Wilson
2e4d80bc3d [mtype.d] use early returns in addSTC 2024-10-08 15:24:53 +02:00
Dennis Korpel
66920740d9 Separate location formatting from Loc 2024-10-08 14:52:30 +02:00
Dennis Korpel
0556e028ca doc.d: Remove unused loc parameters 2024-10-08 13:28:33 +02:00
Nicholas Wilson
e50f92568b
move determineSize to dsymbolsem.d (#16969) 2024-10-08 09:44:37 +03:00
Nicholas Wilson
8ce08e98f1 move fill from aggregate.d to expressionsem.d 2024-10-07 17:16:03 +08:00
Nicholas Wilson
da3e107884 restrict semantic imports for AST files 2024-10-07 17:15:46 +08:00
Nicholas Wilson
57c5b071af
Rebase stable6 (#16967)
* Document template instance duplication status as part of its field documentation. (#16643)

* Fix Bugzilla 24599 - Wrongly elided TypeInfo emission (#15868)

Reverting #14844, which caused such missing TypeInfos, *and* making
sure the special TypeInfo members are fully analyzed and ready for
codegen (otherwise hitting an assertion for the real-world project).

* Reorganize backend build files to match target and make more similar per line (#16672)

* Remove redundant suggestions on linker errors (#16711)

* Fix bugzilla 24337 - Segfault when printing an int[] cast from a string (#16729)

* Add BitFieldStyle.Gcc_Clang_ARM

Required for 32-bit ARM, and non-Apple 64-bit ARM targets.

The only difference to `Gcc_Clang` is that anonymous and 0-length
bit-fields do contribute to the aggregate alignment.

Caught by existing proper C interop tests in
runnable_cxx/testbitfields.d on such targets. The hardcoded bad tests
in runnable/{bitfieldsposix64.c,dbitfieldsposix64.d} however now fail
after the fix, on such targets again.

* [refactor to `TargetC.contributesToAggregateAlignment(BitFieldDeclaration)` hook]

* Fix Bugzilla Issue 24687 - [REG2.110] Cannot cast string-imports to select overload anymore

* Also make deprecationSupplemental adhere to error limit (#16779)

Co-authored-by: Dennis Korpel <dennis@sarc.nl>

* Fix bugzilla 24699 - [REG2.108] No short-circuit evaluation of mixing template bool argument

* Fix bugzilla 24731 - IFTI cannot handle integer expressions (#16822)

* Fix Bugzilla Issue 24760 - ICE on variadic after default argument

* Fix bugzilla 24790 - -vcg-ast ICE on lowered assign exp (#16914)

Co-authored-by: Dennis Korpel <dennis@sarc.nl>

* Fix bugzilla 24764 - ICE when -vcg-ast prints imported invariant (#16917)

Co-authored-by: Dennis Korpel <dennis@sarc.nl>

* Fix bugzilla 24431 - dmd -vcg-ast crashes printing failed template in… (#16916)

---------

Co-authored-by: Richard (Rikki) Andrew Cattermole <richard@cattermole.co.nz>
Co-authored-by: Martin Kinkelin <kinke@users.noreply.github.com>
Co-authored-by: Dennis <dkorpel@users.noreply.github.com>
Co-authored-by: Martin Kinkelin <mkinkelin@symmetryinvestments.com>
Co-authored-by: Martin Kinkelin <noone@nowhere.com>
Co-authored-by: RazvanN7 <razvan.nitu1305@gmail.com>
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
Co-authored-by: Dennis Korpel <dkorpel@gmail.com>
2024-10-07 12:00:14 +03:00
Nicholas Wilson
4c02e46b60
remove unused import from func.d (#16959) 2024-10-07 09:29:38 +03:00
Nicholas Wilson
849cbd3d2c move needsTypeInference to expressionsem.d make private 2024-10-07 09:09:07 +08:00
Nicholas Wilson
349e35a65c Rename the FuncDeclaration overload of checkNestedReference
To distinguish it from the `VarDeclaration` overload that does something quite different.
2024-10-07 07:57:53 +08:00
Nicholas Wilson
c6008222ca Update doc comment for checkNestedReference(FuncDeclaration)
it was disrupted by #16286
2024-10-07 07:57:53 +08:00
Nicholas Wilson
4bee91bd57
move dummyArg to templatesem.d make private (#16945) 2024-10-07 07:24:08 +08:00
Nicholas Wilson
63b7804df2
Fix visibility deprecation (#16957) 2024-10-07 00:26:08 +02:00
Nicholas Wilson
f9403be02d
[func.d] move overloadApply to funcsem.d, remove unused imports (#16949) 2024-10-06 22:51:31 +02:00
Nicholas Wilson
caa0471cb4
dotTemplateSemanticProp use nested function (#16955)
instead of `goto`
2024-10-06 22:50:51 +02:00
Nicholas Wilson
2f423bf28e
[dclass.d] restrict semantic imports (#16956) 2024-10-06 22:50:21 +02:00
Nicholas Wilson
14f2e5c968
[expressionsem.d] make some functions private (#16954) 2024-10-06 22:50:03 +02:00
Nicholas Wilson
62566ef1fe
[declaration.d] move checkDisabled and expandInitializer to expressionsem.d (#16941) 2024-10-06 19:19:41 +08:00
Nicholas Wilson
cad4e87d55
Remove unused PASSenum from header (#16948)
LDC and GDC use the `enum class`.
2024-10-06 19:11:05 +08:00
Nicholas Wilson
08ffd15eea
move checkPrintfScanfSignature to funcsem.d make private (#16951) 2024-10-06 19:00:51 +08:00
Nicholas Wilson
c28e3561cd
[dtemplate.d] use early returns (#16946) 2024-10-06 18:49:58 +08:00
Nicholas Wilson
3980ae6dca
use selective imports for dsymbolsem in ATS node files (#16950)
The goal is to remove all semantic imports from AST node files. This makes it obvious what still needs to be done.
2024-10-06 12:46:32 +02:00
Nicholas Wilson
0f36fc3ad3
[declaration.d] don't void init ulongs (#16943) 2024-10-06 12:45:48 +02:00
Nicholas Wilson
2024098837
[dimport.d] move addAlias to parser, remove import dmd.errors (#16935) 2024-10-06 06:19:43 +08:00
Nicholas Wilson
cbc0183f7d
move isSafe/setUnsafe to safe.d (#16871) 2024-10-05 20:35:22 +08:00
Nicholas Wilson
2d128bd934
TemplateInstance.equalsx use early return (#16940) 2024-10-05 20:33:45 +08:00
Nicholas Wilson
bdfc21d2c8
Update dsymbol.h (#16938) 2024-10-05 18:30:23 +08:00
Dennis O.
f8846a76ac
Move newScope out of AST nodes to dsymbolsem.d (#16880) 2024-10-05 18:19:02 +08:00
Nicholas Wilson
892e4e01b9 [func.d] move errorSupplementalInferredAttr to expressionsem.d
all but one of its uses are there, the other is in `canthrow.d`
2024-10-05 16:16:45 +08:00
Walter Bright
329a996edd improve logic in isCopyConstructable() 2024-10-05 16:16:26 +08:00
Nicholas Wilson
d3c1d8f7e4 [expressionsem.d] use early returns 2024-10-05 13:49:14 +08:00
Nicholas Wilson
50d84e359f [optimise.d] use early returns 2024-10-05 13:49:01 +08:00
Nicholas Wilson
645db4e55e [expressionsem.d] use nested function instead of goto 2024-10-05 13:11:21 +08:00
Nicholas Wilson
4d917659fa [expressionsem.d] use early return 2024-10-05 11:56:45 +08:00
Nick Treleaven
da45058997 Fix checking first member of union after zero size field 2024-10-05 08:56:44 +08:00
Nick Treleaven
5197836d45 Fix Bugzilla 24776 - Struct with anonymous union has wrong isZeroInit 2024-10-05 08:56:44 +08:00
Nick Treleaven
35448607c5 Ignore zero-sized fields 2024-10-05 08:56:44 +08:00
Nick Treleaven
8eeadd7d97 Undo fix for anonymous union, breaks other code 2024-10-05 08:56:44 +08:00
Nick Treleaven
489e1b9eac Fix Bugzilla 23841 - isZeroInit does not take into account unions 2024-10-05 08:56:44 +08:00
Nick Treleaven
4d0f92b6db Bugzilla 24776 - Struct with anonymous union has wrong isZeroInit 2024-10-05 08:56:44 +08:00