[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-05-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 348089. yaxunl marked 4 inline comments as done. yaxunl added a comment. revised by Artem's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103108/new/ https://reviews.llvm.org/D103108 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D102839: [RISCV][Clang] Add -mno-div option to disable hardware int division

2021-05-26 Thread Luís Marques via Phabricator via cfe-commits
luismarques added a comment. In D102839#2782557 , @kito-cheng wrote: > We have Zmmul extension in the ISA spec now, that's equivalent to `-mno-div` > , so I suggest we should go forward to implement that extension rather than > `-mno-div`. > https://gi

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-05-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Sema/SemaCUDA.cpp:568 +} +// Check whether a variable has an allowed initializer for a CUDA device side +// variable with global storage. \p VD may be a host variable to be checked for tra wrote: > Nit: add an e

[PATCH] D103204: [Format] New BreakInheritanceList style AfterComma

2021-05-26 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 348092. lichray added a comment. Fix typo in docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103204/new/ https://reviews.llvm.org/D103204 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/cla

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348093. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348094. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348095. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-05-26 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Overall looks good, though I've got one more question. Comment at: clang/test/SemaCUDA/device-use-host-var.cu:90 + const int &ref_const_var = global_const_var; const int &ref_constexpr_var = global_constexpr_var; *out = ref_host_var;

[PATCH] D103163: [Matrix] Skip matrix casts checks for class or struct types in C++.

2021-05-26 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha added a comment. Thanks, this looks good to me! The existing tests are failing but seems like they are not difficult to fix. Once those are fixed, I will mark this as accepted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103163/new/

[PATCH] D103163: [Matrix] Skip matrix casts checks for class or struct types in C++.

2021-05-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 348106. fhahn added a comment. Fix IR checks, which broke after adding fields to the struct/class used in the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103163/new/ https://reviews.llvm.org/D103163 Fi

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348108. erichkeane added a comment. Herald added subscribers: phosek, aheejin, dschuff. Replace the DeviceLambdaManglingNumber mechanism with the callback mechanism. Hopefully this is what you were thinking @rjmccall. CHANGES SINCE LAST ACTION https://

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348109. erichkeane added a comment. Woops! Last update was JUST the changes, and I forgot to squash. Here is the whole patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 Files: clang/docs/Langu

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo updated this revision to Diff 348113. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103195/new/ https://reviews.llvm.org/D103195 Files: clang/include/clang/ASTMatchers/GtestMatchers.h clang/lib/ASTMatchers/GtestMatchers.cpp clang/unittests/ASTMatchers/GtestMatchersTest.cpp

[PATCH] D102543: [Scudo] Make -fsanitize=scudo use standalone. Migrate tests.

2021-05-26 Thread Mitch Phillips via Phabricator via cfe-commits
hctim updated this revision to Diff 348116. hctim added a comment. Move lit tests behind the cmake guard: "if(COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_HAS_SCUDO_STANDALONE)" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102543/new/ https://review

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, that seems to work out cleanly. Comment at: clang/include/clang/AST/Expr.h:2045 +// representation of the type (or type of the expression) in a way that permits +// us to properly encode information about the SYCL kernels. +class UniqueStableNa

[PATCH] D102543: [Scudo] Make -fsanitize=scudo use standalone. Migrate tests.

2021-05-26 Thread Kostya Kortchinsky via Phabricator via cfe-commits
cryptoad added a comment. I saw some bots failure for preinit.c: FAIL: ScudoStandalone-i386 :: preinit.c (768 of 856) TEST 'ScudoStandalone-i386 :: preinit.c' FAILED Script: -- : 'RUN: at line 1'; /b/sanitizer-x86_64-linux/build/clang_bui

[PATCH] D102736: Fix tmp files being left on Windows builds.

2021-05-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. I think this look good. Adrian, are your concerns addressed? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102736/new/ https://reviews.llvm.org/D102736 __

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348121. erichkeane marked 4 inline comments as done. erichkeane added a comment. Ok, this should get me up to date! Fixed a bunch of the comments referring to 'expression', added LangOpts::isSYCL, and changed it to DiscriminatorOverride. CHANGES SINCE L

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-05-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > Well, no, I'm afraid it is actually clear that that code does have UB > according to the C++ standard. Perhaps you mean that it *shouldn't* have UB, > or that Clang should define its behavior despite the standard. > > I might agree with you that I don't see the va

[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding

2021-05-26 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In D101191#2782963 , @rupprecht wrote: > The issue I'm seeing seems more directly caused by SLP vectorization, as it > goes away with `-fno-slp-vectorize`. This patch merely unblocks that bad > optimization AFAICT. Filed as h

[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics

2021-05-26 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added subscribers: JDevlieghere, vsapsai. bruno added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:1851 - - return path::convert_to_slash(File.drop_front(BestPrefixLength)); + // Try resolving resulting filaname via reverse search in header maps, + // ke

[PATCH] D102839: [RISCV][Clang] Add -mno-div option to disable hardware int division

2021-05-26 Thread ksyx via Phabricator via cfe-commits
ksyx added a comment. So it seems the better way to do this would definitely by adding a subextension as the spec had changed. But I'd like also to ask how will GCC deal with this option, and should we make this option an alias to turn off M extension and turn on ZMMul extension? CHANGES SIN

[PATCH] D103218: [Fuchsia][CMake] Add missing include path.

2021-05-26 Thread Haowei Wu via Phabricator via cfe-commits
haowei created this revision. haowei added reviewers: phosek, mcgrathr, leonardchan, gulfem. Herald added subscribers: cryptoad, mgorny. haowei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds include path for missing header

[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics

2021-05-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Naively, this sounds like it could be a non-trivial tax on build times. But it looks like it's only called in Clang from `Sema::diagnoseMissingImport`, which only happens on error anyway. Comment at: clang/unittests/Lex/HeaderMapTest.cpp:9 -#incl

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-05-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D96418#2783541 , @leonardchan wrote: >> Well, no, I'm afraid it is actually clear that that code does have UB >> according to the C++ standard. Perhaps you mean that it *shouldn't* have >> UB, or that Clang should define it

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-05-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D96418#2783541 , @leonardchan wrote: >> Well, no, I'm afraid it is actually clear that that code does have UB >> according to the C++ standard. Perhaps you mean that it *shouldn't* have >> UB, or that Clang should define its

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-05-26 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:217 + // after -march. And while only using the the value of last -march, it + // includes all the options passed via -Wa,-march. + success = true; This comment is confusing.

[clang] a4b61c8 - The compiler is crashing when compiling a coroutine intrinsic without

2021-05-26 Thread Zahira Ammarguellat via cfe-commits
Author: Zahira Ammarguellat Date: 2021-05-26T18:07:31-07:00 New Revision: a4b61c82cf1a45c172af2e0242f5019281de14f8 URL: https://github.com/llvm/llvm-project/commit/a4b61c82cf1a45c172af2e0242f5019281de14f8 DIFF: https://github.com/llvm/llvm-project/commit/a4b61c82cf1a45c172af2e0242f5019281de14f8

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-05-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/SemaCUDA/device-use-host-var.cu:90 + const int &ref_const_var = global_const_var; const int &ref_constexpr_var = global_constexpr_var; *out = ref_host_var; tra wr

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348142. erichkeane added a comment. Apply clang-format patch, except for the changes to IdentifierTable. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 Files: clang/docs/LanguageExtensions.rst clan

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 ___ cfe-commits mailing list

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-05-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. There's no reliable way to report this with UBSan because in general we can't ever know that a loop will not terminate. That said, we could report *obviously* trivial loops, either with UBSan or just with a diagnostic. If the body of your loop really is empty, and th

[clang] 0ce58c5 - [Fuchsia][CMake] Add missing include path.

2021-05-26 Thread Haowei Wu via cfe-commits
Author: Haowei Wu Date: 2021-05-26T19:59:53-07:00 New Revision: 0ce58c52d50bd2edd09df7c7ef3dd4dc85b05992 URL: https://github.com/llvm/llvm-project/commit/0ce58c52d50bd2edd09df7c7ef3dd4dc85b05992 DIFF: https://github.com/llvm/llvm-project/commit/0ce58c52d50bd2edd09df7c7ef3dd4dc85b05992.diff LOG

[PATCH] D103218: [Fuchsia][CMake] Add missing include path.

2021-05-26 Thread Haowei Wu 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 rG0ce58c52d50b: [Fuchsia][CMake] Add missing include path. (authored by haowei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D103221: [HIP] Change default lang std to c++14

2021-05-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a subscriber: dexonsmith. yaxunl requested review of this revision. Currently clang and nvcc use c++14 as default std for C++. gcc 11 even uses c++17 as default std for C++. However, clang uses c++98 as default std for HIP.

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-05-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 348149. yaxunl marked an inline comment as done. yaxunl added a comment. fix test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103108/new/ https://reviews.llvm.org/D103108 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/S

[PATCH] D102663: Bug 49633 - Added warning for static inline global and namespaced declarations

2021-05-26 Thread Serberoth via Phabricator via cfe-commits
serberoth updated this revision to Diff 348156. serberoth retitled this revision from "Bug 49633 - Added warning for static inline global and namespaced declarations for c++17+" to "Bug 49633 - Added warning for static inline global and namespaced declarations". serberoth edited the summary of th

[PATCH] D103131: support debug info for alias variable

2021-05-26 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui updated this revision to Diff 348160. kamleshbhalui added a comment. match gcc behavior Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103131/new/ https://reviews.llvm.org/D103131 Files: clang/lib/CodeGen/CGDebugInfo.cpp clang/lib

[PATCH] D103204: [Format] New BreakInheritanceList style AfterComma

2021-05-26 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 348164. lichray added a comment. Simplify implementation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103204/new/ https://reviews.llvm.org/D103204 Files: clang/docs/ClangFormatStyleOptions.rst clang/incl

[PATCH] D97183: [analyzer] Add NoteTag for smart-ptr get()

2021-05-26 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 348165. RedDocMD marked 10 inline comments as done. RedDocMD added a comment. More refactoring Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97183/new/ https://reviews.llvm.org/D97183 Files: clang/lib/Stati

[PATCH] D97183: [analyzer] Add NoteTag for smart-ptr get()

2021-05-26 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 348166. RedDocMD added a comment. Removed extra include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97183/new/ https://reviews.llvm.org/D97183 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtr.h clang/l

[PATCH] D103228: [PoC][RISCV] Using pragma to register vector intrinsic

2021-05-26 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng created this revision. Herald added subscribers: vkmr, frasercrmck, dexonsmith, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook,

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/ASTMatchers/GtestMatchers.h:34 +enum class MockArgs { + NoMatchers, worth comments. out of curiosity, what do we call this `Matchers`? I'd be careful to introduce a different matcher concept in th

[PATCH] D103228: [PoC][RISCV] Using pragma to register vector intrinsic

2021-05-26 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 348175. kito-cheng added a comment. Minor cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103228/new/ https://reviews.llvm.org/D103228 Files: clang/include/clang/Basic/Builtins.h clang/include/cla

[PATCH] D101140: [WebAssembly][CodeGen] IR support for WebAssembly local variables

2021-05-26 Thread Andy Wingo via Phabricator via cfe-commits
wingo added a comment. Gentle ping here to @tlively :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101140/new/ https://reviews.llvm.org/D101140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

<    1   2