[PATCH] D80858: [CUDA][HIP] Support accessing static device variable in host code

2020-07-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 275685. yaxunl marked 5 inline comments as done. yaxunl retitled this revision from "[HIP] Support accessing static device variable in host code" to "[CUDA][HIP] Support accessing static device variable in host code". yaxunl edited the summary of this revision

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275693. gamesh411 marked 2 inline comments as done. gamesh411 added a comment. rename misleading variables apply local consts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83190/new/ https://reviews.llvm.org/

[PATCH] D83183: [clang] Rework how and when APValues are dumped

2020-07-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Do none of the JSON tests break from this change? Comment at: clang/include/clang/AST/TextNodeDumper.h:163 + raw_ostream &getOS() { return OS; } + This is a pretty strange public method; any way to limit its visibility? =

[PATCH] D82825: [clang-tidy] Added alias llvm-else-after-return.

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfc3c693b617f: [clang-tidy] Added alias llvm-else-after-return. (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82825/new/ https://revi

[PATCH] D83224: [clangd] Move clang-tidy check modifications into ClangdServer

2020-07-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, aaron.ballman, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This enables sharing the logic between standalone clangd and embedders of it. The new ap

[PATCH] D82365: [Power10] Implement Vector Insert Builtins in LLVM/Clang

2020-07-06 Thread Lei Huang via Phabricator via cfe-commits
lei added inline comments. Comment at: clang/test/CodeGen/builtins-ppc-p10vector.c:12 +// RUN: -target-cpu pwr10 -triple powerpc64le-unknown-unknown -emit-llvm %s \ +// RUN: -o - | FileCheck %s -check-prefix=CHECK-LE + biplmish wrote: > lei wrote: > > I just

[PATCH] D82547: [Debugify] Expose debugify (original mode) as CC1 option

2020-07-06 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro marked 2 inline comments as done. djtodoro added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:855 +class ClangCustomPassManager : public legacy::PassManager { +public: vsk wrote: > Please factor out OptCustomPassManager from opt and g

[PATCH] D83223: [clang-tidy] Header guard check can skip past license comment

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, bkramer, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Add an option for header guard derived checks to control whether to skip past a license comment when adding a guar

[PATCH] D81750: [analyzer] Don't allow hidden checkers to emit diagnostics

2020-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcfd6b4b811aa: [analyzer] Don't allow hidden checkers to emit diagnostics (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D81750?vs=270447&id=275697#toc Repository: rG LLVM

[PATCH] D82425: [SemaCXX] Fix false positive of -Wuninitialized-const-reference in empty function body.

2020-07-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM despite my enduring sadness that Boost elected to use this totally bizarre approach to silencing unused variable diagnostics when far better-supported options have existed f

[PATCH] D83223: [clang-tidy] Header guard check can skip past license comment

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp:313 continue; - + StringRef Opening = AddNewLine == NewLineInsertions::None ? "#ifndef " + : AddNewLine

[PATCH] D83226: [analyzer] Add system header simulator a symmetric random access iterator operator+

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, ASDenysPetrov, martong, steakhal, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a reviewer: Szelethus. Herald added a project: clang. Ran

[PATCH] D83189: [clangd] More complete fix for hover crashes on invalid record.

2020-07-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:677 HI.Size = Size->getQuantity(); - if (!FD->isInvalidDecl()) HI.Offset = Ctx.getFieldOffset(FD) / 8; + } hokein wrote: > kadircet wrote: > > could you mov

[PATCH] D83224: [clangd] Move clang-tidy check modifications into ClangdServer

2020-07-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 275709. kadircet added a comment. - Add tests and also disable bugprone-use-after-move Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83224/new/ https://reviews.llvm.org/D83224 Files: clang-tools-extra/clang

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In order to test the non-pointer iterators, an extension has to be made to the system header simulator. Please check the related patch (parent of this one in the stack) https://reviews.llvm.org/D83226. Comment at: clang/lib/StaticAnalyzer/Checkers/I

[PATCH] D83183: [clang] Rework how and when APValues are dumped

2020-07-06 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 275713. riccibruno added a comment. Format the tests and make them more relevant. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83183/new/ https://reviews.llvm.org/D83183 Files: clang/include/clang/AST/AP

[PATCH] D83114: [clang] Fix the incorrect dependence bits for DependentExtIntType.

2020-07-06 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcd9a241f1650: [clang] Fix the incorrect dependence bits for DependentExtIntType. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83114/ne

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-07-06 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L marked 27 inline comments as done. Xiangling_L added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2424 + (T->isSpecificBuiltinType(BuiltinType::LongDouble) && + Target->supportsAIXPowerAlignment())) // Don't increase the alignment if an al

[PATCH] D82739: Improve heuristic resolution of dependent types in TargetFinder

2020-07-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. looks like we use this heuristic for go-to-def, I think we might want to use it in more places, e.g. libindex (for xrefs), sema code completion (so that `this->a.^` can suggest something). Comment at: clang-tools-extra/clangd/FindTarget.cpp:198 +/

[PATCH] D62574: Initial draft of target-configurable address spaces.

2020-07-06 Thread Danila Malyutin via Phabricator via cfe-commits
danilaml added a comment. What are the remaining roadblocks left before this patch can be merged? I'm interested in having a target-specific way to define the allowed explicit/implicit address space conversions. Also, it appears that currently whether implicit casts between pointers of differen

[PATCH] D83189: [clangd] More complete fix for hover crashes on invalid record.

2020-07-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:677 HI.Size = Size->getQuantity(); - if (!FD->isInvalidDecl()) HI.Offset = Ctx.getFieldOffset(FD) / 8; + } kadircet w

[PATCH] D83189: [clangd] More complete fix for hover crashes on invalid record.

2020-07-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 275718. hokein added a comment. address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83189/new/ https://reviews.llvm.org/D83189 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-extra/clangd/u

[PATCH] D82585: [analyzer][NFC] Move the data structures from CheckerRegistry to the Core library

2020-07-06 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. This broke the Green Dragon build for Clang: http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/ FAILED: bin/diagtool : && /Users/buildslave/jenkins/workspace/lldb-cmake/host-compiler/bin/clang++ -Wdocumentation -fPIC -fvisibility-inlines-hidden -Werror=dat

[PATCH] D83183: [clang] Rework how and when APValues are dumped

2020-07-06 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 2 inline comments as done. riccibruno added a comment. Thanks for your comments! In D83183#2132975 , @aaron.ballman wrote: > Do none of the JSON tests break from this change? No, but only because I am not modifying the JSON output at

[PATCH] D83189: [clangd] More complete fix for hover crashes on invalid record.

2020-07-06 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG254b016c6561: [clangd] More complete fix for hover crashes on invalid record. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83189/new/

[PATCH] D83233: [clangd] Enable reading config from files by default.

2020-07-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: kadircet, hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D83233 Files: clang-tools-ex

[PATCH] D82585: [analyzer][NFC] Move the data structures from CheckerRegistry to the Core library

2020-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I'm on it! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82585/new/ https://reviews.llvm.org/D82585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D76291: [Support] Fix formatted_raw_ostream for UTF-8

2020-07-06 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe80b81d1cbf8: [Support] Fix formatted_raw_ostream for UTF-8 (authored by ostannard). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76291/new/ https://review

[PATCH] D83178: [clangd] Send EOF before resetting diagnostics consumer

2020-07-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. As discussed offline D78038 is not going to fix header-guard-check issue, as it relies on not only the PP state, but receiving appropriate callbacks for all of the ifndef/define/endif macros, which is something we don't do in current s

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-07-06 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L updated this revision to Diff 275728. Xiangling_L marked 3 inline comments as done. Xiangling_L added a comment. Fixed -Wpacked warning issue; Fixed EmptySubobjects related offset issue; Fixed zero-extent array in a base class related issue; Addressed other comments; CHANGES SINCE LA

[PATCH] D82585: [analyzer][NFC] Move the data structures from CheckerRegistry to the Core library

2020-07-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D82585#2133260 , @teemperor wrote: > Fixed here to get the bot running again: > https://github.com/llvm/llvm-project/commit/7308e1432624f02d4e652ffa70e40d0eaa89fdb3 Thank you so much! Kind of ironic considering that this en

[PATCH] D82585: [analyzer][NFC] Move the data structures from CheckerRegistry to the Core library

2020-07-06 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. Fixed here to get the bot running again: https://github.com/llvm/llvm-project/commit/7308e1432624f02d4e652ffa70e40d0eaa89fdb3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82585/new/ https://reviews.llvm.org/D82585 __

[PATCH] D80242: [Clang] implement -fno-eliminate-unused-debug-types

2020-07-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Bumping for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80242/new/ https://reviews.llvm.org/D80242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D83224: [clangd] Move clang-tidy check modifications into ClangdServer

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Do you think there should be a hidden command line option to disable disabling blacklisted checks, purely to prevent hindering attempts to fix these problematic checks. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:115 +// either due to crash

[PATCH] D82118: [clang][module] Improve incomplete-umbrella warning

2020-07-06 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82118/new/ https://reviews.llvm.org/D82118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D83242: [RFC][BPF] support expr with typedef type for FIELD_EXISTENCE reloc

2020-07-06 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song created this revision. yonghong-song added reviewers: anakryiko, ast. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. [The patch needs more work e.g. to create proper test, to be agreed on interface, etc.] This patch added support

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-07-06 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2409 +const RecordDecl *RD = RT->getDecl(); +return std::max(ABIAlign, static_cast(toBits( + getASTRecordLayout(RD).PreferredAlignment))); -

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-07-06 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1885 + Context.getBaseElementType(CTy->getElementType()) + ->getAs()) +if (BTy->getKind() == BuiltinType::Double || Xiangling_L w

[PATCH] D82954: Fix crash on overloaded postfix unary operators due to invalid SourceLocation

2020-07-06 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:118 +syntax::NodeKind getOperatorNodeKind(const CXXOperatorCallExpr &E) { + switch (E.getOperator()) { eduucaldas wrote: > # Where to put this logic? > The pro of having this

[PATCH] D82611: [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

2020-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D82611#2125868 , @MadCoder wrote: > So the risk with that one is that if someone had say the `-didSomething` > direct selector and that some UIKit/Apple SDK API now adds this as a thing > that you use with CFNotificati

[PATCH] D82611: [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

2020-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 275759. erik.pilkington marked 3 inline comments as done. erik.pilkington added a comment. Add an off-by-default variant of this warning. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82611/new/ https://reviews.llvm.org/D82611 Files: clan

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-06 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen marked 8 inline comments as done. cchen added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1933 } +if (getLangOpts().OpenMP >= 50 && Tok.is(tok::colon)) { + // Consume ':' ABataev wrote: > Seems to me, it is too broad

[PATCH] D83071: Add support for options with two flags for controlling the same field.

2020-07-06 Thread Daniel Grumberg via Phabricator via cfe-commits
dang marked an inline comment as done. dang added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3931-3932 if (((FLAGS)&options::CC1Option) && \ (ALWAYS_EMIT || EXTRACTOR(this->KEYPATH) != DEFAULT_VALUE))

[PATCH] D82904: [clang-tidy] Warn pointer captured in async block

2020-07-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp:82 "bugprone-bool-pointer-implicit-conversion"); -CheckFactories.registerCheck( -"bugprone-branch-clone"); +CheckFactories.registerCheck("bugpron

[PATCH] D83144: Allow to specify macro names for android-comparison-in-temp-failure-retry.

2020-07-06 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a reviewer: alexfh. george.burgess.iv added a comment. Concept and implementation LGTM. Please wait for comment from +alexfh before landing, since I think they have more ownership over clang-tidy in general than I do :) Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D83084: DomTree: Remove the releaseMemory() method

2020-07-06 Thread Nicolai Hähnle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG723a44c9b5d6: DomTree: Remove the releaseMemory() method (authored by nhaehnle). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83084/new/ https://reviews.ll

[clang] 723a44c - DomTree: Remove the releaseMemory() method

2020-07-06 Thread Nicolai Hähnle via cfe-commits
Author: Nicolai Hähnle Date: 2020-07-06T21:58:11+02:00 New Revision: 723a44c9b5d654ec791720fc450757ae00f9e631 URL: https://github.com/llvm/llvm-project/commit/723a44c9b5d654ec791720fc450757ae00f9e631 DIFF: https://github.com/llvm/llvm-project/commit/723a44c9b5d654ec791720fc450757ae00f9e631.diff

[PATCH] D83015: [Driver] Add -fld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/path

2020-07-06 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. BTW, I just noticed recently that we have a -mlinker-version= flag, too, which is only used on darwin at the moment. That's another instance of "we need to condition behavior based on what linker we're invoking", but in this case, between multiple versions of apple's l

[PATCH] D83088: Introduce CfgTraits abstraction

2020-07-06 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle updated this revision to Diff 275811. nhaehnle marked 4 inline comments as done. nhaehnle added a comment. - fix MachineCfgTraits::blockdef_iterator and allow it to iterate over the instructions in a bundle - use MachineBasicBlock::printName Repository: rG LLVM Github Monorepo CHANG

[PATCH] D83088: Introduce CfgTraits abstraction

2020-07-06 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle added inline comments. Comment at: llvm/include/llvm/CodeGen/MachineCfgTraits.h:133 + ++m_def; + if (m_def == m_instr->defs().end()) { +++m_instr; arsenm wrote: > != return early? The logic is actually subtly broken in the presence of i

[PATCH] D82728: [clang] Add -Wsuggest-override

2020-07-06 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D82728#2133951 , @Quuxplusone wrote: > In D82728#2133720 , @dblaikie wrote: > > > (the presence of at least one "override" being a signal the user intended > > to use override and misse

[PATCH] D83254: [X86] Enabled a bunch of 64-bit Interlocked* functions intrinsics on 32-bit Windows to match recent MSVC

2020-07-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: RKSimon, spatel, rnk, erichkeane. Herald added a subscriber: jfb. This enables _InterlockedAnd64/_InterlockedOr64/_InterlockedXor64/_InterlockedDecrement64/_InterlockedIncrement64/_InterlockedExchange64/_InterlockedExchangeAdd64/_I

[PATCH] D81751: [SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary conditional operator

2020-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a reviewer: ahatanak. erik.pilkington added a comment. Ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81751/new/ https://reviews.llvm.org/D81751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D83250: [clang] Enable errors for undefined TARGET_OS_ macros in Darwin driver

2020-07-06 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 275821. zixuw added a comment. Add a test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83250/new/ https://reviews.llvm.org/D83250 Files: clang/lib/Driver/ToolChains/Darwin.cpp clang/test/Driver/darwin

[PATCH] D78655: [CUDA][HIP] Let lambda be host device by default

2020-07-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1783 + + if (LangOpts.CUDA && LangOpts.CUDAIsDevice) +CUDACheckLambdaCapture(CallOperator, From); yaxunl wrote: > tra wrote: > > I would expect Sema-level diags to be produced durin

[PATCH] D80242: [Clang] implement -fno-eliminate-unused-debug-types

2020-07-06 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:103-118 + case Decl::CXXRecord: // struct/union/class X; [C++] +if (CGDebugInfo *DI = getDebugInfo()) + if (CGM.getCodeGenOpts().hasMaybeUnusedDebugInfo() && + cast(D).hasDefinition()) +

[PATCH] D83242: [RFC][BPF] support expr with typedef type for FIELD_EXISTENCE reloc

2020-07-06 Thread Andrii Nakryiko via Phabricator via cfe-commits
anakryiko added a comment. Awesome, that's exactly what we need for BPF helper availability checks! Can you please also add test that this pattern works: return __builtin_preserve_field_info((btf_bpf_read_branch_records)0, FIELD_EXISTENCE); Also for non-func pointer typedefs, something like

[PATCH] D83188: [clang-tidy] bugprone-bool-pointer-implicit-conversion doesn't handle members

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Thanks for working on this. There seems to be many places in this check where names are confusing, `Var` referring to a `MemberExpr`, `DeclRef` refering to a `MemberExpr`. I'd prefer if the names that you have added were renamed to something more in line with what the

[PATCH] D82930: [HIP] Fix rocm detection

2020-07-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:167 +llvm::ErrorOr> VersionFile = +FS.getBufferForFile(BinPath + "/.hipVersion"); +if (!VersionFile) yaxunl wrote: > arsenm wrote: > > arsenm wrote: > > > yaxunl wrot

[PATCH] D83088: Introduce CfgTraits abstraction

2020-07-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/include/llvm/CodeGen/MachineCfgTraits.h:136-138 + // Prefer to avoid support for bundled instructions as long as we + // don't really need it. + assert(!m_instr->isBundle()); nhaehnle wrote

[PATCH] D83015: [Driver] Add -fld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/path

2020-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChain.cpp:556-557 + // -fld-path= takes precedence over -fuse-ld= and specifies the executable + // name. PATH is consulted if the value does not contain /. -B is + // int

[PATCH] D82930: [HIP] Fix rocm detection

2020-07-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:167 +llvm::ErrorOr> VersionFile = +FS.getBufferForFile(BinPath + "/.hipVersion"); +if (!VersionFile) arsenm wrote: > yaxunl wrote: > > arsenm wrote: > > > arsenm wrote:

[PATCH] D82930: [HIP] Fix rocm detection

2020-07-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 4 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:167 +llvm::ErrorOr> VersionFile = +FS.getBufferForFile(BinPath + "/.hipVersion"); +if (!VersionFile) tra wrote: > arsenm wrot

[PATCH] D83015: [Driver] Add -fld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/path

2020-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChain.cpp:556-557 + // -fld-path= takes precedence over -fuse-ld= and specifies the executable + // name. PATH is consulted if the value does not contain /. -B is + // int

[PATCH] D82904: [clang-tidy] Warn pointer captured in async block

2020-07-06 Thread Ellis Hoag via Phabricator via cfe-commits
ellis updated this revision to Diff 275826. ellis marked 9 inline comments as done. ellis added a comment. Use `LangOpts.Blocks` instead of `LangOpts.ObjC` and add FIXME about grabbing the use location of a `CapturedVar`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[clang] f63e3ea - [clang] Rework how and when APValues are dumped

2020-07-06 Thread Bruno Ricci via cfe-commits
Author: Bruno Ricci Date: 2020-07-06T22:03:08+01:00 New Revision: f63e3ea558bbe14826b5b775367eac617b35e041 URL: https://github.com/llvm/llvm-project/commit/f63e3ea558bbe14826b5b775367eac617b35e041 DIFF: https://github.com/llvm/llvm-project/commit/f63e3ea558bbe14826b5b775367eac617b35e041.diff L

[PATCH] D83183: [clang] Rework how and when APValues are dumped

2020-07-06 Thread Bruno Ricci via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf63e3ea558bb: [clang] Rework how and when APValues are dumped (authored by riccibruno). Changed prior to commit: https://reviews.llvm.org/D83183?vs=275783&id=275828#toc Repository: rG LLVM Github Mon

[PATCH] D82904: [clang-tidy] Warn pointer captured in async block

2020-07-06 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.cpp:34 + const BlockDecl *EscapingBlockDecl = MatchedEscapingBlock->getBlockDecl(); + for (const BlockDecl::Capture &CapturedVar : EscapingBlockDecl->captures()) { +const VarDecl *V

[PATCH] D80858: [CUDA][HIP] Support accessing static device variable in host code

2020-07-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6069 +llvm::raw_ostream &OS) const { + OS << ".static." << getLangOpts().CUID; +} I suspect that will have interesting issues if CUID is an arbitrary user-supplied string. We may wan

[PATCH] D83015: [Driver] Add --ld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/path

2020-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 275830. MaskRay retitled this revision from "[Driver] Add -fld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/path" to "[Driver] Add --ld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/path". MaskRay edited the summary of this revision. Mask

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-07-06 Thread Atmn Patel via Phabricator via cfe-commits
atmnpatel added a comment. Herald added a subscriber: aaron.ballman. Ping @ABataev. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75591/new/ https://reviews.llvm.org/D75591 ___ cfe-commits mailing list

[PATCH] D83004: [UpdateCCTestChecks] Include generated functions if asked

2020-07-06 Thread David Greene via Phabricator via cfe-commits
greened updated this revision to Diff 275831. greened added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixed various bugs, added tests. This now has two modes because generated function output can't be ordered with respect to source file functions. When cl

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-06 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen updated this revision to Diff 275834. cchen added a comment. Move analysis of stride from Sema to Parse Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82800/new/ https://reviews.llvm.org/D82800 Files: clang/include/clang-c/Index.h clang/i

[PATCH] D83004: [UpdateCCTestChecks] Include generated functions if asked

2020-07-06 Thread David Greene via Phabricator via cfe-commits
greened marked an inline comment as done. greened added inline comments. Comment at: llvm/utils/update_cc_test_checks.py:133 + parser.add_argument('--include-generated-funcs', action='store_true', + help='Output checks for functions not in source') parser

[PATCH] D82930: [HIP] Fix rocm detection

2020-07-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 4 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:167 +llvm::ErrorOr> VersionFile = +FS.getBufferForFile(BinPath + "/.hipVersion"); +if (!VersionFile) yaxunl wrote: > tra wrot

[PATCH] D80858: [CUDA][HIP] Support accessing static device variable in host code

2020-07-06 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:10068 +isa(D) && cast(D)->isFileVarDecl() && +cast(D)->getStorageClass() == SC_Static) { + return GVA_StrongExternal; yaxunl wrote: > rjmccall wrote: > > Are you

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 275835. gamesh411 added a comment. implement traditional iterator support as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83190/new/ https://reviews.llvm.org/D83190 Files: clang/lib/StaticAnalyzer/Ch

[PATCH] D83004: [UpdateCCTestChecks] Include generated functions if asked

2020-07-06 Thread David Greene via Phabricator via cfe-commits
greened added a comment. In D83004#2129362 , @jdoerfert wrote: > This is great! Just a few days ago I added a TODO in one of the tests I > created asking for this: D82722 :) Glad to help! > Will this work for all test

[PATCH] D83190: [analyzer] Model iterator random incrementation symmetrically

2020-07-06 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 5 inline comments as done. gamesh411 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:282 +SVal &OffsetVal = IsItOnLHS ? RVal : LVal; +handlePtrIncrOrDecr(C, ItExpr, BinaryOperator::getOverloadedOperator(OK), +

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1944-1951 + if (StrideExpr && !StrideExpr->isValueDependent() && + (!StrideExpr->isEvaluatable(Actions.getASTContext()) || + (StrideExpr->EvaluateAsInt(Result,

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-07-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D75591#2134301 , @atmnpatel wrote: > Ping @ABataev. Rebase, please Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75591/new/ https://reviews.llvm.org/D75591 _

[PATCH] D83250: [clang] Enable errors for undefined TARGET_OS_ macros in Darwin driver

2020-07-06 Thread Zixu Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf47b8851318d: [clang] Enable errors for undefined TARGET_OS_ macros in Darwin driver (authored by zixuw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83250

[clang] f47b885 - [clang] Enable errors for undefined TARGET_OS_ macros in Darwin driver

2020-07-06 Thread Zixu Wang via cfe-commits
Author: Zixu Wang Date: 2020-07-06T14:52:12-07:00 New Revision: f47b8851318d5ec2fa1e7867f3fdb86101cdc1da URL: https://github.com/llvm/llvm-project/commit/f47b8851318d5ec2fa1e7867f3fdb86101cdc1da DIFF: https://github.com/llvm/llvm-project/commit/f47b8851318d5ec2fa1e7867f3fdb86101cdc1da.diff LOG

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-07-06 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L updated this revision to Diff 275840. Xiangling_L marked 6 inline comments as done. Xiangling_L added a comment. Fixed the `typedef` related issues; Added more testcases; CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79719/new/ https://reviews.llvm.org/D79719 Files: clang

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-07-06 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2409 +const RecordDecl *RD = RT->getDecl(); +return std::max(ABIAlign, static_cast(toBits( + getASTRecordLayout(RD).PreferredAlignment))); hubert.

[PATCH] D82767: clang-format: Explicitly use python3

2020-07-06 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a subscriber: arsen. compnerd added a comment. Thinking a bit more about this, using `/usr/bin/env python` ensures that we actually honour the python version that the user specifies because that allows the user control over the python symlink pointing to either python2 or python3.

[PATCH] D83055: [clang][Driver] Fix tool path priority test failure

2020-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The description appears to be wrapped at a very small column number. Can you please fix it? Comment at: clang/test/Driver/program-path-priority.c:34 +/// isolated as we expected. +// NO_NOTREAL_GCC-NOT: {{\/gcc[^\/]*"}} `\` can be re

[clang] c359c5d - [X86] Centalize the 'sse4' hack to a single place in X86TargetInfo::setFeatureEnabledImpl. NFCI

2020-07-06 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2020-07-06T15:00:32-07:00 New Revision: c359c5d534429c96f1cebdf8d845b8120e9c2ef0 URL: https://github.com/llvm/llvm-project/commit/c359c5d534429c96f1cebdf8d845b8120e9c2ef0 DIFF: https://github.com/llvm/llvm-project/commit/c359c5d534429c96f1cebdf8d845b8120e9c2ef0.diff

[PATCH] D83263: [WIP] Clang crashed while checking for deletion of copy and move ctors

2020-07-06 Thread Vy Nguyen via Phabricator via cfe-commits
oontvoo created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repro: - Annotate the unique_ptr class with trivial_abi (eg., https://godbolt.org/z/-rprsc) - ./build/bin/clang++ -stdlib=libc++ -I../libcxx/memory Crash: @ 0x559d129463fc clang::CXXRe

[PATCH] D82800: [OPENMP50] extend array section for stride (Parsing/Sema/AST)

2020-07-06 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen updated this revision to Diff 275856. cchen added a comment. Fix based on comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82800/new/ https://reviews.llvm.org/D82800 Files: clang/include/clang-c/Index.h clang/include/clang/AST/ExprO

[PATCH] D82629: [libclang] Fix crash when visiting a captured VLA.

2020-07-06 Thread Jan Korous via Phabricator via cfe-commits
jkorous accepted this revision. jkorous added a comment. This revision is now accepted and ready to land. LGTM! Thanks for fixing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82629/new/ https://reviews.llvm.org/D82629

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-06 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP added a comment. Yes, it's valid C++ (is my hope). It's from WIP code, which I made available to show you: https://github.com/johelegp/jge. Here it is building, running and passing the tests: https://travis-ci.com/github/johelegp/jge/jobs/358137355#L559. Here are links to the above li

[PATCH] D82740: [libclang]: check validity before visiting Stmt node

2020-07-06 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. @milianw I just approved https://reviews.llvm.org/D82629 - I feel like that patch is addressing the core issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82740/new/ https://reviews.llvm.org/D82740 __

[PATCH] D82629: [libclang] Fix crash when visiting a captured VLA.

2020-07-06 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. @ckandeler do you have commit access or do you want me to land the patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82629/new/ https://reviews.llvm.org/D82629 ___ cfe-commi

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-07-06 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:666 + /// HasNonEmptyBaseClass - Whether the class has any non-empty class (in the + /// sense of (C++11 [meta.unary.prop])) as base. + bool HasNonEmptyBaseClass; M

[clang] 3c7e8d6 - Fix sdk version test to use 99.99.99 as a max dummy version instead of 10.99.99.

2020-07-06 Thread Amara Emerson via cfe-commits
Author: Amara Emerson Date: 2020-07-06T16:53:12-07:00 New Revision: 3c7e8d6d0eb0660fb8fbae98c3e49ca059943416 URL: https://github.com/llvm/llvm-project/commit/3c7e8d6d0eb0660fb8fbae98c3e49ca059943416 DIFF: https://github.com/llvm/llvm-project/commit/3c7e8d6d0eb0660fb8fbae98c3e49ca059943416.diff

[PATCH] D83008: Fix ItaniumRecordLayoutBuilder so that is grabs the correct bases class offsets from the external source

2020-07-06 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 275865. shafik added a comment. Adding a second test that is not arm64 specific. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83008/new/ https://reviews.llvm.org/D83008 Files: clang/lib/AST/RecordLayoutBuilder.cpp lldb/test/Shell/Expr/Inputs/la

[PATCH] D83008: Fix ItaniumRecordLayoutBuilder so that is grabs the correct bases class offsets from the external source

2020-07-06 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D83008#2131776 , @teemperor wrote: > Thanks for tracking this down, this is a really nasty bug... > > The fix itself is obviously fine, but I think I'm out of the loop regarding > the testing strategy. We talked about adding a C

[PATCH] D83263: [WIP] Clang crashed while checking for deletion of copy and move ctors

2020-07-06 Thread Vy Nguyen via Phabricator via cfe-commits
oontvoo updated this revision to Diff 275866. oontvoo added a comment. add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83263/new/ https://reviews.llvm.org/D83263 Files: clang/lib/Sema/SemaDeclCXX.cpp clang/test/SemaCXX/trivial-abi-templ

[PATCH] D82611: [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

2020-07-06 Thread Pierre Habouzit via Phabricator via cfe-commits
MadCoder added a comment. In D82611#2133521 , @erik.pilkington wrote: > In D82611#2125868 , @MadCoder wrote: > > > > >> I would suggest something like `-Wstrict-direct-dispatch` or something. > > I kinda prefe

<    1   2   3   >