[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

[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:

[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

[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

[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

[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

[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] 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

[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

[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

[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] 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

[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 _const_var = global_const_var; const int _constexpr_var = global_constexpr_var; *out = ref_host_var; tra wrote: >

[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:

[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

[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

[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

[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

[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] 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

[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, + //

[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

[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

[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

[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] 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';

[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

[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/

[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] 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:

[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

[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

[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] 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 _const_var = global_const_var; const int _constexpr_var = global_constexpr_var; *out = ref_host_var; What

[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] 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 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] 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

[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

[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`. >

[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:

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348081. eddy-geek added a comment. *Trigger rebuild (windows failed to git clone)* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files:

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348080. eddy-geek added a comment. *Trigger rebuild (windows failed to git clone)* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files:

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

2021-05-26 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision. lichray requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This inheritance list style has been widely adopted by Symantec, a division of Broadcom Inc. It breaks after the commas that separate the

[PATCH] D103131: support debug info for alias variable

2021-05-26 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D103131#2780997 , @dblaikie wrote: > Looks like GCC emits aliases as a `DW_TAG_variable` without a location, not > as a `DW_TAG_imported_declaration` and marks it external; this works only because gdb will look up the ELF

[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 348060. erichkeane added a comment. Remove 'expression' form per suggestion. Still need to do the device-mangling-number removal/rewrite business. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112

[PATCH] D100118: [clang] Add support for new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-05-26 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 348052. mibintc retitled this revision from "[clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens" to "[clang] Add support for new builtin __arithmetic_fence to control floating

[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. 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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D99675: [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level

2021-05-26 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 348046. mibintc retitled this revision from "RFC [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level" to "[llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level".

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348047. eddy-geek added a comment. *Trigger rebuild (windows failed to git clone)* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files:

[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 created this revision. zhaomo added a reviewer: ymandel. Herald added a subscriber: mstorsjo. zhaomo requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds support for matching gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and

[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 added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2443 + // Computes a unique stable name for the type of the given expression. + constexpr const char * __builtin_unique_stable_name( expression ); + rjmccall wrote: > These need to

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Miguel Ojeda via Phabricator via cfe-commits
ojeda added inline comments. Comment at: clang/include/clang/Basic/Features.def:52 LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined)) +FEATURE(coverage_sanitizer, LangOpts.SanitizeCoverage) FEATURE(assume_nonnull, true) melver wrote: > ojeda wrote:

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

2021-05-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Should we also warn about `inline` variables in anonymous namespaces? Comment at: clang/lib/Sema/SemaDecl.cpp:7127 << FixItHint::CreateRemoval(D.getDeclSpec().getInlineSpecLoc()); +} else if (SC == SC_Static && DC->isFileContext() && +

[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 inline comments. Comment at: clang/docs/LanguageExtensions.rst:2443 + // Computes a unique stable name for the type of the given expression. + constexpr const char * __builtin_unique_stable_name( expression ); + These need to be updated for the

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348038. eddy-geek added a comment. Fix test output Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files:

[PATCH] D102820: [Clang] Check for returns_nonnull when deciding to add allocation null checks

2021-05-26 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. @rsmith @lebedev.ri thoughts on adding this directly to FE generation? As mentioned this isn't strictly needed and the BE can elide the check but we can also not emit it to save on AST/IR processing cost. CHANGES SINCE LAST ACTION

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348028. eddy-geek added a comment. Fix test build Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files:

[PATCH] D103191: [OpenCL] Add support of __opencl_c_program_scope_global_variables feature macro

2021-05-26 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov created this revision. azabaznov added reviewers: Anastasia, svenvh. Herald added subscribers: ldrumm, yaxunl. azabaznov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Marco Elver via Phabricator via cfe-commits
melver added inline comments. Comment at: clang/include/clang/Basic/Features.def:52 LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined)) +FEATURE(coverage_sanitizer, LangOpts.SanitizeCoverage) FEATURE(assume_nonnull, true) ojeda wrote: > melver wrote:

[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 348025. erichkeane marked 7 inline comments as done. erichkeane added a comment. Fix comments from aaron. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 Files: clang/docs/LanguageExtensions.rst

[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 added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2413 +(or type of the expression) that is stable across split compilations, mainly to +support SYCL/Data Parallel C++ language. + rjmccall wrote: > The semantics here seem specific

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Miguel Ojeda via Phabricator via cfe-commits
ojeda added inline comments. Comment at: clang/include/clang/Basic/Features.def:52 LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined)) +FEATURE(coverage_sanitizer, LangOpts.SanitizeCoverage) FEATURE(assume_nonnull, true) melver wrote: > aaron.ballman

[PATCH] D103157: Disable misc-no-recursion checking in Clang

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. I like this, since the entire CFE does a ton of recursion on purpose for all AST related things. Please give others time to disagree however :) Repository: rG LLVM Github Monorepo

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Marco Elver via Phabricator via cfe-commits
melver updated this revision to Diff 348021. melver marked an inline comment as done. melver added a comment. s/Since/Because/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103159/new/ https://reviews.llvm.org/D103159 Files:

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Marco Elver via Phabricator via cfe-commits
melver added inline comments. Comment at: clang/include/clang/Basic/Features.def:52 LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined)) +FEATURE(coverage_sanitizer, LangOpts.SanitizeCoverage) FEATURE(assume_nonnull, true) aaron.ballman wrote: > I

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-26 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 348020. feg208 added a comment. Still need to fix and added the tests I said I would but the comment tests are added Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868

[clang] f7c5c0d - Revert "[Scudo] Make -fsanitize=scudo use standalone. Migrate tests."

2021-05-26 Thread Mitch Phillips via cfe-commits
Author: Mitch Phillips Date: 2021-05-26T10:50:26-07:00 New Revision: f7c5c0d87b8ae5e55006fd3a31994cd68d64f102 URL: https://github.com/llvm/llvm-project/commit/f7c5c0d87b8ae5e55006fd3a31994cd68d64f102 DIFF:

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

2021-05-26 Thread Artem Belevich via Phabricator via cfe-commits
tra 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 Nit: add an empty line to

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added inline comments. Comment at: clang/docs/SanitizerCoverage.rst:319 It is possible to disable coverage instrumentation for select functions via the -function attribute ``__attribute__((no_sanitize("coverage")))``.

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2408 +``__builtin_sycl_unique_stable_name`` + + Underlines look off now, so this likely causes Sphinx warnings. Comment at:

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek added a comment. I haven't been able to build locally so far -- OOM on my machine, not sure if I can do something lighter than: cmake -G Ninja -DLLVM_ENABLE_PROJECTS=clang\;clang-tools-extra -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek created this revision. Herald added a subscriber: xazax.hun. eddy-geek requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Fixes bug 35694 Adds option AutoTypeNameLength,

[PATCH] D102779: [clang-tidy] cppcoreguidelines-explicit-constructor-and-conversion: new alias

2021-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp:28-30 + std::string FullOperatorName = + Node.getParent()->getNameAsString().append("::").append( + Node.getNameAsString()); Rather

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

2021-05-26 Thread Mitch Phillips via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG694d8cbe: [Scudo] Make -fsanitize=scudo use standalone. Migrate tests. (authored by hctim). Changed prior to commit: https://reviews.llvm.org/D102543?vs=347814=348011#toc Repository: rG LLVM

[clang] 6911114 - [Scudo] Make -fsanitize=scudo use standalone. Migrate tests.

2021-05-26 Thread Mitch Phillips via cfe-commits
Author: Mitch Phillips Date: 2021-05-26T10:03:17-07:00 New Revision: 694d8cbed06a8a809c34ae07f4e3e89ab252 URL: https://github.com/llvm/llvm-project/commit/694d8cbed06a8a809c34ae07f4e3e89ab252 DIFF:

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

2021-05-26 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 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`. > >

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

2021-05-26 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. 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://github.com/riscv/riscv-isa-manual/pull/648 CHANGES SINCE LAST ACTION

[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 inline comments. Comment at: clang/include/clang/Driver/Options.td:3149-3152 +def mno_div : Flag<["-"], "mno-div">, Group, + HelpText<"Disable hardware integral division instructions in M extension">; +def mdiv : Flag<["-"], "mdiv">, Group, + HelpText<"Enable

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

2021-05-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: danielkiss, kristof.beyls. jcai19 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixed PR#48894 for AArch64. The issue has been fixed for Arm in https://reviews.llvm.org/D95872

[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. FYI, I'm seeing what I think is a miscompile that bisects to this patch. Greatly simplified, the problematic snippet is this: struct Stats { int a; int b; int a_or_b; }; bool x = ... bool y = ... Stats stats; stats.a = x ? 1 : 0; stats.b =

[libunwind] adf1561 - [libunwind] Inform ASan that resumption is noreturn

2021-05-26 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2021-05-26T09:31:39-07:00 New Revision: adf1561d6ce8af057127c65af863b3f0e1c77e60 URL: https://github.com/llvm/llvm-project/commit/adf1561d6ce8af057127c65af863b3f0e1c77e60 DIFF: https://github.com/llvm/llvm-project/commit/adf1561d6ce8af057127c65af863b3f0e1c77e60.diff

[PATCH] D103112: Reimplement __builtin_unique_stable_name-

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 347993. erichkeane marked 6 inline comments as done. erichkeane added a comment. Do all the things requested by @aaron.ballman and @rjmccall except for limiting the syntax to 'types only'. Currently evaluating whether this is something we can accept.

[PATCH] D103179: [clangd] Handle queries without an originating file in ProjectAwareIndex

2021-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Note that I don't feel strongly about making use of `Context` to figure out config::Params vs moving the `Params` into the `Config`. But I'd rather not only store `Path` in the `Config` since we might end up needing other environment variables in future. I didn't go

[PATCH] D103179: [clangd] Handle queries without an originating file in ProjectAwareIndex

2021-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, kbobyrev. Herald added subscribers: usaxena95, jfb, arphaman. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This enables

[PATCH] D102443: [PowerPC] Added multiple PowerPC builtins

2021-05-26 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. LGTM. Thanks for implementing this. The redundant pseudo can be removed when committing. Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:2572 +

[PATCH] D103175: [C++4OpenCL] Fix ICE with invalid use of half

2021-05-26 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm created this revision. olestrohm added reviewers: Anastasia, svenvh. olestrohm added a project: clang. Herald added subscribers: ldrumm, yaxunl. olestrohm requested review of this revision. Herald added a subscriber: cfe-commits. Because half is limited to the `cl_khr_fp16` extension

[PATCH] D97869: [OpenCL][Draft] Add OpenCL builtin test generator

2021-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I think this is a very good starting point for the testing of built-in functions. Btw should we now remove '[Draft]' from the title? Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:242 + // functions. + void Emit(); +

[PATCH] D102779: [clang-tidy] cppcoreguidelines-explicit-constructor-and-conversion: new alias

2021-05-26 Thread Marco Gartmann via Phabricator via cfe-commits
mgartmann added a comment. @aaron.ballman Thanks a lot for your valuable feedback! I incorporated it accordingly. Is there anything else that should be improved? Comment at: clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp:102 if (const auto *Conversion =

[PATCH] D90835: [clang-tidy] Ignore diagnostics due to macro expansion from not-interested headers

2021-05-26 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @alexfh, @njames93 and @thakis please take a look! I added all tests cases and put new logic behind a flag to make it as safe as possible. Issue with diagnostics from macro expansion from third-party headers is the one of the biggest problem with deployment that

[PATCH] D102779: [clang-tidy] cppcoreguidelines-explicit-constructor-and-conversion: new alias

2021-05-26 Thread Marco Gartmann via Phabricator via cfe-commits
mgartmann updated this revision to Diff 347970. mgartmann marked 5 inline comments as done. mgartmann added a comment. - added option to ignore conversion operators - added tests for new and existing options - renamed options to `Ignore...` - ensured that option's strings only get parsed once

[PATCH] D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

2021-05-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:257 + // BoundCounter is 0 for outer `)`. + // BoundCounter is 1 for outer '(' or inner `)`. + // BoundCounter is 2 for inner `(`. vsavchenko wrote: >

[PATCH] D90835: [clang-tidy] Ignore diagnostics due to macro expansion from not-interested headers

2021-05-26 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 347968. DmitryPolukhin added a comment. Herald added a subscriber: dexonsmith. Added test for system like object macro Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90835/new/

[clang-tools-extra] 8f79203 - [clangd] New ParsingCallback for semantics changes

2021-05-26 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2021-05-26T16:57:30+02:00 New Revision: 8f79203a22d8e04086f4cc9a58bb365148852a09 URL: https://github.com/llvm/llvm-project/commit/8f79203a22d8e04086f4cc9a58bb365148852a09 DIFF:

[PATCH] D102761: [clangd] New ParsingCallback for semantics changes

2021-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f79203a22d8: [clangd] New ParsingCallback for semantics changes (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102761/new/

[PATCH] D103125: [Clang][WIP] Allow renaming of "clang"

2021-05-26 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. I'm also not a fan of this change. From a project perspective the binary is clang and while people may wish to change the name for their own product teams it seems like that onus should be on them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[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 347958. yaxunl added a comment. do not promote or check dependent variables since their ctor/dtor/initializers are not determined yet CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103108/new/ https://reviews.llvm.org/D103108 Files:

[PATCH] D102517: [clang] Add support for the "abstract" contextual keyword of MSVC

2021-05-26 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. Looks good to me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102517/new/ https://reviews.llvm.org/D102517

[PATCH] D102517: [clang] Add support for the "abstract" contextual keyword of MSVC

2021-05-26 Thread Abbas Sabra via Phabricator via cfe-commits
AbbasSabra updated this revision to Diff 347955. AbbasSabra added a comment. Updating D102517 : [clang] Apply code review: while loop instead of for loop Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102517/new/

[PATCH] D103155: [clang-cl] Add driver support for /std:c++20 and bump /std:c++latest (PR50465)

2021-05-26 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa8f75d497daa: [clang-cl] Add driver support for /std:c++20 and bump /std:c++latest (PR50465) (authored by hans). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

  1   2   >