[PATCH] D92892: [clang] Change builtin object size to be compatible with GCC when sub-object is invalid

2021-01-07 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel added a comment. Seems I don't have commit access. I'll look into it. For now, could someone push this commit? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92892/new/ https://reviews.llvm.org/D92892 ___ cfe-commits mail

[PATCH] D92892: [clang] Change builtin object size to be compatible with GCC when sub-object is invalid

2021-01-06 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel updated this revision to Diff 314965. jtmott-intel added a comment. Updated comments to reflect "outside of" instead of "before". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92892/new/ https://reviews.llvm.org/D92892 Files: clang/lib/AST/ExprConstant.cpp clang/test/C

[PATCH] D84049: Disable use of _ExtInt with '__atomic' builtins

2020-09-01 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel added inline comments. Comment at: libcxx/test/libcxx/atomics/ext-int.verify.cpp:1 +// REQUIRES: clang-11 + ldionne wrote: > This isn't great, since it won't run on clang-12, etc. I'll change it to: > > ``` > // UNSUPPORTED: clang-4, clang-5, clang-

[PATCH] D84049: Disable use of _ExtInt with '__atomic' builtins

2020-08-18 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel added a comment. Committed to master, and created bug to cherry pick into 11.0. https://bugs.llvm.org/show_bug.cgi?id=47222 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84049/new/ https://reviews.llvm.org/D84049

[PATCH] D84049: Disable use of _ExtInt with '__atomic' builtins

2020-08-18 Thread Mott, Jeffrey T via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGca77ab494aa2: Disable use of _ExtInt with '__atomic' builtins (authored by jtmott-intel). Herald added projects: clang, libc++. Herald added subscribers: libcxx-commits, cfe-commits. Herald added a reviewe

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-14 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel added a comment. I don't have commit access. For whoever performs the commit, here's a (draft) commit message: [clang] Fix or emit diagnostic for checked arithmetic builtins with _ExtInt types - Fix computed size for _ExtInt types passed to checked arithmetic builtins. - E

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-12 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel marked an inline comment as done. jtmott-intel added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:327 return true; TheCall->setArg(2, Arg.get()); } rjmccall wrote: > jtmott-intel wrote: > > rjmccall wrote: > > > I know

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-12 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel updated this revision to Diff 270482. jtmott-intel added a comment. - Removed sign/unsign select. - Added test and support for placeholder types in builtins. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81420/new/ https://reviews.llvm.org/D81420 Files: clang/include/cla

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-11 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:327 return true; TheCall->setArg(2, Arg.get()); } rjmccall wrote: > I know this is existing code, but this is a broken mess. Please change this > to: > > ``` > Exp

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-10 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel updated this revision to Diff 269995. jtmott-intel added a comment. This updated patch prepared before John's latest comments. - Changed diagnostic message to something halfway between John and Erich's suggestions. - Removed superfluous calls to Arg.get. - Combined call to Diag and

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-10 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel marked 6 inline comments as done. jtmott-intel added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7939 "to a non-const integer (%0 invalid)">; +def err_overflow_builtin_extint_size : Error< + "_ExtInt argument larger than 64-bits

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-10 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel marked an inline comment as done. jtmott-intel added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:337 + QualType Ty = + I < 2 ? Arg.get()->getType() +: Arg.get()->getType()->getAs()->getPointeeType(); eri

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-09 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel updated this revision to Diff 269727. jtmott-intel added a comment. Limited diagnostic to *signed* _ExtInt, and added test to verify unsigned works. Reused existing diagnostic message rather than make a new one. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81420/new/ https

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-09 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel marked an inline comment as done. jtmott-intel added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7939 "to a non-const integer (%0 invalid)">; +def err_overflow_builtin_extint_size : Error< + "_ExtInt argument larger than 64-bits

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-09 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel updated this revision to Diff 269564. jtmott-intel added a comment. Updated the diagnostic check and message for 128 rather than 64 bits. Added sema tests for 128/129 sizes. Added codegen tests for 127/128 sizes to mul. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81420/new

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-09 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel marked 2 inline comments as done. jtmott-intel added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:1747-1748 break; case Builtin::BI__builtin_add_overflow: case Builtin::BI__builtin_sub_overflow: case Builtin::BI__builtin_mul_overflow: --

[PATCH] D81420: Fix size for _ExtInt types with builtins

2020-06-08 Thread Mott, Jeffrey T via Phabricator via cfe-commits
jtmott-intel created this revision. jtmott-intel added reviewers: erichkeane, rjmccall. This patch addresses two issues. The first issue is use of the checked arithmetic builtins in combination with _ExtInt