[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. It just hit me that we should probably just wait for the async request to finish before returning from completion. We might be doing this to reduce latency a little, but I don't recall us measuring that this provides a significant performance win. Would that work?

[PATCH] D68321: Fix clang Visual Studio build instructions

2019-10-02 Thread Alessandro Vergani via Phabricator via cfe-commits
Loghorn created this revision. Loghorn added reviewers: rnk, rsmith. Loghorn added a project: clang. Herald added a subscriber: cfe-commits. Change cd ..\.. to cd llvm-project (the former is probably a leftover of the old svn instructions) Repository: rC Clang https://reviews.llvm.org/D68321

[clang-tools-extra] r373428 - [clang-tidy] Fix for commits rL372706 and rL372711

2019-10-02 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Wed Oct 2 00:14:11 2019 New Revision: 373428 URL: http://llvm.org/viewvc/llvm-project?rev=373428&view=rev Log: [clang-tidy] Fix for commits rL372706 and rL372711 The patch committed was not the accepted version but the previous one. This commit fixes this issue.

[PATCH] D68322: [clang-rename] Better renaming the typedef decl.

2019-10-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. when renaming a typedef decl, we used to rename the underlying decl of the typedef, we should rename the typedef itself. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68322 Fi

[PATCH] D68296: clang-format: Add ability to wrap braces after multi-line control statements

2019-10-02 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. Firstly thank you for the patch.. Prior authors have pointed out that new styles need to be supported by a large public style guide as evidence as to why clang-format

[PATCH] D67901: [clangd] Improve semantic highlighting in dependent contexts (fixes #154)

2019-10-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:219 + bool VisitDependentNameTypeLoc(DependentNameTypeLoc L) { +addToken(L.getNameLoc(), HighlightingKind::DependentType); +return true; nridge wrote: > ho

[PATCH] D68324: [clangd] Always send file URIs to editors

2019-10-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. kadircet added a reviewer: sammccall. Editors only know about file URIs, make sure we do not use any custom schemes while sending edits. Re

[clang-tools-extra] r373435 - [clangd] Always send file URIs to editors

2019-10-02 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Wed Oct 2 02:12:01 2019 New Revision: 373435 URL: http://llvm.org/viewvc/llvm-project?rev=373435&view=rev Log: [clangd] Always send file URIs to editors Summary: Editors only know about file URIs, make sure we do not use any custom schemes while sending edits. Reviewers:

[PATCH] D68324: [clangd] Always send file URIs to editors

2019-10-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373435: [clangd] Always send file URIs to editors (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[clang-tools-extra] r373436 - [clang-tidy] Fix typo in r373428

2019-10-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 2 02:16:48 2019 New Revision: 373436 URL: http://llvm.org/viewvc/llvm-project?rev=373436&view=rev Log: [clang-tidy] Fix typo in r373428 Modified: clang-tools-extra/trunk/test/clang-tidy/bugprone-infinite-loop.cpp Modified: clang-tools-extra/trunk/test/clang-t

[PATCH] D68021: [IntrinsicEmitter] Add overloaded type VecOfBitcastsToInt for SVE intrinsics

2019-10-02 Thread Kerry McLaughlin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373437: [IntrinsicEmitter] Add overloaded type VecOfBitcastsToInt for SVE intrinsics (authored by kmclaughlin, committed by ). Changed prior to commit: https://reviews.llvm.org/D68021?vs=221756&id=22277

[PATCH] D68325: [clangd] Bail out early if we are sure that the symbol is used outside of the file.

2019-10-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This would reduce the false positive when the static index is in an unavailable state, e.g. background index i

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2019-10-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 5 inline comments as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:378-379 + + using CheckFn = void (MallocChecker::*)(CheckerContext &C, const CallExpr *CE, + Pro

Re: r373407 - Emit TypeNodes.def with tblgen.

2019-10-02 Thread Nico Weber via cfe-commits
On Wed, Oct 2, 2019 at 2:33 AM John McCall wrote: > On 1 Oct 2019, at 21:31, Nico Weber wrote: > > I think that'd be nice; I believe I renamed one .def output with the > > same > > history for the same reason a while ago. > > r373425 > Thanks! > > John. > > > > > On Tue, Oct 1, 2019 at 9:25 PM

[PATCH] D68162: [analyzer][MallocChecker][NFC] Communicate the allocation family to auxiliary functions with parameters

2019-10-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 222781. Szelethus retitled this revision from "[analyzer][MallocChecker][NFC] Communicate the allocation family information to auxiliary functions with template parameters" to "[analyzer][MallocChecker][NFC] Communicate the allocation family to auxiliary f

[PATCH] D68023: [AArch64][SVE] Implement int_aarch64_sve_cnt intrinsic

2019-10-02 Thread Kerry McLaughlin via Phabricator via cfe-commits
kmclaughlin updated this revision to Diff 222780. kmclaughlin added a comment. - Fixes alignment of last argument to //sve_int_un_pred_arit_1// in AArch64SVEInstrInfo.td CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68023/new/ https://reviews.llvm.org/D68023 Files: llvm/include/llvm

r373439 - [ClangFormat] Future-proof Standard option, allow floating or pinning to arbitrary lang version

2019-10-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 2 02:50:40 2019 New Revision: 373439 URL: http://llvm.org/viewvc/llvm-project?rev=373439&view=rev Log: [ClangFormat] Future-proof Standard option, allow floating or pinning to arbitrary lang version Summary: The historical context: - clang-format was written when

r373440 - [clang-rename] Better renaming the typedef decl.

2019-10-02 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Oct 2 02:50:46 2019 New Revision: 373440 URL: http://llvm.org/viewvc/llvm-project?rev=373440&view=rev Log: [clang-rename] Better renaming the typedef decl. Summary: when renaming a typedef decl, we used to rename the underlying decl of the typedef, we should rename the t

[PATCH] D67541: [ClangFormat] Future-proof Standard option, allow floating or pinning to arbitrary lang version

2019-10-02 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373439: [ClangFormat] Future-proof Standard option, allow floating or pinning to… (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed pri

[PATCH] D68322: [clang-rename] Better renaming the typedef decl.

2019-10-02 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373440: [clang-rename] Better renaming the typedef decl. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

r373441 - [ClangFormat] relnotes for r373439

2019-10-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 2 02:52:52 2019 New Revision: 373441 URL: http://llvm.org/viewvc/llvm-project?rev=373441&view=rev Log: [ClangFormat] relnotes for r373439 Modified: cfe/trunk/docs/ReleaseNotes.rst Modified: cfe/trunk/docs/ReleaseNotes.rst URL: http://llvm.org/viewvc/llvm-pro

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 10 inline comments as done. simon_tatham added inline comments. Comment at: clang/lib/AST/Decl.cpp:3082 +static bool ArmMveAliasValid(unsigned BuiltinID, StringRef AliasName) { + // This will be filled in by Tablegen which isn't written yet + return false; -

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 222785. simon_tatham marked an inline comment as done. simon_tatham edited the summary of this revision. simon_tatham added a comment. Addressed many (but not quite all) review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] r373442 - [clangd] SelectionTree should mark a node as fully-selected if the only claimed tokens were early-claimed.

2019-10-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 2 03:01:53 2019 New Revision: 373442 URL: http://llvm.org/viewvc/llvm-project?rev=373442&view=rev Log: [clangd] SelectionTree should mark a node as fully-selected if the only claimed tokens were early-claimed. Summary: Previously they would be marked as partially

[PATCH] D66872: [clangd] SelectionTree should mark a node as fully-selected if the only claimed tokens were early-claimed.

2019-10-02 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373442: [clangd] SelectionTree should mark a node as fully-selected if the only claimed… (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Chan

[PATCH] D53137: Scalable vector core instruction support + size queries

2019-10-02 Thread Diana Picus via Phabricator via cfe-commits
rovka accepted this revision. rovka marked 2 inline comments as done. rovka added a comment. This revision is now accepted and ready to land. This looks good to me, maybe wait a while to see if anyone else has any further comments. Comment at: llvm/include/llvm/IR/DataLayout.h

[PATCH] D67901: [clangd] Improve semantic highlighting in dependent contexts (fixes #154)

2019-10-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:505 + case HighlightingKind::DependentType: +return "entity.name.type.dependent.cpp"; + case HighlightingKind::DependentName: Maybe have a separate category f

[PATCH] D68163: [analyzer][MallocChecker][NFC] Change the use of IdentifierInfo* to CallDescription

2019-10-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 222791. Szelethus added a comment. Rebase, unforget to support 3-arg malloc, for which apparently were no tests at all. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68163/new/ https://reviews.llvm.org/D68163 Files: clang/include/clang/StaticA

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7442 + case ParsedAttr::AT_ClangBuiltinOverride: +handleClangBuiltinOverrideAttribute(S, D, AL); +break; aaron.ballman wrote: >

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2019-10-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 222794. Szelethus marked an inline comment as done. Szelethus added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68165/new/ https://reviews.llvm.org/D68165 Files: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Index: c

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2019-10-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1487 - if (Att->getModule()->getName() != - MemFunctionInfo.CD_malloc.getFunctionName()) + if (Att->getModule()->getName() != "malloc") return nullptr;

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-10-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 222795. balazske marked an inline comment as done. balazske added a comment. - Re-design of eval functions. - Added a C++ test with fopen-looking function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/ne

[PATCH] D67536: [WIP] [clangd] Add support for an inactive regions notification

2019-10-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Could you add tests for this? Comment at: clang-tools-extra/clangd/Compiler.cpp:66 CI->getLangOpts()->CommentOpts.ParseAllComments = true; + CI->getPreprocessorOpts().DetailedRecord = true; return CI; I'm not sure how does this fl

[clang-tools-extra] r373444 - [clangd] Bail out early if we are sure that the symbol is used outside of the file.

2019-10-02 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Oct 2 03:46:37 2019 New Revision: 373444 URL: http://llvm.org/viewvc/llvm-project?rev=373444&view=rev Log: [clangd] Bail out early if we are sure that the symbol is used outside of the file. Summary: This would reduce the false positive when the static index is in an un

[PATCH] D68325: [clangd] Bail out early if we are sure that the symbol is used outside of the file.

2019-10-02 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373444: [clangd] Bail out early if we are sure that the symbol is used outside of the… (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed p

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-10-02 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet marked an inline comment as done. gchatelet added inline comments. Comment at: llvm/trunk/lib/Target/AArch64/AArch64StackTagging.cpp:65 -static constexpr unsigned kTagGranuleSize = 16; +static const Align kTagGranuleSize = Align(16); arichardson wro

r373447 - ASTContext - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-10-02 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Oct 2 04:48:06 2019 New Revision: 373447 URL: http://llvm.org/viewvc/llvm-project?rev=373447&view=rev Log: ASTContext - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but we should be a

r373451 - Log2_32 returns an unsigned. NFCI.

2019-10-02 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Oct 2 04:49:32 2019 New Revision: 373451 URL: http://llvm.org/viewvc/llvm-project?rev=373451&view=rev Log: Log2_32 returns an unsigned. NFCI. Silences clang static analyzer warning about out of bounds (negative) shifts. Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp

[PATCH] D53137: Scalable vector core instruction support + size queries

2019-10-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. Thanks @huntergr , I think this interface looks really nice. LGTM! Comment at: llvm/include/llvm/IR/DataLayout.h:456 + TypeSize getTypeStoreSize(Type *Ty) const { +auto BaseSize = getTypeSizeInBits(Ty); +retu

[PATCH] D68332: [clang-format] [PR43531] clang-format damages "alternative representations" for operators

2019-10-02 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: klimek, reuk, owenpan, mitchell-stellar, STL_MSFT. MyDeveloperDay added projects: clang-format, clang-tools-extra. Herald added a project: clang. https://bugs.llvm.org/show_bug.cgi?id=43531 Fix for clang-format incorrectly han

[PATCH] D68023: [AArch64][SVE] Implement int_aarch64_sve_cnt intrinsic

2019-10-02 Thread Kerry McLaughlin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373468: [AArch64][SVE] Implement int_aarch64_sve_cnt intrinsic (authored by kmclaughlin, committed by ). Changed prior to commit: https://reviews.llvm.org/D68023?vs=222780&id=222814#toc Repository: r

[PATCH] D68245: [Clangd] ExtractFunction: Don't extract body of enclosing function.

2019-10-02 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 222815. SureYeaah marked an inline comment as done. SureYeaah added a comment. Added assert and removed fixme Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68245/new/ https://reviews.llvm.org/D68245 Files:

[PATCH] D67901: [clangd] Improve semantic highlighting in dependent contexts (fixes #154)

2019-10-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:505 + case HighlightingKind::DependentType: +return "entity.name.type.dependent.cpp"; + case HighlightingKind::DependentName: ilya-biryukov wrote: > Maybe have a sep

[PATCH] D68300: [HIP] Add option -fno-link-builtin-bitcode to disable linking device lib

2019-10-02 Thread Aaron Enye Shi via Phabricator via cfe-commits
ashi1 added a comment. LGTM thank you Comment at: include/clang/Driver/Options.td:606 +def flink_builtin_bitcode : Flag<["-"], "flink-builtin-bitcode">, + Flags<[CC1Option]>, HelpText<"Link builtin bitcode for HIP device compilation.">; +def fno_link_builtin_bitcode : Flag<["

[PATCH] D68335: [CodeComplete] Ensure object is the same in compareOverloads()

2019-10-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. This fixes a regression that led to size() not being available in clangd when completing 'deque().^'. Repository: rG

[clang-tools-extra] r373471 - [Clangd] Ensure children are always RootStmt in ExtractFunction (Fixes #153)

2019-10-02 Thread Shaurya Gupta via cfe-commits
Author: sureyeaah Date: Wed Oct 2 06:51:06 2019 New Revision: 373471 URL: http://llvm.org/viewvc/llvm-project?rev=373471&view=rev Log: [Clangd] Ensure children are always RootStmt in ExtractFunction (Fixes #153) Summary: We weren't always checking if children are RootStmts in ExtractFunction. F

[PATCH] D68182: [Clangd] Ensure children are always RootStmt in ExtractFunction (Fixes #153)

2019-10-02 Thread Shaurya Gupta via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL373471: [Clangd] Ensure children are always RootStmt in ExtractFunction (Fixes #153) (authored by SureYeaah, committed by

[clang-tools-extra] r373472 - [Clangd] ExtractFunction: Don't extract body of enclosing function.

2019-10-02 Thread Shaurya Gupta via cfe-commits
Author: sureyeaah Date: Wed Oct 2 06:52:14 2019 New Revision: 373472 URL: http://llvm.org/viewvc/llvm-project?rev=373472&view=rev Log: [Clangd] ExtractFunction: Don't extract body of enclosing function. Summary: This patch disable extraction of the body of the enclosing function. `void f() [[{}]

[PATCH] D68300: [HIP] Add option -fno-link-builtin-bitcode to disable linking device lib

2019-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: include/clang/Driver/Options.td:606 +def flink_builtin_bitcode : Flag<["-"], "flink-builtin-bitcode">, + Flags<[CC1Option]>, HelpText<"Link builtin bitcode for HIP device compilation.">; +def fno

[PATCH] D68245: [Clangd] ExtractFunction: Don't extract body of enclosing function.

2019-10-02 Thread Shaurya Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373472: [Clangd] ExtractFunction: Don't extract body of enclosing function. (authored by SureYeaah, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D68284: [HIP] Support -emit-llvm for device compilation

2019-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 222826. yaxunl added a comment. Make it work for -S CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68284/new/ https://reviews.llvm.org/D68284 Files: lib/Driver/Driver.cpp test/Driver/hip-toolchain-emit-llvm.hip Index: test/Driver/hip-toolchain-

[PATCH] D68284: [HIP] Support -emit-llvm for device compilation

2019-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D68284#1690554 , @tra wrote: > LGTM. > > Does it produce textual IR if used with `-S`? Now it produces textural IR if used with -S. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68284/new/ https://reviews.llvm.org/D6

r373475 - SemaOverload - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-10-02 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Oct 2 07:02:27 2019 New Revision: 373475 URL: http://llvm.org/viewvc/llvm-project?rev=373475&view=rev Log: SemaOverload - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cas

r373474 - SemaInit - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-10-02 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Oct 2 07:02:18 2019 New Revision: 373474 URL: http://llvm.org/viewvc/llvm-project?rev=373474&view=rev Log: SemaInit - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases w

[PATCH] D68335: [CodeComplete] Ensure object is the same in compareOverloads()

2019-10-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. (oops, meant to accept with comments) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68335/new/ https://reviews.llvm.org/D68335

[PATCH] D68335: [CodeComplete] Ensure object is the same in compareOverloads()

2019-10-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:2565 + EXPECT_THAT(Completions, + ElementsAre(AllOf(ReturnType("int"), Named("size"; +} could you give the three methods different return types

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-10-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D64671#1690058 , @jpakkane wrote: > In D64671#1688626 , @aaron.ballman > wrote: > > > Do you need someone to commit this on your behalf (sorry for not asking > > that question soo

[PATCH] D66795: [Mips] Use appropriate private label prefix based on Mips ABI

2019-10-02 Thread Mirko Brkusanin via Phabricator via cfe-commits
mbrkusanin updated this revision to Diff 222832. mbrkusanin added a comment. - rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66795/new/ https://reviews.llvm.org/D66795 Files: clang/lib/Parse/ParseStmtAsm.cpp clang/tools/driver/cc1as_main.cpp lldb/source/Plugins/Disassemble

[PATCH] D68296: clang-format: Add ability to wrap braces after multi-line control statements

2019-10-02 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar updated this revision to Diff 222835. mitchell-stellar edited the summary of this revision. mitchell-stellar added a comment. Thanks for the review. I have added documentation updates. I do not have a public style guide to reference. My company just switched to auto-clang-format

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-02 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. Herald added subscribers: cfe-commits, jsji, jfb, kbarton, mgorny, nemanjai. Herald added a project: clang. This patch adds AIX toolchain infrastructure into driver, and enables AIX system linker invocation with some basic functionality support Repository: rG LL

[PATCH] D68296: clang-format: Add ability to wrap braces after multi-line control statements

2019-10-02 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D68296#1691393 , @mitchell-stellar wrote: > Thanks for the review. I have added documentation updates. > > I do not have a public style guide to reference. My company just switched to > auto-clang-formatting all of our code, an

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:149 /// \returns the source corresponding to the selected range. StencilPart selection(RangeSelector

r373478 - Silence static analyzer getAs null dereference warnings. NFCI.

2019-10-02 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Oct 2 08:31:25 2019 New Revision: 373478 URL: http://llvm.org/viewvc/llvm-project?rev=373478&view=rev Log: Silence static analyzer getAs null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases we should be a

Re: r372681 - Support for DWARF-5 C++ language tags.

2019-10-02 Thread Adrian Prantl via cfe-commits
> On Oct 1, 2019, at 6:40 PM, David Blaikie wrote: > > This broke gnu_pubnames and other forms of DWARF index of C++ code - fixed in > r373420 (feel free to post-comimt review, etc, of course) > Thanks! -- adrian > On Mon, Sep 23, 2019 at 5:36 PM Adrian Prantl via cfe-commits > mailto:cfe

Re: r372681 - Support for DWARF-5 C++ language tags.

2019-10-02 Thread David Blaikie via cfe-commits
Out of curiosity, should/would this've shown up for you Apple folks too? (as a failure in the apple/lldb accelerator tables - because the names would be similarly incorrect) had it just not got to the necessary testing yet? On Wed, Oct 2, 2019 at 8:29 AM Adrian Prantl wrote: > > > On Oct 1, 2019

Re: r372681 - Support for DWARF-5 C++ language tags.

2019-10-02 Thread Adrian Prantl via cfe-commits
>> On Oct 1, 2019, at 6:40 PM, David Blaikie wrote: >> >> This broke gnu_pubnames and other forms of DWARF index of C++ code - fixed >> in r373420 (feel free to post-comimt review, etc, of course) >> > patch for reference: >case dwarf::DW_TAG_union_type: >case dwarf::DW_TAG_enumerat

Re: r372681 - Support for DWARF-5 C++ language tags.

2019-10-02 Thread David Blaikie via cfe-commits
Yeah, something about linkage - but that's not the part that's as likely to be a problem as the other part: the other test for C++ language was what causes LLVM to compute the fully qualified name of an entity in the accelerator table ("foo::bar" instead of just "bar" (eg: the bug was things like "

[PATCH] D67723: [CodeView] Add option to disable inline line tables.

2019-10-02 Thread Jeremy Morse via Phabricator via cfe-commits
jmorse added a comment. Looks good, although I'm not familiar enough with frontend things to approve IMO. Using a function attribute seems fine and appropriate too -- although CU flags is another thing I'm unfamiliar with, so I can't really offer an opinion. Repository: rG LLVM Github Monor

r373480 - Type - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-10-02 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Oct 2 09:03:36 2019 New Revision: 373480 URL: http://llvm.org/viewvc/llvm-project?rev=373480&view=rev Log: Type - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases we sh

[PATCH] D67723: [CodeView] Add option to disable inline line tables.

2019-10-02 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl requested changes to this revision. aprantl added a comment. This revision now requires changes to proceed. I don't think the implementation is correct, see inline comments. Comment at: clang/include/clang/Driver/Options.td:1943 +def gno_inline_line_tables : Flag<["-"],

[PATCH] D67723: [CodeView] Add option to disable inline line tables.

2019-10-02 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1426 + // If we are not generating inline line tables, set the debug location + // of the inlined code to be the call site. + DebugLoc IDL = aprant

[PATCH] D67723: [CodeView] Add option to disable inline line tables.

2019-10-02 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. There also needs to be a IR-based test for the inliner change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67723/new/ https://reviews.llvm.org/D67723 ___ cfe-commits mailing

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-10-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D67122#1691307 , @lebedev.ri wrote: > Ping. > After talking with @aaron.ballman, revised the check to also handle the C > semantics ("ptr+0 is UB"). And that resulted in one more occurrence in test-suite - rL373486

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-10-02 Thread Jussi Pakkanen via Phabricator via cfe-commits
jpakkane updated this revision to Diff 222850. jpakkane added a comment. Rebased against latest Git master. Didn't see any rebase conflicts, though... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64671/new/ https://reviews.llvm.org/D64671 Files: clang-tools-extra/clang-tidy/cppcoreg

[PATCH] D68296: clang-format: Add ability to wrap braces after multi-line control statements

2019-10-02 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. As I mentioned, its worth getting evidence from a large public project... https://wiki.blender.org/index.php/Dev:Doc/Code_Style Blender public repo on github.com has 90 Forks, 299 * and 90,000 commits From their style guide Exceptions to Braces on Same Line

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-10-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. &a[0] is really UB in C? Oh =[ Can we have clang warning also for this case? And suggest “a”? Very common code, I think. Hopefully llvm’s optimizers do not exploit this case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D68284: [HIP] Support -emit-llvm for device compilation

2019-10-02 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Could you also add a check for `-S` w/o `-emit-llvm`, too ? AFAICT it currently wants to produce a bundle, which is not very helpful. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68284/new/ https://reviews.llvm.org/D68284 ___

[clang-tools-extra] r373489 - Add the misc-init-local-variables check.

2019-10-02 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Oct 2 10:18:57 2019 New Revision: 373489 URL: http://llvm.org/viewvc/llvm-project?rev=373489&view=rev Log: Add the misc-init-local-variables check. This checks finds all primitive type local variables (integers, doubles, pointers) that are declared without an init

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-10-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D64671#1691538 , @jpakkane wrote: > Rebased against latest Git master. Didn't see any rebase conflicts, though... Oh! I just noticed you made the patch against the monorepo which I'm n

[PATCH] D68300: [HIP] Add option -fno-link-builtin-bitcode to disable linking device lib

2019-10-02 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: include/clang/Driver/Options.td:606 +def flink_builtin_bitcode : Flag<["-"], "flink-builtin-bitcode">, + Flags<[CC1Option]>, HelpText<"Link builtin bitcode for HIP device compilation.">; +def fno_link_builtin_bitcode : Flag<["-"], "fno-lin

[PATCH] D68346: Clang-format: Add new option to add spaces around conditions

2019-10-02 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This diff adds a new option SpacesAroundConditions that inserts spaces inside the braces for conditional statements. It's used by the Zeek project (https://github.com/zeek/zeek) as described in t

[PATCH] D67161: [clang,ARM] Initial ACLE intrinsics for MVE.

2019-10-02 Thread Dave Green via Phabricator via cfe-commits
dmgreen added inline comments. Comment at: clang/include/clang/Basic/arm_mve_defs.td:119 +// The type Void can be used for the return type of an intrinsic, and as the +// parameter type for intrinsics that aren't actually parametrised by any kind +// of _s32 / _f16 / _u8 suffix.

r373502 - [OPENMP50]Add parsing/sema analysis for declare variant score.

2019-10-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Oct 2 11:19:02 2019 New Revision: 373502 URL: http://llvm.org/viewvc/llvm-project?rev=373502&view=rev Log: [OPENMP50]Add parsing/sema analysis for declare variant score. Context selectors may include optional score clause in format `score():`, where `` must be a constan

[PATCH] D67031: [Clang][Bundler] Error reporting improvements

2019-10-02 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67031/new/ https://reviews.llvm.org/D67031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D68166: [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries

2019-10-02 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68166/new/ https://reviews.llvm.org/D68166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D65543: [Windows] Autolink with basenames and add libdir to libpath

2019-10-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Another slightly related thread, regarding libs from the clang resource dir and how they are specified to the linker (regarding the builtins library): https://reviews.llvm.org/D51440 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

r373504 - [Stencil] Hide implementaion detai. NFC.

2019-10-02 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 2 11:33:44 2019 New Revision: 373504 URL: http://llvm.org/viewvc/llvm-project?rev=373504&view=rev Log: [Stencil] Hide implementaion detai. NFC. Modified: cfe/trunk/lib/Tooling/Refactoring/Stencil.cpp Modified: cfe/trunk/lib/Tooling/Refactoring/Stencil.cpp URL: htt

[PATCH] D67031: [Clang][Bundler] Error reporting improvements

2019-10-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:133 /// returned if there are no more bundles to be read. - virtual StringRef ReadBundleStart(MemoryBuffer &Input) = 0; + virtual Expected> + ReadBundleStart(MemoryBuffer &I

[PATCH] D68166: [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries

2019-10-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2284-2289 -/// Append top level actions generated by the builder. Return true if errors -/// were found. +/// Append top level actions generated by the builder. virtual void appendTopLevelAct

[PATCH] D68346: [clang-format] Add new option to add spaces around conditions

2019-10-02 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/Format/Format.h:1950 + /// similar) conditions. + bool SpacesAroundConditions; + its position

[PATCH] D68296: [clang-format] Add ability to wrap braces after multi-line control statements

2019-10-02 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @klimek thanks for offering for me to make the decision. I think given the fact that blender has it in their style guide and that they are clearly working around clang-formats inability to handle this case, I'm minded to LGTM this revision I hope you are ok with

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 222889. ymandel marked 2 inline comments as done. ymandel added a comment. responded to comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68315/new/ https://reviews.llvm.org/D68315 Files: clang/include/

[PATCH] D68166: [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries

2019-10-02 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. I still don't understand what advantage the standalone tool has over renaming the file to `omp_offloading` and then using `objcopy -I binary`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68166/new/ https://review

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:149 /// \returns the source corresponding to the selected range. StencilPart selection(RangeSelector Selector); gribozavr wr

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:149 /// \returns the source corresponding to the selected range. StencilPart selection(RangeSelector Selector); ymandel wrote: > gribozavr wrote: > > Should the com

[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 222890. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68273/new/ https://reviews.llvm.org/D68273 Files: clang-tools-ex

[PATCH] D68273: [clangd] Fix raciness in code completion tests

2019-10-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:1141 +ReceivedRequestCV.wait(Lock, + [this, Num] { return NumRequestsReceived == Num; }); +NumRequestsReceived = 0; ilya-biryuko

[PATCH] D68296: [clang-format] Add ability to wrap braces after multi-line control statements

2019-10-02 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar added a comment. @MyDeveloperDay I am not wedded to "OnlyMultiLine". I picked it, as it seemed reasonable to me, but if you think another string expresses the intent better, then feel free to use it. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-10-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 222892. kadircet marked 5 inline comments as done. kadircet added a comment. - Update test helper to take an out parameter Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66647/new/ https://reviews.llvm.org/D666

[PATCH] D68166: [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries

2019-10-02 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2284-2289 -/// Append top level actions generated by the builder. Return true if errors -/// were found. +/// Append top level actions generated by the builder. virtual void appendTopLevelA

  1   2   >