[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 6 04:50:51 PDT 2022
aaron.ballman added a comment.
It looks like there's still something not quite right because it's warning on some instances but not others and I'm not certain why. Can you investigate?
================
Comment at: clang/test/Preprocessor/line-directive.c:33-34
# 42 "foo" 2 // expected-error {{invalid line marker flag '2': cannot pop empty include stack}}
# 42 "foo" 1 3 // enter
# 42 "foo" 2 3 // exit
# 42 "foo" 2 3 4 // expected-error {{invalid line marker flag '2': cannot pop empty include stack}}
----------------
Something is still not quite correct -- these should also be diagnosed as an extension (it's the same feature just with flags).
================
Comment at: clang/test/Preprocessor/line-directive.c:61
# 192 "glomp.h" 3 // System header.
typedef int y; // ok
----------------
This should also be diagnosed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124534/new/
https://reviews.llvm.org/D124534
More information about the cfe-commits
mailing list