[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-10-31 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: akhuang. rnk added a comment. @akhuang, can you help out with this? The address of dllimport symbols not being constexpr is a big pain point for our users too, and I'd love to fix it: https://github.com/protocolbuffers/protobuf/issues/10159 I am ready to be wrong here: if

[clang] 6288f70 - [lit] Fix typo in REQUIRES clause

2022-10-31 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2022-10-31T13:15:09-07:00 New Revision: 6288f70bda7438c7d249a4d54d8317172bce2b88 URL: https://github.com/llvm/llvm-project/commit/6288f70bda7438c7d249a4d54d8317172bce2b88 DIFF: https://github.com/llvm/llvm-project/commit/6288f70bda7438c7d249a4d54d8317172bce2b88.diff

[clang] 1391843 - [Hexagon] Add builtins and intrinsics for V6_v[add|sub]carryo

2022-10-31 Thread Krzysztof Parzyszek via cfe-commits
Author: Krzysztof Parzyszek Date: 2022-10-31T13:41:31-07:00 New Revision: 13918432cf67c60d56b7a89bf9b1acf9c0d0866a URL: https://github.com/llvm/llvm-project/commit/13918432cf67c60d56b7a89bf9b1acf9c0d0866a DIFF: https://github.com/llvm/llvm-project/commit/13918432cf67c60d56b7a89bf9b1acf9c0d0866a

[PATCH] D134089: [clang] Mention vector in the description for -mno-implict-float.

2022-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM We might want per-target documentation somewhere for what counts as an "floating point or vector instruction". It's not entirely obvious whether, for example, `cvtss2si (%rax), %ecx

[PATCH] D137113: [Clang] refactor CodeGenFunction::EmitAsmStmt NFC

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: void, nikic, jyknight, efriedma, craig.topper. Herald added a subscriber: StephenFan. Herald added a project: All. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added a comment. In D136497#3889938 , @void wrote: > It might be easier to see the main changes here if you submit the (very nice) > refactoring of `EmitAsmStores` first. D137113

[PATCH] D137113: [Clang] refactor CodeGenFunction::EmitAsmStmt NFC

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added a comment. Let me move the asserts, too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137113/new/ https://reviews.llvm.org/D137113 ___

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2362 + // a pointer. + if (TruncTy->isFloatingPointTy()) +Tmp = Builder.CreateFPTrunc(Tmp, TruncTy); nickdesaulniers wrote: > void wrote: > > This looks like a direc

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-10-31 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D137107#3897326 , @rnk wrote: > Unless I'm missing something, I think Clang's behavior here is preferable to > MSVC's. MSVC produces code which will not link. Clang turns the linker error > into a compiler error, which is ge

[PATCH] D136533: [clang] Fix missing diagnostic of declaration use when accessing TypeDecls through typename access

2022-10-31 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. > you're using the SDK libc++ with a ToT clang, which is technically not a > supported combination. Where is it specified that it's not a supported combination? Why should it not be supported? You don't even get libc++ from the llvm tree unless you explicitly enable i

[PATCH] D137113: [Clang] refactor CodeGenFunction::EmitAsmStmt NFC

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 472132. nickdesaulniers added a comment. - move asserts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137113/new/ https://reviews.llvm.org/D137113 Files: clang/lib/CodeGen/CGStmt.cpp Index: clang/li

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2850 assert(RegResults.size() == ResultRegTypes.size()); assert(RegResults.size() == ResultTruncRegTypes.size()); nickdesaulniers wrote: > void wrote: > > Should these asserts

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 472136. nickdesaulniers added a comment. - rebase on D137113 , add comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136497/new/ https://reviews.llvm.org/D136497 F

[PATCH] D135987: [clangBasic] Refactor StaticAnalyzer to use `clang::SarifDocumentWriter`

2022-10-31 Thread Vaibhav Yenamandra via Phabricator via cfe-commits
vaibhav.y created this revision. vaibhav.y added reviewers: aaron.ballman, cjdb. Herald added subscribers: steakhal, wenlei, martong. Herald added a reviewer: NoQ. Herald added a project: All. vaibhav.y updated this revision to Diff 472133. vaibhav.y added a comment. vaibhav.y added a reviewer: dbe

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-10-31 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D137107#3897326 , @rnk wrote: > Unless I'm missing something, I think Clang's behavior here is preferable to > MSVC's. MSVC produces code which will not link. Clang turns the linker error > into a compiler error, which is ge

[PATCH] D137113: [Clang] refactor CodeGenFunction::EmitAsmStmt NFC

2022-10-31 Thread Bill Wendling via Phabricator via cfe-commits
void accepted this revision. void added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137113/new/ https://reviews.llvm.org/D137113 ___

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers planned changes to this revision. nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2867 +for (unsigned i = 0, e = CBR->getNumIndirectDests(); i != e; ++i) { + assert(CBRRegResults[i].size() == ResultRegTypes.size()); +

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2868-2873 + // If we happen to share the same indirect and default dest, don't re-add + // stores. That was done for the default destination in the above call to + // EmitAsmStores. + llvm::B

[PATCH] D137116: [AggressiveInstCombine] Remove legacy PM pass

2022-10-31 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added a reviewer: asbirlea. Herald added a reviewer: deadalnix. Herald added subscribers: ormris, hiraditya. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald ad

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2868-2873 + // If we happen to share the same indirect and default dest, don't re-add + // stores. That was done for the default destination in the above call to + // EmitAsmStores. +

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 472144. nickdesaulniers added a comment. - remove unnecssary asserts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136497/new/ https://reviews.llvm.org/D136497 Files: clang/docs/LanguageExtensions.rs

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2868-2873 + // If we happen to share the same indirect and default dest, don't re-add + // stores. That was done for the default destination in the above call to + // EmitAsmStores. +

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 472152. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - reroll for a new sha so that phab unmarks this as "changes planned" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2868-2873 + // If we happen to share the same indirect and default dest, don't re-add + // stores. That was done for the default destination in the above call to + // EmitAsmStores. +

[PATCH] D137073: [clang] Fix inline builtin functions of an __asm__ renamed function with symbol prefixes

2022-10-31 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:5020 +std::string AsmName; +if (auto *A = FD->getAttr()) { + StringRef UserLabelPrefix = I think you can call CGM.getMangledName, but I might be wrong. It's worth doing if straightf

[PATCH] D129156: Add -fpass-plugin option to Flang

2022-10-31 Thread Tarun Prabhu via Phabricator via cfe-commits
tarunprabhu updated this revision to Diff 472161. tarunprabhu added a comment. Added a dependence for the flang tests on LLVM's Bye plugin. This results in the Bye plugin being built when check-flang is run, even if building examples has been explicitly disabled. Removed the dependency on 'exam

[PATCH] D136790: [Clang][Sema] Add -Wincompatible-function-pointer-types-strict

2022-10-31 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen added a comment. In D136790#3897184 , @aaron.ballman wrote: > please be sure to add a release note so users know there's a new warning. I'll add a release note. Thanks for the reminder! Comment at: clang/include/clang/Ba

[PATCH] D136844: [libclang] Expose completion result kind in `CXCompletionResult`

2022-10-31 Thread Egor Zhdan via Phabricator via cfe-commits
egorzhdan updated this revision to Diff 472171. egorzhdan added a comment. Preserve `CodeCompletionResult::ResultKind` and do the conversion to `CXCompletionResultKind` in `CIndexCodeCompletion.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13

[PATCH] D136844: [libclang] Expose completion result kind in `CXCompletionResult`

2022-10-31 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added a comment. This revision is now accepted and ready to land. Thanks Egor! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136844/new/ https://reviews.llvm.org/D136844 ___

[PATCH] D136894: Add clang-doc readme

2022-10-31 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth requested changes to this revision. paulkirth added a comment. This revision now requires changes to proceed. First, I don't think this is a good fit for a `README.txt` based on the content of other clang-tool `README.txt` files. Most of them only outline project scope or point to form

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-31 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 472190. ayzhao marked 6 inline comments as done. ayzhao added a comment. address some comments and implement disallowing flexible array members Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129531/new/ https://r

[PATCH] D129531: [clang][C++20] P0960R3: Allow initializing aggregates from a parenthesized list of values

2022-10-31 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a comment. Status update: While investigating @cor3ntin's comment about refactoring `VisitInitListExpr` and `VisitCXXParenListInitExpr` as they share common code, I discovered that flexible array members would cause this patch to explode. Specifically, the following code: struc

[PATCH] D136786: Fix `unsafe-fp-math` attribute emission.

2022-10-31 Thread Michele Scandale via Phabricator via cfe-commits
michele.scandale added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:181 + FPFeatures.allowFPContractAcrossStatement()); } zahiraam wrote: > Shouldn't then this also check for FPFeatures.getFPContractMode() ? This should be covere

[PATCH] D135937: [WIP][X86] Support -march=raptorlake, meteorlake

2022-10-31 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 472203. FreddyYe marked 7 inline comments as done. FreddyYe added a comment. Address comments and update to align with gcc. See my latest comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135937/new/ htt

[PATCH] D135937: [X86] Support -march=raptorlake, meteorlake

2022-10-31 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. For saving capacity of ProcessorSubtypes, gcc decided to not support part of compiler features of these two cpus: __builtin_cpu_is("meteorlake") __attribute__((target("arch=raptorlake"))) ... some others I don't know. Updated to align with gcc first. Welcome opin

[PATCH] D137059: [Driver] [Modules] Introduce -fsave-std-c++-module-file= to specify the path of the module file (2/2)

2022-10-31 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D137059#3896661 , @dblaikie wrote: > Could you link to the email/discourse discussion about supporting this mode > (I think you've linked it in other discussions, be good to have it for > reference here & Probably in the ot

[PATCH] D137052: [clang-format] Don't skip #else/#elif of #if 0

2022-10-31 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 472204. owenpan added a comment. Tweaked the fix and added a test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137052/new/ https://reviews.llvm.org/D137052 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTest.cpp

[PATCH] D137052: [clang-format] Don't skip #else/#elif of #if 0

2022-10-31 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D137052#3895426 , @sstwcw wrote: > This patch fixes the regression caused by 2183fe2 > while > introducing a new regression. But in my opinion the new reg

[PATCH] D137024: [compiler-rt] Switch from llvm-config to find_package(LLVM)

2022-10-31 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG37acf9bdd468: [compiler-rt] Switch from llvm-config to find_package(LLVM) (authored by mgorny). Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. Repository: rG LLVM Github Mono

[PATCH] D137024: [compiler-rt] Switch from llvm-config to find_package(LLVM)

2022-10-31 Thread Michał Górny via Phabricator via cfe-commits
mgorny reopened this revision. mgorny added a comment. This revision is now accepted and ready to land. Gotta figure the buildbot regression out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137024/new/ https://reviews.llvm.org/D137024 __

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-31 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. Is it acceptable to add the `non-prefix $`? if not, an alternative fix for the build failure is to add the `prefix $` in sanitizer_syscall_linux_loongarch64.inc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-31 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D136436#3898392 , @tangyouling wrote: > Is it acceptable to add the `non-prefix $`? if not, an alternative fix for > the build failure is to add the `prefix $` in > sanitizer_syscall_linux_loongarch64.inc People have dif

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-31 Thread Xi Ruoyao via Phabricator via cfe-commits
xry111 added a comment. In D136436#3898392 , @tangyouling wrote: > Is it acceptable to add the `non-prefix $`? if not, an alternative fix for > the build failure is to add the `prefix $` in > sanitizer_syscall_linux_loongarch64.inc I wrote `sanitizer_

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-31 Thread Xi Ruoyao via Phabricator via cfe-commits
xry111 added a comment. In D136436#3898398 , @xry111 wrote: > In D136436#3898392 , @tangyouling > wrote: > >> Is it acceptable to add the `non-prefix $`? if not, an alternative fix for >> the build failure is to

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2022-10-31 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. In D136436#3898394 , @SixWeining wrote: > In D136436#3898392 , @tangyouling > wrote: > >> Is it acceptable to add the `non-prefix $`? if not, an alternative fix for >> the build fai

<    1   2   3