[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Commit in r295114. https://reviews.llvm.org/D29868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-13 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; aaron.ballman wrote: > majnemer wrote: > > aaron.ballman wrote: > > > compnerd wrote: > > > > aaron.ballman

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; majnemer wrote: > aaron.ballman wrote: > > compnerd

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-13 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; aaron.ballman wrote: > compnerd wrote: > > aaron.ballman wrote: > > > compnerd wrote: > > > > I think that

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 3 inline comments as done. aaron.ballman added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; compnerd wrote: > aaron.ballman wrote: > > compnerd

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 88198. aaron.ballman added a comment. Fixed review feedback https://reviews.llvm.org/D29868 Files: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseDecl.cpp test/Parser/declspec-recovery.c test/Parser/declspec-supported.c Index:

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-12 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; aaron.ballman wrote: > compnerd wrote: > > I think that we want to emit the diagnostic even if there is no

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2973 + // recognize that scenario and recover gracefully. + if (!getLangOpts().MicrosoftExt && Tok.is(tok::identifier) && + Tok.getIdentifierInfo()->getName().equals("__declspec")) {

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 88122. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Correcting review feedback. https://reviews.llvm.org/D29868 Files: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseDecl.cpp

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2973 + // recognize that scenario and recover gracefully. + if (!getLangOpts().MicrosoftExt && Tok.is(tok::identifier) && + Tok.getIdentifierInfo()->getName().equals("__declspec")) {

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. In r238238, we removed __declspec as a universally-accepted keyword -- instead, it is only enabled as a supported keyword when -fms-extensions or -fdeclspec is passed to the driver. However, this had an unfortunate side-effect in that it made for bad