[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Thank you so much for working on this! It's been on my todo list for a while and just haven't gotten around to it. In D130894#3702166 , @aaron.ballman wrote: > In D130894#3701749 ,

[PATCH] D131265: Fixed sm version for .and bmma operator.

2022-08-05 Thread Jack Kirk via Phabricator via cfe-commits
JackAKirk created this revision. JackAKirk added a reviewer: tra. Herald added subscribers: mattd, gchakrabarti, asavonic. Herald added a project: All. JackAKirk requested review of this revision. Herald added subscribers: cfe-commits, jholewinski. Herald added a project: clang. As stated here

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-05 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 450294. barannikov88 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://reviews.llvm.org/D130394 Files: clang/lib/CodeGen/ABIInfo.h

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-05 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 450298. barannikov88 added a comment. Assert that Swift ABI info is initialized before accessing it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://reviews.llvm.org/D130394 Files:

[PATCH] D129231: [Builtins] Do not claim all libfuncs are readnone with trapping math.

2022-08-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129231/new/ https://reviews.llvm.org/D129231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Any tests with macros? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130894/new/ https://reviews.llvm.org/D130894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130894#3702233 , @tbaeder wrote: > I don't know much about fixit hints, would they be appropriate to display it > below the line itself, e.g. > > test.cpp:24:17: note: expression evaluates to > static_assert(c !=

[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131255#3702286 , @ShawnZhong wrote: > Thanks for the quick reply and the reference on the C standard! > > On the C++ side, Section C.1.8 specified that `int` bit-fields are signed: > >> Change: Bit-fields of type plain

[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield

2022-08-05 Thread Shawn Zhong via Phabricator via cfe-commits
ShawnZhong added a comment. Thanks for the quick reply and the reference on the C standard! On the C++ side, Section C.1.8 specified that `int` bit-fields are signed: > Change: Bit-fields of type plain int are signed. > Rationale: Leaving the choice of signedness to implementations could lead

[PATCH] D131258: [Sema] Merge variable template specializations

2022-08-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: ChuanqiXu. Herald added a project: All. ilya-biryukov requested review of this revision. Herald added a project: clang. Clang used to produce redefinition errors, see tests for examples. Repository: rG LLVM Github Monorepo

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. I don't know much about fixit hints, would they be appropriate to display it below the line itself, e.g. test.cpp:24:17: note: expression evaluates to static_assert(c != c); '0' != '0' ~~^~~~ Or would it be even better to just inline

[PATCH] D130951: [HLSL] CodeGen hlsl resource binding.

2022-08-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.h:64 CodeGenModule uint32_t ResourceCounters[static_cast( hlsl::ResourceClass::NumClasses)] = {0}; Anastasia wrote: > This is not part of this change but any reason why it is

[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang

2022-08-05 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. It would be great to get this landed. Can someone pls take a look at it? It's quite independent from the remainder of the work and self-contained. maybe @tlively ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2022-08-05 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. It would be great to get this landed. Can someone pls take a look at it? It's quite independent from the remainder of the work and self-contained. maybe @tlively ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-05 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 450276. wyt marked an inline comment as done. wyt added a comment. Rebase to head. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131065/new/ https://reviews.llvm.org/D131065 Files:

[clang] 4bc9e60 - Removing redundant code; NFC

2022-08-05 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-08-05T09:17:20-04:00 New Revision: 4bc9e603065b59976f3a16b7ecc6b5fb109f5f2d URL: https://github.com/llvm/llvm-project/commit/4bc9e603065b59976f3a16b7ecc6b5fb109f5f2d DIFF: https://github.com/llvm/llvm-project/commit/4bc9e603065b59976f3a16b7ecc6b5fb109f5f2d.diff

[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: aaron.ballman, clang-language-wg. aaron.ballman added a comment. Thank you for working on this! I think this is going in the right direction, but I think there's some more work needed here because the rules depend on the type of the bit-field (at least in C, I've

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. or test.cpp:25:17: note: evaluated expression: '0' > 'a' CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130894/new/ https://reviews.llvm.org/D130894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield

2022-08-05 Thread Shawn Zhong via Phabricator via cfe-commits
ShawnZhong updated this revision to Diff 450274. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131255/new/ https://reviews.llvm.org/D131255 Files: clang/lib/Sema/SemaChecking.cpp clang/test/Sema/constant-conversion.c Index:

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: erichkeane, cjdb, clang-language-wg, jyknight. aaron.ballman added a comment. In D130894#3701749 , @tbaeder wrote: > For the record, the output now looks something like this: > > test.cpp:24:1: error: static assertion

[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield

2022-08-05 Thread Shawn Zhong via Phabricator via cfe-commits
ShawnZhong created this revision. ShawnZhong added a reviewer: rsmith. ShawnZhong added a project: clang. Herald added a project: All. ShawnZhong requested review of this revision. Herald added a subscriber: cfe-commits. Fix https://github.com/llvm/llvm-project/issues/53253 Repository: rG

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-08-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. +1 on downgrading to a warning, so that users can have time to do cleanup on their codebase. We also see internal breakages caused by this change. It breaks some code using the magic_enum library, a simple repro example:

[PATCH] D131194: [C++20] Fix crash-on-valid with consteval temporary construction through list initialization

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131194#3700688 , @efriedma wrote: > Instead of trying to dig through subexpressions of the ConstantExpr to try to > infer the type we need, can we just compute it directly? > > QualType RetType = CE->getType(); >

[PATCH] D131194: [C++20] Fix crash-on-valid with consteval temporary construction through list initialization

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 450271. aaron.ballman added a comment. Improved from review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131194/new/ https://reviews.llvm.org/D131194 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/CGExprConstant.cpp

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-05 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.h:63 + /// Returns Swift ABI info helper for the target. + const SwiftABIInfo () const { return *SwiftInfo; } + aaron.ballman wrote: > `SwiftInfo` isn't always initialized to a

[PATCH] D131213: [clang][Headers] Fix unintentional error in D130800

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > Undefined macros evaluate to zero, so when checking for a smaller value, we > need to include the case when the macro is undefined. The code being changed already checks `defined(__cplusplus)` so there no undefined macro value being tested. What's more, if

[PATCH] D131065: [clang][dataflow] Store DeclContext of block being analysed in Environment if available.

2022-08-05 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:537-539 + auto *Caller = Env.getDeclCtx(); + Env = Environment(ExitState->Env); + Env.setDeclCtx(Caller); I believe you'll need

[PATCH] D131067: [analyzer] Treat values passed as parameter as escaped

2022-08-05 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/dead-stores.cpp:225 +void functionReferenceParameter(int ) { + i = 5; // no warning +} By checking it on godbolt, this line never raised a warning. https://godbolt.org/z/n7fP5od5q You must be

[PATCH] D130268: [NFC] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-08-05 Thread Dawid Jurczak 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 rG1bd31a689844: [NFC] Add SmallVector constructor to allow creation of SmallVectorT from… (authored by yurai007). Repository: rG LLVM Github

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This seems like a reasonable set of changes, but I'd prefer someone more well-versed in codegen make the final call. Comment at: clang/lib/CodeGen/TargetInfo.h:63 + /// Returns Swift ABI info helper for the target. + const SwiftABIInfo ()

[PATCH] D131067: [analyzer] Treat values passed as parameter as escaped

2022-08-05 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Please, consider stating the motivation behind this change. For me, by looking at the modified test, it feels like we would lose legitimate findings (aka. true-positive reports) by applying this change. From my perspective, the store to `i` is //dead//, since it will be

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-08-05 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. IMO the relevant point is the (non-)const-ness of the corresponding parameter, i.e. can the passed object get mutated or not. The fact that there's an ampersand at the call site (which is not even the case if the variable is itself a pointer) does not tell me that.

[PATCH] D130268: [NFC] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-08-05 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 updated this revision to Diff 450259. yurai007 added a comment. Fix std::initializer_list lifetime issue in test case revealed on CI Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130268/new/ https://reviews.llvm.org/D130268 Files:

[clang] 809b416 - [NFC] Requires x86-registered-target for test/pr56919.cpp

2022-08-05 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-05T16:46:38+08:00 New Revision: 809b4166413f157ce8e45ba0f80438701bf2e133 URL: https://github.com/llvm/llvm-project/commit/809b4166413f157ce8e45ba0f80438701bf2e133 DIFF: https://github.com/llvm/llvm-project/commit/809b4166413f157ce8e45ba0f80438701bf2e133.diff

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-05 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added a comment. In D131134#3699742 , @craig.topper wrote: > How does this interact with `-march=native -m32`. Won't that pick up the amx > flag from CPUID? Good point. I will continue the work. Repository: rG LLVM Github Monorepo

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-05 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added a comment. In D131134#3699742 , @craig.topper wrote: > How does this interact with `-march=native -m32`. Won't that pick up the amx > flag from CPUID? In D131134#3699344 , @aaron.ballman

[PATCH] D130470: [clang][analyzer] Add more wide-character functions to CStringChecker

2022-08-05 Thread Balázs Kéri 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 rG501faaa0d65e: [clang][analyzer] Add more wide-character functions to CStringChecker (authored by balazske). Repository: rG LLVM Github Monorepo

[clang] 501faaa - [clang][analyzer] Add more wide-character functions to CStringChecker

2022-08-05 Thread Balázs Kéri via cfe-commits
Author: Balázs Kéri Date: 2022-08-05T10:32:53+02:00 New Revision: 501faaa0d65e9814566ef65e58d834c13b8a URL: https://github.com/llvm/llvm-project/commit/501faaa0d65e9814566ef65e58d834c13b8a DIFF: https://github.com/llvm/llvm-project/commit/501faaa0d65e9814566ef65e58d834c13b8a.diff

[PATCH] D130754: [X86] Support ``-mindirect-branch-cs-prefix`` for call and jmp to indirect thunk

2022-08-05 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D130754#3701858 , @pengfei wrote: > In D130754#3701837 , @nikic wrote: > >> This change caused a significant compile-time regression for `O0` builds >> (about 1%): >>

[PATCH] D131241: [Clang][Lex] Extend HeaderSearch::LookupFile to control OpenFile behavior.

2022-08-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Maybe we can add a little more context. In the case of static compilation the file system is pretty much read-only and taking a snapshot of it usually is sufficient. In the interactive C++ case the compilation is longer and people can create and include files,

[clang-tools-extra] 4c106c9 - [clangd] Change the url for clang-tidy check documentation

2022-08-05 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2022-08-05T08:42:52+01:00 New Revision: 4c106c93eb68f8f9f201202677cd31e326c16823 URL: https://github.com/llvm/llvm-project/commit/4c106c93eb68f8f9f201202677cd31e326c16823 DIFF: https://github.com/llvm/llvm-project/commit/4c106c93eb68f8f9f201202677cd31e326c16823.diff

[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

2022-08-05 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4c106c93eb68: [clangd] Change the url for clang-tidy check documentation (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128379/new/

[PATCH] D130754: [X86] Support ``-mindirect-branch-cs-prefix`` for call and jmp to indirect thunk

2022-08-05 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D130754#3701837 , @nikic wrote: > This change caused a significant compile-time regression for `O0` builds > (about 1%): >

[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 450243. python3kgae added a comment. Rebase and fix test fail. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128845/new/ https://reviews.llvm.org/D128845 Files: clang/include/clang/Basic/TargetOptions.h

[clang] 230d6f9 - [Coroutines] Remove lifetime intrinsics for spliied allocas in coroutine frames

2022-08-05 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-05T14:50:43+08:00 New Revision: 230d6f93aaabae985e9fafd071bb3737533c6083 URL: https://github.com/llvm/llvm-project/commit/230d6f93aaabae985e9fafd071bb3737533c6083 DIFF: https://github.com/llvm/llvm-project/commit/230d6f93aaabae985e9fafd071bb3737533c6083.diff

[PATCH] D130754: [X86] Support ``-mindirect-branch-cs-prefix`` for call and jmp to indirect thunk

2022-08-05 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. This change caused a significant compile-time regression for `O0` builds (about 1%): http://llvm-compile-time-tracker.com/compare.php?from=45bae1be90472c696f6ba3bb4f8fabee76040fa9=6f867f9102838ebe314c1f3661fdf95700386e5a=instructions At a guess, fetching a module flag

[PATCH] D130516: [llvm] compression classes

2022-08-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: llvm/lib/ProfileData/Coverage/CoverageMappingWriter.cpp:54-60 + OptionalCompressionScheme = compression::noneIfUnsupported( + (Compress && DoInstrProfNameCompression) ? OptionalCompressionScheme +

[PATCH] D131241: [Clang][Lex] Extend HeaderSearch::LookupFile to control OpenFile behavior.

2022-08-05 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In the downstream projects (ROOT and Cling), we want to do header files lookups but no `OpenFile` behavior as we only need

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. looks great CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130894/new/ https://reviews.llvm.org/D130894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D131240: [NFC][HLSL] Fix build error caused missing typo update.

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb2c9ff727379: [NFC][HLSL] Fix build error caused missing typo

[clang] b2c9ff7 - [NFC][HLSL] Fix build error caused missing typo update.

2022-08-05 Thread Xiang Li via cfe-commits
Author: Xiang Li Date: 2022-08-04T23:20:25-07:00 New Revision: b2c9ff727379992ef472e32620635b7e5d561d60 URL: https://github.com/llvm/llvm-project/commit/b2c9ff727379992ef472e32620635b7e5d561d60 DIFF: https://github.com/llvm/llvm-project/commit/b2c9ff727379992ef472e32620635b7e5d561d60.diff

[PATCH] D131240: [NFC][HLSL] Fix build error caused missing typo update.

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added a reviewer: beanz. Herald added a subscriber: Anastasia. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. setHLSLFnuctionAttributes to

[PATCH] D131239: [NFC][HLSL] Fix typo in CGHLSLRuntime.

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added a reviewer: beanz. Herald added a subscriber: Anastasia. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Change setHLSLFnuctionAttributes to

[PATCH] D131238: [NFC][HLSL] Fix typo in CGHLSLRuntime.

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added a reviewer: beanz. Herald added a subscriber: Anastasia. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Change setHLSLFnuctionAttributes to

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-05 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. For the record, the output now looks something like this: test.cpp:24:1: error: static assertion failed due to requirement 'c != c' static_assert(c != c); ^ ~~ test.cpp:24:17: note: expression evaluates to '('0' != '0')' static_assert(c != c);

[PATCH] D131238: [NFC][HLSL] Fix typo in CGHLSLRuntime.

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6134629af087: [NFC][HLSL] Fix typo in CGHLSLRuntime. (authored by

[clang] 6134629 - [NFC][HLSL] Fix typo in CGHLSLRuntime.

2022-08-05 Thread Xiang Li via cfe-commits
Author: Xiang Li Date: 2022-08-04T23:08:40-07:00 New Revision: 6134629af08705e1f495171221deb46f6ba3d65d URL: https://github.com/llvm/llvm-project/commit/6134629af08705e1f495171221deb46f6ba3d65d DIFF: https://github.com/llvm/llvm-project/commit/6134629af08705e1f495171221deb46f6ba3d65d.diff

<    1   2