[PATCH] D78890: [clang-tidy] Add check callee-namespace.

2020-04-27 Thread Paula Toth via Phabricator via cfe-commits
PaulkaToast added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp:22-23 +const DeclContext *getOutermostNamespace(const DeclContext *Decl) { + if (Decl->isTranslationUnit()) +return Decl; + if (Decl->getParent() && Decl->getParent

[PATCH] D78762: build: use `find_package(Python3)` if available

2020-04-27 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I was trying to do the minimal change to cover llvm. I definitely care about LLD and will do that in a subsequent change. As to the benefit of this, it is primarily that the detection here explicitly ensures that python3 is used rather than python2. The fallback of a

[PATCH] D78980: Elaborate more on --rocm-path flag.

2020-04-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/include/clang/Driver/Options.td:612 def rocm_path_EQ : Joined<["--"], "rocm-path=">, Group, - HelpText<"ROCm installation path">; + HelpText<"ROCm installation path, used for finding and automatically linking required bitcode li

[PATCH] D78659: Add nomerge function attribute to supress tail merge optimization in simplifyCFG

2020-04-27 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 260529. zequanwu added a comment. Split the the original differential to 2 smaller ones. This one add nomerge function attribute in IR level. Another one will add the attribute to let frontend recognize it. CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D78853: [Analysis] Fix null pointer dereference warnings [1/n]

2020-04-27 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 260517. mgrang retitled this revision from "[Sema] Fix null pointer dereference warnings [1/n]" to "[Analysis] Fix null pointer dereference warnings [1/n]". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78853/new/ https://reviews.llvm.org/D78853 File

[PATCH] D78979: OpenCL: Include builtin header by default

2020-04-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D78979#2006847 , @arsenm wrote: > I'm also wondering if using -nogpulib for the corresponding linker purpose > was correct, since in the OpenCL case it's not really an offload target. > Maybe this should switch to -nostdlib?

[PATCH] D78853: [Analysis] Fix null pointer dereference warnings [1/n]

2020-04-27 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Analysis/ThreadSafety.cpp:1938-1940 +// The default value for the argument VD to the current function is +// nullptr. So we assert that VD is non null because we deref VD here. +assert(VD && "!VD"); ---

[PATCH] D72959: Relative VTables ABI on Fuchsia

2020-04-27 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGVTables.cpp:623 +llvm::Constant *C, llvm::GlobalVariable *VTable, unsigned vtableIdx, +unsigned lastAddrPoint) const { + // No need to get the offset of a nul

[clang] be884b7 - Revert "build: use `find_package(Python3)` if available"

2020-04-27 Thread Saleem Abdulrasool via cfe-commits
Author: Saleem Abdulrasool Date: 2020-04-27T20:03:32-07:00 New Revision: be884b79352de8917ad17fdb9bd70ec982ca8bdd URL: https://github.com/llvm/llvm-project/commit/be884b79352de8917ad17fdb9bd70ec982ca8bdd DIFF: https://github.com/llvm/llvm-project/commit/be884b79352de8917ad17fdb9bd70ec982ca8bdd.

[PATCH] D78900: [HIP][AMDGPU] Enable structurizer workarounds

2020-04-27 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: clang/lib/Driver/ToolChains/HIP.cpp:158 Args.MakeArgString(Twine("-filetype=") + (OutputIsAsm ? "asm" : "obj"))); + LlcArgs.push_back("--amdgpu-enable-structurizer-workarounds"); arsenm wrote: > We should just

[PATCH] D78982: [clang-format] Fix Microsoft style for enums

2020-04-27 Thread Aaron Smith via Phabricator via cfe-commits
asmith created this revision. asmith added reviewers: jbcoe, MyDeveloperDay. Herald added a project: clang. Herald added a subscriber: cfe-commits. asmith added a reviewer: thakis. Before this change enums were formatted incorrectly for the Microsoft style. [Original Source] enum {

[PATCH] D78982: [clang-format] Fix Microsoft style for enums

2020-04-27 Thread Aaron Smith via Phabricator via cfe-commits
asmith added a comment. This change tries to fix this bug. https://bugs.llvm.org/show_bug.cgi?id=32810 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78982/new/ https://reviews.llvm.org/D78982 ___ cfe-c

[PATCH] D78982: [clang-format] Fix Microsoft style for enums

2020-04-27 Thread Aaron Smith via Phabricator via cfe-commits
asmith updated this revision to Diff 260542. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78982/new/ https://reviews.llvm.org/D78982 Files: clang/include/clang/Format/Format.h clang/lib/Format/Format.cpp clang/lib/Format/UnwrappedLineParser.cpp Index: clang/lib/Format/UnwrappedL

[clang] a58b62b - [IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand().

2020-04-27 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2020-04-27T22:17:03-07:00 New Revision: a58b62b4a2b96c31b49338b262b609db746449e8 URL: https://github.com/llvm/llvm-project/commit/a58b62b4a2b96c31b49338b262b609db746449e8 DIFF: https://github.com/llvm/llvm-project/commit/a58b62b4a2b96c31b49338b262b609db746449e8.diff

[PATCH] D72959: Relative VTables ABI on Fuchsia

2020-04-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGVTables.cpp:623 +llvm::Constant *C, llvm::GlobalVariable *VTable, unsigned vtableIdx, +unsigned lastAddrPoint) const { + // No need to get the offset of a nullptr. leonardchan wrote: > leona

[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling

2020-04-27 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D77229#2006106 , @NoQ wrote: > If your change causes a crash, please debug it. That's a completely normal > thing that programmers do every day. Unfortunately, I can't afford to > spoon-feed you the solution step-by

[PATCH] D78938: Fixing all comparisons for C++20 compilation.

2020-04-27 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. (peanut gallery: I'd consider, while you're touching these all anyway, changing them all to non-member (friended where required) as I believe that's best practice - allows equal implicit conversions on either side, for instance (even if some types have no implicit conv

<    1   2   3