[PATCH] D128649: [clang-cl] Handle some pragma alloc_text corner cases handled by MSVC

2022-06-29 Thread Stephen Long 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 rGf382545b2ba8: [clang-cl] Handle some pragma alloc_text corner cases handled by MSVC (authored by steplong). Repository: rG LLVM Github Monorepo

[PATCH] D128649: [clang-cl] Handle some pragma alloc_text corner cases handled by MSVC

2022-06-28 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128649/new/ https://reviews.llvm.org/D128649 ___

[PATCH] D128649: [clang-cl] Handle some pragma alloc_text corner cases handled by MSVC

2022-06-28 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 440618. steplong added a comment. - Rework logic for rejecting non-functions and non-extern C functions when C++ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128649/new/ https://reviews.llvm.org/D128649

[PATCH] D128649: [clang-cl] Handle some pragma alloc_text corner cases handled by MSVC

2022-06-28 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D128649#3612875 , @steplong wrote: >> Isn't the question whether `f` is considered "extern C" in the end or not? I >> thought `isExternC()` checks that? Are you saying it would return false for >> `f` in your example? > > Yup,

[PATCH] D128649: [clang-cl] Handle some pragma alloc_text corner cases handled by MSVC

2022-06-27 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 440344. steplong added a comment. - Error for c also Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128649/new/ https://reviews.llvm.org/D128649 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D128649: [clang-cl] Handle some pragma alloc_text corner cases handled by MSVC

2022-06-27 Thread Stephen Long via Phabricator via cfe-commits
steplong added a comment. > Isn't the question whether `f` is considered "extern C" in the end or not? I > thought `isExternC()` checks that? Are you saying it would return false for > `f` in your example? Yup, `isExternC()` is returning false for that case because there's "static". > I'm

[PATCH] D128649: [clang-cl] Handle some pragma alloc_text corner cases handled by MSVC

2022-06-27 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D128649#3612626 , @steplong wrote: > I think we have to use `isInExternCContext()` to accept the following (MSVC > accepts this): > > extern "C" { static void f(); } > static void f() {} I'm probably missing something. Is