[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-08-15 Thread Kees Cook via Phabricator via cfe-commits
kees added a comment. For latest version see https://reviews.llvm.org/D64838 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:1279 continue; - if (S.getLangOpts().CPlusPlus11) { + if (S.getLangOpts().CPlusPlus11 || S.getLangOpts().C99) { const Stmt *Term = B->getTerminatorStmt(); a

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-18 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205349. xbolva00 added a comment. Addressed notes. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Sema/AnalysisBasedWarnings.cpp test/Sema/fallthrough-a

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-18 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. As noted in D63299 , seems like this would require more surgery - I cannot continue D63299 since I have no enough knowledge to rework it fully. I will update this patch, in case somebody picks D63299

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:1279 continue; - if (S.getLangOpts().CPlusPlus11) { + if (S.getLangOpts().CPlusPlus11 || S.getLangOpts().C99) { const Stmt *Term = B->getTerminatorStmt(); -

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204646. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Sema/AnalysisBasedWarnings.cpp test/Sema/fallthrough-attr.c test/SemaCXX/switch-implicit-fallthrough.cpp

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204644. xbolva00 added a comment. fixed testcase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Sema/AnalysisBasedWarnings.cpp test/SemaCXX/switch-implicit-fall

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/fallthrough-attr.c:48 + return n; +} Seems like lines 24-48 were an accidental copy+paste? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 ___

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204630. xbolva00 added a comment. Split. Now patch only adds _attribute__ ((fallthrough)) support. Parsing will be hopefully solved in second patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 Files:

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204631. xbolva00 added a comment. Fixed EOF in test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Sema/AnalysisBasedWarnings.cpp test/Sema/fallthrough-at

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/address_spaces.c:12 { - _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS2 *x;// expected-error {{use of undeclared identifier 'x'}} _AS1 float * _AS2 *B; efriedma wr

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/Sema/address_spaces.c:12 { - _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS2 *x;// expected-error {{use of undeclared identifier 'x'}} _AS1 float * _AS2 *B; xbolva00 wrote: >

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:1279 continue; - if (S.getLangOpts().CPlusPlus11) { + if (S.getLangOpts().CPlusPlus11 || S.getLangOpts().C99) { const Stmt *Term =

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/Sema/address_spaces.c:12 { - _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS2 *x;// expected-error {{use of undeclared identifier 'x'}} _AS1 float * _

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: test/Sema/address_spaces.c:12 { - _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS2 *x;// expected-error {{use of undeclared identifier 'x'}} _AS1 float * _AS2 *B; efriedma wr

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: test/Sema/address_spaces.c:12 { - _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS2 *x;// expected-error {{use of undeclared identifier 'x'}} _AS1 float * _AS2 *B; xbolva00 wrote: >

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. > but as part of this commit but *not* as part of this commit CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:1279 continue; - if (S.getLangOpts().CPlusPlus11) { + if (S.getLangOpts().CPlusPlus11 || S.getLangOpts().C99) { const Stmt *Term = B->getTerminatorStmt(); ---

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked 2 inline comments as done. xbolva00 added inline comments. Comment at: test/Sema/address_spaces.c:12 { - _AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}} + _AS2 *x;// expected-error {{use of undeclared identifier 'x'}} _AS1 float * _

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204584. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Parse/ParseStmt.cpp lib/Sema/AnalysisBasedWarnings.cpp test/Sema/address_spaces.c test/Sema/block-liter

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 204583. xbolva00 added a comment. Addressed some review notes. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Parse/ParseStmt.cpp lib/Sema/AnalysisBased

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/Sema/block-literal.c:44 takeblock(^{ x = 4; }); // expected-error {{variable is not assignable (missing __block type specifier)}} - __block y = 7;// expected-warning {{type speci

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. __block y = 7; if (Tok.is(tok::kw___attribute)) printf("__attr\n"); Output: __attr Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63260/new/ https://reviews.llvm.org/D63260 ___ cfe-commi

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked 5 inline comments as done. xbolva00 added inline comments. Comment at: lib/Parse/ParseStmt.cpp:110-111 assert((Attrs.empty() || Res.isInvalid() || Res.isUsable()) && "attributes on empty statement"); nickdesaulniers wrote: > Would

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for the patch, I look forward to this feature! I think the changes in `test/SemaCXX/warn-unused-label-error.cpp`, `test/Sema/block-literal.c`, and `test/Sema/address_spaces.c` should not be committed (2 look like unrelated cleanups?).

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/Sema/block-literal.c:44 takeblock(^{ x = 4; }); // expected-error {{variable is not assignable (missing __block type specifier)}} - __block y = 7;// expected-warning {{type speci

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added reviewers: aaron.ballman, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D63260 Files: include/clang/Basic/Attr.td lib/Parse/ParseStmt.cpp lib/Sema/AnalysisBasedWa