[PATCH] D85185: [SyntaxTree] Add test coverage for `->*` operator

2020-08-04 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:2330 +int X::*pmi; +void test(X x, X y, X* xp) { x = y; Could you add `pmi` as a funct

[PATCH] D85231: Protect against filenames with no extension at all.

2020-08-04 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment. The darwin-dsymutil.c tests this code path right now on line 33. I found this error by running it under asan; otherwise it was fully latent. It seems pretty clear to me that when End == -1 (StringRef::npos), creating a string ref from that is obviously a bug. I'm no

Re: [PATCH] D85231: Protect against filenames with no extension at all.

2020-08-04 Thread Eric Christopher via cfe-commits
Could maybe add an assert along with the patch as well as an assert only test? On Tue, Aug 4, 2020, 1:42 PM Sterling Augustine via Phabricator < revi...@reviews.llvm.org> wrote: > saugustine added a comment. > > The darwin-dsymutil.c tests this code path right now on line 33. I found > this error

[PATCH] D85247: [Darwin] [Driver] Clang should invoke dsymutil for multiarch builds

2020-08-04 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders created this revision. dsanders added reviewers: bogner, beanz, JDevlieghere. Herald added subscribers: cfe-commits, dexonsmith, aprantl. Herald added a project: clang. dsanders requested review of this revision. Herald added a subscriber: ormris. Much like with debug info with LTO, this

[PATCH] D71726: Let clang atomic builtins fetch add/sub support floating point types

2020-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 283028. yaxunl marked 2 inline comments as done. yaxunl added a comment. revised by Artem's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71726/new/ https://reviews.llvm.org/D71726 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D85239: [DOCS] Add more detail to stack protector documentation

2020-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This file is auto generated. The real documentation should go to `clang/include/clang/Driver/Options.td` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85239/new/ https://reviews.llvm.org/D85239 ___ cfe-commits mailin

[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added subscribers: Nathan-Huckleberry, nickdesaulniers. nickdesaulniers added a comment. Hi @craig.topper , @Nathan-Huckleberry and I are seeing `getImpliedEnabledFeatures` at the top of our profiles now. It seems that `llvm::X86::getImpliedFeatures` is repeatedly queried for th

[PATCH] D85252: [Driver] Accept -fno-lto in clang-cl

2020-08-04 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: hans, thakis. Herald added subscribers: cfe-commits, dang, dexonsmith, inglorion. Herald added a project: clang. aeubanks requested review of this revision. Some compiler-rt tests check for the presence of the compiler accepting -fno-lto to

[PATCH] D85253: [clangd] Show correct hover tooltip for non-preamble macro definition.

2020-08-04 Thread Ilya Golovenko via Phabricator via cfe-commits
ilya-golovenko created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. ilya-golovenko requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Incorrect definition is shown in tooltip when hove

[PATCH] D85253: [clangd] Show correct hover tooltip for non-preamble macro definition.

2020-08-04 Thread Ilya Golovenko via Phabricator via cfe-commits
ilya-golovenko added reviewers: kadircet, sammccall. ilya-golovenko added a comment. I'm not quite sure my fix is the best way to fix the issue, so any advices are appreciated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85253/new/ https://revie

[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. I just collected a perf profile for an entire build. `getImpliedDisabledFeatures` is at the top with 9.15% of time spent in self. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83273/new/ https://reviews.llvm.org/D

Re: [PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Eric Christopher via cfe-commits
Ow. Can revert and reapply after we fix the caching problem perhaps? -eric On Tue, Aug 4, 2020 at 3:48 PM Nick Desaulniers via Phabricator < revi...@reviews.llvm.org> wrote: > nickdesaulniers added a comment. > > I just collected a perf profile for an entire build. > `getImpliedDisabledFeatures`

[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a subscriber: nikic. nickdesaulniers added a comment. cc @nikic http://llvm-compile-time-tracker.com/compare.php?from=094e99d264c937cad33796b8c92fe123cb544c9e&to=16f3d698f2afbbea43e0c3df81df6f2a640ce806&stat=instructions gives me an error, am I holding it wrong? Repositor

[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. It's a pretty nasty revert in our downstream tree where we have prototyped future ISAs. So I'd like a little time to take a look. @nickdesaulniers what cpu and fetaures are on your command lines. getImpliedDisabledFeatures should only be called if some feature is e

[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D83273#2194832 , @craig.topper wrote: > It's a pretty nasty revert in our downstream tree where we have prototyped > future ISAs. So I'd like a little time to take a look. > > @nickdesaulniers what cpu and fetaures are

[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I can optimize getImpliedDisabledFeatures & getImpliedEnabledFeatures Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83273/new/ https://reviews.llvm.org/D83273 ___ cfe-commits mai

[PATCH] D85256: Add -Wtautological-value-range-compare warning.

2020-08-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rtrieu. Herald added a project: clang. Herald added a subscriber: cfe-commits. rsmith requested review of this revision. This warning diagnoses cases where an expression is compared to a constant, and the comparison is tautological due to the

[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In D83273#2194842 , @nickdesaulniers wrote: > In D83273#2194832 , @craig.topper > wrote: > >> It's a pretty nasty revert in our downstream tree where we have prototyped >> future ISAs. S

[PATCH] D85174: BPF: simplify IR generation for __builtin_btf_type_id()

2020-08-04 Thread Yonghong Song 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 rG00602ee7ef0b: BPF: simplify IR generation for __builtin_btf_type_id() (authored by yonghong-song). Repository: rG LLVM Github Monorepo CHANGES SI

[clang] 00602ee - BPF: simplify IR generation for __builtin_btf_type_id()

2020-08-04 Thread Yonghong Song via cfe-commits
Author: Yonghong Song Date: 2020-08-04T16:29:42-07:00 New Revision: 00602ee7ef0bf6c68d690a2bd729c12b95c95c99 URL: https://github.com/llvm/llvm-project/commit/00602ee7ef0bf6c68d690a2bd729c12b95c95c99 DIFF: https://github.com/llvm/llvm-project/commit/00602ee7ef0bf6c68d690a2bd729c12b95c95c99.diff

[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sent D85257 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83273/new/ https://reviews.llvm.org/D83273 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D85256: Add -Wtautological-value-range-compare warning.

2020-08-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Could this solve https://bugs.llvm.org/show_bug.cgi?id=40921? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85256/new/ https://reviews.llvm.org/D85256 ___ cfe-commits mailing li

[PATCH] D82502: [PowerPC] Implement Load VSX Vector and Sign Extend and Zero Extend

2020-08-04 Thread Albion Fung via Phabricator via cfe-commits
Conanap updated this revision to Diff 283061. Conanap marked 2 inline comments as done. Conanap added a comment. Clang formatted relevant lines, combined LE and BE tests as they produced the same ASM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8

[PATCH] D85176: [Coverage] Enable emitting gap area between macros

2020-08-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: clang/test/CoverageMapping/macro-expressions.cpp:63 // CHECK-NEXT: File 0, [[@LINE+1]]:16 -> [[@LINE+1]]:18 = #2 if (EXPR(i)) {} // CHECK-NEXT: Expansion,File 0, [[@LINE+2]]:9 -> [[@LINE+2]]:14 = (#0 + #3) The gap r

[PATCH] D82727: [PowerPC] Implement Vector Expand Mask builtins in LLVM/Clang

2020-08-04 Thread Amy Kwan via Phabricator via cfe-commits
amyk updated this revision to Diff 283065. amyk added a comment. Rebased the patch and removed MC tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82727/new/ https://reviews.llvm.org/D82727 Files: clang/include/clang/Basic/BuiltinsPPC.def

[PATCH] D82727: [PowerPC] Implement Vector Expand Mask builtins in LLVM/Clang

2020-08-04 Thread Amy Kwan via Phabricator via cfe-commits
amyk added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:881 + [(set v16i8:$vD, (int_ppc_altivec_vexpandbm + v16i8:$vB))]>; def VEXPANDHM : VXForm_RD5_XO5_RS5<1602, 1, (outs

[PATCH] D71726: Let clang atomic builtins fetch add/sub support floating point types

2020-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 283067. yaxunl added a comment. Herald added subscribers: atanasyan, sdardis. added tests for targets supporting fp atomics. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71726/new/ https://reviews.llvm.org/D71726 Files: clang/include/clang/Basic/

[PATCH] D71726: Let clang atomic builtins fetch add/sub support floating point types

2020-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D71726#2182667 , @tra wrote: > LGTM, modulo couple of nits. > > @jyknight are you OK with this? > > In D71726#2179428 , @yaxunl wrote: > >> Make IEEE single and double type as supported fo

[PATCH] D85256: Add -Wtautological-value-range-compare warning.

2020-08-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 283070. rsmith added a comment. Unbreak test that was autobroken by lint. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85256/new/ https://reviews.llvm.org/D85256 Files: clang/include/clang/Basic/DiagnosticGr

[PATCH] D85256: Add -Wtautological-value-range-compare warning.

2020-08-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 283072. rsmith added a comment. N/A Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85256/new/ https://reviews.llvm.org/D85256 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/Di

[PATCH] D85256: Add -Wtautological-value-range-compare warning.

2020-08-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D85256#2194892 , @xbolva00 wrote: > Could this solve https://bugs.llvm.org/show_bug.cgi?id=40921 ? Not directly; `GetExprRange` in `SemaChecking` apparently intentionally treats casts as producing an arbitrary value of the dest

[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp

2020-08-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D83273#2194869 , @echristo wrote: > That said, it's a 10% compile time regression for compiling something like > the linux kernel or anything that's very explicit what flags they set. Digging into the profile a little

[PATCH] D79279: Add overloaded versions of builtin mem* functions

2020-08-04 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 283078. jfb marked 6 inline comments as done. jfb added a comment. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. Address Richard's comments, add UBSan support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D79279: Add overloaded versions of builtin mem* functions

2020-08-04 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Thanks for the detailed comments, I think I've addressed all of them! I also added UBSan support to check the builtin invocation. I think this patch is pretty much ready to go. A follow-up will need to add the support functions to compiler-rt (they're currently optional, as

[PATCH] D79279: Add overloaded versions of builtin mem* functions

2020-08-04 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: compiler-rt/test/ubsan/TestCases/Misc/builtins-ctz-clz.cpp:1 +// REQUIRES: arch=x86_64 +// Phab is confused I did a git rename of `compiler-rt/test/ubsan/TestCases/Misc/builtins.cpp` and it thinks this is new, and I de

[PATCH] D85256: Add -Wtautological-value-range-compare warning.

2020-08-04 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> But I think that and this are separate changes and I'd prefer not to combine >> them. Yeah, right. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85256/new/ https://reviews.llvm.org/D85256

[PATCH] D79279: Add overloaded versions of builtin mem* functions

2020-08-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks. I'd like @rjmccall to approve too, but the design of these intrinsics and the Sema and constant evaluation parts seem fine. (We don't strictly need constant evaluation to abort on library UB, so I think not catching the misalignment case is OK.) ==

[PATCH] D66564: [clang-tidy] new altera struct pack align check

2020-08-04 Thread Frank Derry Wanye via Phabricator via cfe-commits
ffrankies updated this revision to Diff 283106. ffrankies added a comment. Clarified a comment: we don't want the warnings to trigger on templated struct //declarations//, not instantiations. We don't want it to trigger on any instantiations. Added a test case that checks if warnings are trigge

[PATCH] D67421: [analyzer] NFC: Move IssueHash to libAnalysis.

2020-08-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 283108. NoQ added a comment. Herald added a subscriber: steakhal. Get rid of the "V1" suffix. Indeed, we'll just rename the API. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67421/new/ https://reviews.llvm.org/D67421 Files: clang/include/clang/Analy

[PATCH] D82726: [PowerPC] Implement Vector Count Mask Bits builtins in LLVM/Clang

2020-08-04 Thread Amy Kwan via Phabricator via cfe-commits
amyk updated this revision to Diff 283109. amyk added a comment. Rebased patch and removed MC tests from the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82726/new/ https://reviews.llvm.org/D82726 Files: clang/include/clang/Basic/Builtin

[PATCH] D66564: [clang-tidy] new altera struct pack align check

2020-08-04 Thread Frank Derry Wanye via Phabricator via cfe-commits
ffrankies added a comment. @njames93 Thanks for the clarification! Your suggestion worked, but then I realized that I was working off of an improperly worded comment, which I've corrected. I looked through the AST Matcher reference, and didn't find anything that would trigger on a templated str

[PATCH] D82725: [PowerPC] Implement Move to VSR Mask builtins in LLVM/Clang

2020-08-04 Thread Amy Kwan via Phabricator via cfe-commits
amyk updated this revision to Diff 283113. amyk added a comment. Rebased patch, and removed MC tests from the original patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82725/new/ https://reviews.llvm.org/D82725 Files: clang/include/clang/Bas

[PATCH] D85272: [clangd] Semantic highlighting for dependent template name in template argument

2020-08-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. nridge requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D8

[PATCH] D79279: Add overloaded versions of builtin mem* functions

2020-08-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Patch looks basically okay to me, although I'll second Richard's concern that we shouldn't absent-mindedly start producing overloaded `memcpy`s for ordinary `__builtin_memcpy`. Comment at: clang/docs/LanguageExtensions.rst:2446 +order in which they o

[PATCH] D79279: Add overloaded versions of builtin mem* functions

2020-08-04 Thread JF Bastien via Phabricator via cfe-commits
jfb updated this revision to Diff 283121. jfb marked 2 inline comments as done. jfb added a comment. Update docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79279/new/ https://reviews.llvm.org/D79279 Files: clang/docs/LanguageExtensions.rst

[PATCH] D79279: Add overloaded versions of builtin mem* functions

2020-08-04 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D79279#2195299 , @rjmccall wrote: > Patch looks basically okay to me, although I'll second Richard's concern that > we shouldn't absent-mindedly start producing overloaded `memcpy`s for > ordinary `__builtin_memcpy`. Yeah I think

[PATCH] D80858: [CUDA][HIP] Support accessing static device variable in host code for -fno-gpu-rdc

2020-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D80858#2193970 , @tra wrote: > What is expected to happen to device statics in anonymous name spaces? It may > be worth adding them to the tests. > > LGTM otherwise. static device var in anonymous name space will have external

[PATCH] D84600: [Analyzer] Support note tags for smart ptr checker

2020-08-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:312 + const NoteTag *getNoteTag( + std::function Cb, + bool IsPrunable = false) { The callback is taken is an rvalue reference in othe

[PATCH] D67421: [analyzer] NFC: Move IssueHash to libAnalysis.

2020-08-04 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko accepted this revision. vsavchenko added a comment. This revision is now accepted and ready to land. Awesome, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67421/new/ https://reviews.llvm.org/D67421 ___ cfe-commits mailing

[PATCH] D83536: [clangd] Index refs to main-file symbols as well

2020-08-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 283134. nridge added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83536/new/ https://reviews.llvm.org/D83536 Files: clang-tools-extra/clangd/index/SymbolCollector.cpp clang-tools-extra/cl

[PATCH] D83536: [clangd] Index refs to main-file symbols as well

2020-08-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge planned changes to this revision. nridge added a comment. Still need to add the flag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83536/new/ https://reviews.llvm.org/D83536 ___ cfe-commits maili

[PATCH] D83242: [clang][BPF] support type exist/size and enum exist/value relocations

2020-08-04 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. In D83242#2193989 , @anakryiko wrote: >> This is different than testing whether a type exists or not where we want to >> precisely test whether that type exists or not, so we want to preserve >> `typedef` type vs. `struct t

[PATCH] D83242: [clang][BPF] support type exist/size and enum exist/value relocations

2020-08-04 Thread Andrii Nakryiko via Phabricator via cfe-commits
anakryiko added a comment. In D83242#2195456 , @yonghong-song wrote: > In D83242#2193989 , @anakryiko wrote: > >>> This is different than testing whether a type exists or not where we want >>> to precisely test wh

<    1   2