[Ada] Reject junk syntax for Contract_Cases/Test_Case/Subprogram_Variant
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 27 Nov 2020 13:55:17 +0000 (14:55 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 16 Dec 2020 13:01:01 +0000 (08:01 -0500)
commitbee916bcc70293a06c42cc11a3682b7663caa7a7
tree2d6bccea8a4e391d74282f63356dbaeb8740dcb5
parentbe19b8662bd2601ea761fe5adec3a7ce3940dd7c
[Ada] Reject junk syntax for Contract_Cases/Test_Case/Subprogram_Variant

gcc/ada/

* sem_ch13.adb (Analyze_Aspect_Specifications): Add a codefix
for extra parentheses around aspect Annotate expression; reject
"(null record)" aggregate and extra parentheses around aspect
Test_Case expression.
* sem_prag.adb (Analyze_Pragma): Reject "null", "(null record)"
and extra parentheses around pragma Contract_Cases; likewise for
pragma Subprogram_Variant.
gcc/ada/sem_ch13.adb
gcc/ada/sem_prag.adb