Skip to content
Success

Changes

Summary

  1. Fix support for partial autogen. (details)
  2. Accept meta-test, expecting the buid to fail. (details)
  3. Remove autogen forward declarations, which are never needed, and cause warnings about static declarations without definitions. (details)
  4. Enable partial autogen for types declared inside functions. (details)
  5. Take test-expect change missed in last commit. (details)
Commit 64f3b9fefe9bf3caf101090443066ca16169610e by Michael Brooks
Fix support for partial autogen.

Partial autogen means that some lifecycle functions are possible to generate, and needed, while others are impossible to generate, but unneeded.  It is a valid situation that a user can implicitly request.

Previous handling of "impossible to generate" left the function in a zombie state, where it could show up as an alternative later.  This zombie state is problematic handling caused by a compiler bug.  Without the fix, the added test fails by creating zombie states.

This change is also a prerequsite for an upcoming change to avoid gcc warnings by not emitting autogen forward declarations.
The file was modifiedtests/Makefile.am
The file was modifiedsrc/AST/SymbolTable.cpp
The file was addedtests/raii/.expect/partial.txt
The file was modifiedsrc/AST/SymbolTable.hpp
The file was addedtests/raii/partial.cfa
The file was modifiedsrc/ResolvExpr/Resolver.cpp
The file was addedtests/raii/.expect/partial-ERR1.txt
Commit e797179240a99bdf7b97c53740f6886b84225a18 by Michael Brooks
Accept meta-test, expecting the buid to fail.

The fix is forthcoming.

The new test style (nowarn) checks for the absence of warnings.  The team has seen inconsistent results with who sees what warning.  This meta-test ensures that the checkin-triggered testing can notice a warning.  The fix for this failing test will be to make the warning go away.
The file was modifiedtests/Makefile.am
The file was addedtests/nowarn/.expect/no-autogen.txt
The file was addedtests/nowarn/no-autogen.cfa
Commit 5d3d281c4eabcd465b84b7b5001ee86b376872d1 by Michael Brooks
Remove autogen forward declarations, which are never needed, and cause warnings about static declarations without definitions.

Intended to fix the failing test from previous commit.

Autogen forward declarations are never needed because they do not depend on each other, much less with mutual recursion.

Consequences:
- tests/.expect/(5 tests).(3 archs).txt:  Accept generated code that lacks autogen forward declarations
- libcfa/src/concurrency/thread.*:  Remove unused dependency on destructor from constructor (via __thrd_start), by splitting trait is_thread with is_basic_thread
The file was modifiedtests/.expect/extension.arm64.txt
The file was modifiedlibcfa/src/concurrency/thread.cfa
The file was modifiedtests/.expect/functions.x64.txt
The file was modifiedtests/.expect/KRfunctions.arm64.txt
The file was modifiedtests/.expect/functions.x86.txt
The file was modifiedsrc/Validate/Autogen.cpp
The file was modifiedtests/.expect/KRfunctions.x86.txt
The file was modifiedtests/.expect/attributes.x86.txt
The file was modifiedtests/.expect/attributes.arm64.txt
The file was modifiedtests/.expect/declarationSpecifier.x64.txt
The file was modifiedtests/.expect/declarationSpecifier.x86.txt
The file was modifiedtests/.expect/KRfunctions.x64.txt
The file was modifiedlibcfa/src/concurrency/thread.hfa
The file was modifiedtests/.expect/extension.x86.txt
The file was modifiedtests/.expect/functions.arm64.txt
The file was modifiedtests/.expect/attributes.x64.txt
The file was modifiedtests/.expect/extension.x64.txt
The file was modifiedtests/.expect/declarationSpecifier.arm64.txt
Commit 36dfdac15a1061978a1b23f2ae753434d890fdd1 by Michael Brooks
Enable partial autogen for types declared inside functions.

Done by giving pass cores finer grained error-recovery points, which causes Resolver's existing error-recovery logic to kick in for autogens within function bodies.
The file was modifiedtests/raii/.expect/partial.txt
The file was modifiedtests/raii/partial.cfa
The file was modifiedsrc/AST/Pass.impl.hpp
Commit bad15f7b4c024353d3e0e2074c7acde3860848b9 by Michael Brooks
Take test-expect change missed in last commit.
The file was modifiedtests/raii/.expect/partial-ERR1.txt