[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2023-06-13 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Looks like this change is coming up in: https://github.com/llvm/llvm-project/issues/63284 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124534/new/ https://reviews.llvm.org/D124534 _

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-11 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. Hello @Jake-Egan, I believe the problem was already fixed by the @aaron.ballman's patch here . Thank you for fixing it, @aaron.ballman! Repository: rG LLVM Github Monorepo CHAN

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-11 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan added a comment. Hi, this patch causes a test failure on AIX https://lab.llvm.org/buildbot/#/builders/214/builds/1221/steps/6/logs/FAIL__Clang__noinline_cu Could you please make a fix or revert if it takes too long? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-11 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. > That looks to be exactly what I needed, but you can double-check that you > were properly attributed here: > https://github.com/llvm/llvm-project/commit/786c721c2bbd2e0646e314671e010859550423bf > I added one when I landed. I also adjusted the commit message slight

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124534#3505709 , @aaron.ballman wrote: > In D124534#3504641 , @ken-matsui > wrote: > >> (I use this info for every commit on GitHub, but is this what you expected? >> Please l

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124534#3504641 , @ken-matsui wrote: > In D124534#3504610 , @aaron.ballman > wrote: > >> LGTM, thank you for all the hard work on this! I assume you need me to land >> this on

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG786c721c2bbd: Add extension diagnostic for linemarker directives (authored by ken-matsui, committed by aaron.ballman). Changed prior to commit: ht

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. In D124534#3504610 , @aaron.ballman wrote: > LGTM, thank you for all the hard work on this! I assume you need me to land > this on your behalf -- if so, can you let me know what name and email address > you would like me to

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for all the hard work on this! I assume you need me to land this on your behalf -- if so, can you let me know what name and email address you would like me to use

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui updated this revision to Diff 428450. ken-matsui added a comment. Fix the test as reviewed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124534/new/ https://reviews.llvm.org/D124534 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. Thank you for your review! I'm going to fix them :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124534/new/ https://reviews.llvm.org/D124534 ___ cfe-commits mailing list cfe

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Preprocessor/line-directive-system-headers.c:1-2 +// RUN: %clang_cc1 -std=c99 -fsyntax-only -pedantic -verify %s +// RUN: %clang_cc1 -std=c99 -fsyntax-only -pedantic -verify=system -Wsystem-headers %s +

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui updated this revision to Diff 428382. ken-matsui added a comment. Update test codes as reviewed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124534/new/ https://reviews.llvm.org/D124534 Files: clang/include/clang/Basic/DiagnosticGrou

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added inline comments. Comment at: clang/test/Preprocessor/line-directive-system-headers.c:2-6 -// RUN: not %clang_cc1 -E %s 2>&1 | grep 'blonk.c:92:2: error: ABC' -// RUN: not %clang_cc1 -E %s 2>&1 | grep 'blonk.c:93:2: error: DEF' -// RUN: not %clang_cc1 -E %s 2>&1 |

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Preprocessor/line-directive-system-headers.c:2-6 -// RUN: not %clang_cc1 -E %s 2>&1 | grep 'blonk.c:92:2: error: ABC' -// RUN: not %clang_cc1 -E %s 2>&1 | grep 'blonk.c:93:2: error: DEF' -// RUN: not %clang_cc1 -E %s 2>&

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. Thank you for your review! Comment at: clang/test/Preprocessor/line-directive-system-headers.c:2-6 -// RUN: not %clang_cc1 -E %s 2>&1 | grep 'blonk.c:92:2: error: ABC' -// RUN: not %clang_cc1 -E %s 2>&1 | grep 'blonk.c:93:2: error: DEF' -// RUN: not

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks, I think we're getting pretty close! Comment at: clang/test/Preprocessor/line-directive-system-headers.c:2-6 -// RUN: not %clang_cc1 -E %s 2>&1 | grep 'blonk.c:92:2: error: ABC' -// RUN: not %clang_cc1 -E %s 2>&1 | grep 'blonk.c:93:2: error

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-10 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui marked an inline comment as not done. ken-matsui added inline comments. Comment at: clang/test/Preprocessor/line-directive.c:33 # 42 "foo" 2 // expected-error {{invalid line marker flag '2': cannot pop empty include stack}} # 42 "foo" 1 3 // enter # 42 "foo" 2 3

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-09 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui updated this revision to Diff 428301. ken-matsui added a comment. Add a test file that uses the `-Wsystem-headers` option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124534/new/ https://reviews.llvm.org/D124534 Files: clang/include

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Preprocessor/line-directive.c:33 # 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 ken-matsui wrote: > a

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-07 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. After some investigations, some directives behave weirdly. I will continue investigating, but do you have any suggestions here? Comment at: clang/test/Preprocessor/line-directive.c:33 # 42 "foo" 2 // expected-error {{invalid line marker flag '2': ca

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-07 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. @aaron.ballman Thank you for your review and sorry to have missed those directives! I also found additional directives that I might have to diagnose. Could you please tell me if these are also required? Comment at: clang/test/Preprocessor/line-dire

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-06 Thread Aaron Ballman via Phabricator via cfe-commits
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 {

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-05 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. @aaron.ballman I could suppress the strange warnings by using `isWrittenInBuiltinFile` and `isWrittenInCommandLineFile`. Thank you! Could you please review this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12453

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-05 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui updated this revision to Diff 427482. ken-matsui added a comment. Update codes as reviewed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124534/new/ https://reviews.llvm.org/D124534 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-04 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. In D124534#3490732 , @aaron.ballman wrote: > The tests run in -cc1 mode and don't #include anything, so I don't think the > issue is an internally included SDK. I think the issue could be from this: > https://github.com/llvm

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124534#3490098 , @ken-matsui wrote: > @aaron.ballman > >> If so, I think putting Diag after the call of this function would be better. > > With the above change, I tried to add comments to failed tests, but there > wer

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-03 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added a comment. @aaron.ballman > If so, I think putting Diag after the call of this function would be better. With the above change, I tried to add comments to failed tests, but there were over 300 files. During my investigation, I found most tests printed warnings without file in

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-03 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui added inline comments. Comment at: clang/lib/Lex/PPDirectives.cpp:1356 + +PP.Diag(FlagTok, diag::ext_pp_gnu_line_directive); } else if (FlagVal == 2) { aaron.ballman wrote: > ken-matsui wrote: > > aaron.ballman wrote: > > > ken-matsui wrote: > >

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Lex/PPDirectives.cpp:1356 + +PP.Diag(FlagTok, diag::ext_pp_gnu_line_directive); } else if (FlagVal == 2) { ken-matsui wrote: > aaron.ballman wrote: > > ken-matsui wrote: > > > aaron.ballman wrote: