aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/preprocessor
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-03-05 20:21:52 +0100
committerChristopher Li <sparse@chrisli.org>2017-03-06 08:56:19 +0800
commitbdeaed12f95822474ebd113a50d2fb8138cc5d9a (patch)
tree4a0296fb9074d7b9c46e97a43b08272d531f5a1f /validation/preprocessor
parent44632081a3b54299e8899954efcd7133ef093259 (diff)
downloadsparse-dev-bdeaed12f95822474ebd113a50d2fb8138cc5d9a.tar.gz
move 'extern with initializer' validation after the validate method
Before the call to the method external_decl::validate_decl() there is another validation done which check if the declaration linkage is not external, otherwise an error is issued and the 'extern' is removed from the declaration. While also valid for C99 for-loop initializer, this is less desirable because in this context, 'extern' is invalid anyway and removing it from the declaration make it imposible to issue a diagnostic about it. Fix this by moving the 'extern with initializer' check after the call to validate_decl() method, where it is always pertinent and so allowing process_for_loop_decl() to make its own diagnostic. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation/preprocessor')
0 files changed, 0 insertions, 0 deletions