[PATCH] D60463: [ASTImporter] Add check for correct import of source locations.

2019-04-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. This test will work theoretically only if the order of every imported Decl (and not only FieldDecl) is correct, this is not the case now. So probably a better solution for the problem should be found: Enumerate and match (the From and To) SourceLocations with AST visit

[PATCH] D60499: [ASTImporter] Various source location and range import fixes.

2019-04-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. ASTImporter contained wrong or missing imports of SourceLocatio

[PATCH] D60500: [clangd] Refactor speculateCompletionFilter and also extract scope.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Intent is to use the heuristically-parsed scope in cases where we get bogus results from sema, such as in

[PATCH] D60500: [clangd] Refactor speculateCompletionFilter and also extract scope.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 194462. sammccall added a comment. Handle edge-case correctly. Add test for leading :: case. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60500/new/ https://reviews.llvm.org/D60500 Files: clangd/CodeC

[PATCH] D60500: [clangd] Refactor speculateCompletionFilter and also extract scope.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 194463. sammccall added a comment. Fix terrible variable name. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60500/new/ https://reviews.llvm.org/D60500 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h

[PATCH] D60029: Add const children() accessors to all AST nodes.

2019-04-10 Thread Nicolas Manichon via Phabricator via cfe-commits
nicolas added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60029/new/ https://reviews.llvm.org/D60029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D60055: Check i < FD->getNumParams() before querying

2019-04-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. This revision is now accepted and ready to land. This fix makes sense to me, however, Richard Smith @rsmith is the best person to review this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D60432: [clang][ASTContext] Simplify caching for declaration-related comments

2019-04-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:756 /// lazily. mutable llvm::DenseMap RedeclComments; The name of this variable (and `RawCommentAndCacheFlags`) don't make sense after the change. Comme

[PATCH] D60267: [clangd] Support relatedInformation in diagnostics.

2019-04-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Diagnostics.cpp:185 OS << Note.Message; - OS << "\n\n"; - printDiag(OS, Main); + // If there's no structured link between the note and the original diagnostic + // then emit the main diagnostic to give context. --

[PATCH] D60267: [clangd] Support relatedInformation in diagnostics.

2019-04-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Diagnostics.cpp:271 + if (!Note.AbsFile) { +log("Dropping note from unknown file: {0}", Note); +continue; Maybe `vlog`? This is what we use for dropped diagnostics, should probably stic

[PATCH] D60485: [AArch64] Add support for MTE intrinsics

2019-04-10 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. Do we need a separate file for that one "__arm_mte_ptrdiff" test? Wouldn't it be easier to wrap the whole function in "__cplusplus" and put it in the same file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60485/new/ https://reviews.llvm.org/D60485 _

[PATCH] D60267: [clangd] Support relatedInformation in diagnostics.

2019-04-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Protocol.cpp:280 R.DiagnosticFixes = *CodeActions; + if (auto CodeActions = Diagnostics->getBoolean("relatedInformation")) +R.DiagnosticRelatedInformation = *CodeActions; `s/CodeActions/Rela

[PATCH] D60500: [clangd] Refactor speculateCompletionFilter and also extract scope.

2019-04-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Comment at: clangd/CodeComplete.cpp:1542 + assert(Offset <= Content.size()); + StringRef Suffix = Content.take_front(Offset); + CompletionPrefix Result; -

[PATCH] D60267: [clangd] Support relatedInformation in diagnostics.

2019-04-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Protocol.cpp:280 R.DiagnosticFixes = *CodeActions; + if (auto CodeActions = Diagnostics->getBoolean("relatedInformation")) +R.DiagnosticRelatedInformation = *CodeActions; kadircet wrote

[PATCH] D59599: [clangd] Fix a crash while printing Template Arguments

2019-04-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 194470. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59599/new/ https://reviews.llvm.org/D59599 Files: clangd/AST.cpp

[PATCH] D60503: [clangd] Don't insert extra namespace qualifiers when Sema gets lost.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. There are cases where Sema can't tell that "foo" in foo::Bar is a namespace qualifier, like in incomplete

[PATCH] D60503: [clangd] Don't insert extra namespace qualifiers when Sema gets lost.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 194486. sammccall added a comment. Update comment Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60503/new/ https://reviews.llvm.org/D60503 Files: clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTests

[clang-tools-extra] r358074 - [clangd] Refactor speculateCompletionFilter and also extract scope.

2019-04-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 10 04:50:40 2019 New Revision: 358074 URL: http://llvm.org/viewvc/llvm-project?rev=358074&view=rev Log: [clangd] Refactor speculateCompletionFilter and also extract scope. Summary: Intent is to use the heuristically-parsed scope in cases where we get bogus results

[PATCH] D60500: [clangd] Refactor speculateCompletionFilter and also extract scope.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: clangd/CodeComplete.cpp:1542 + assert(Offset <= Content.size()); + StringRef Suffix = Content.take_front(Offset); + CompletionPrefix Result; ioeric wrote: > `Suffix` is ac

[PATCH] D60500: [clangd] Refactor speculateCompletionFilter and also extract scope.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rL358074: [clangd] Refactor speculateCompletionFilter and also extract scope. (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a

[PATCH] D60409: [clangd] Add -header-insertion=never flag to disable include insertion in code completion

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall marked 2 inline comments as done. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/CodeComplete.cpp:1176 // This is available after Sema has run. - llvm::Optional Inserter; // Ava

[PATCH] D60503: [clangd] Don't insert extra namespace qualifiers when Sema gets lost.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: clangd/CodeComplete.cpp:545 const CodeCompleteOptions &Opts) { - auto GetAllAccessibleScopes = [](CodeCompletionContext &CCContext) { -SpecifiedScope Info; -for (auto

[PATCH] D59221: [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract.

2019-04-10 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau added a comment. Ping! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59221/new/ https://reviews.llvm.org/D59221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r358075 - [clangd] Add -header-insertion=never flag to disable include insertion in code completion

2019-04-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 10 05:15:35 2019 New Revision: 358075 URL: http://llvm.org/viewvc/llvm-project?rev=358075&view=rev Log: [clangd] Add -header-insertion=never flag to disable include insertion in code completion Summary: One clear use case: use with an editor that reacts poorly to

[PATCH] D60409: [clangd] Add -header-insertion=never flag to disable include insertion in code completion

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rL358075: [clangd] Add -header-insertion=never flag to disable include insertion in code… (authored by sammccall, committed by ). Herald added a project: LLVM. Her

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-10 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas created this revision. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. This check searches for copy assignment operators which might not handle self-assignment properly. There are three patterns of handling a self assignment situation: self check, c

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-10 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas added a comment. On llvm source code the check finds three suspicious methods: /home/zolnai/libreoffice/clang/llvm-project/clang/lib/AST/NestedNameSpecifier.cpp:534:1: warning: operator=() might not handle self-assignment properly [bugprone-unhandled-self-assignment] operator=(const

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-10 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas added a comment. On LibreOffice source code I found 36 catches with this check. 16 of them was worth to fix because in those cases the object state was changed in some way after a self-assignment: https://cgit.freedesktop.org/libreoffice/core/commit/?id=3a5d78365dd172881c16c03e67f2d170ffc6

[PATCH] D60126: [clangd] Use identifiers in file as completion candidates when build is not ready.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Very nice! D60503 will conflict, feel free to stall that until this is landed. On the other hand it will simplify some things, e.g. the prefix is already calculated, and typed scope is available if you want that (no enclosing namespac

[PATCH] D59415: Do not resolve directory junctions for `-fdiagnostics-absolute-paths` on Windows.

2019-04-10 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. I don't feel like I have enough background on what you're trying to do to review this. It sounds related to clangd issues maybe? "If the source file path contains directory junctions, and we resolve them when printing diagnostic messages" I didn't think Clang tried to res

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp:102 "bugprone-too-small-loop-variable"); +CheckFactories.registerCheck( +"bugprone-unhandled-self-assignment"); please order this list a

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Thanks for the useful check! I have a few comments, see inline. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp:34-35 + binaryOperator(anyOf(hasOperatorName("=="), hasOperatorName("!=")), + any

[PATCH] D60510: [ADT] Fix template parameter names of llvm::{upper|lower}_bound

2019-04-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: llvm-commits, dexonsmith. Herald added a project: LLVM. Rename template parameter for a search value from 'ForwardIt' to 'T'. While here, also use perfect forwarding to pass the value to STL a

[PATCH] D60503: [clangd] Don't insert extra namespace qualifiers when Sema gets lost.

2019-04-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Feel free to land this. I'll rebase D60126 on this when it's in. Comment at: clangd/CodeComplete.cpp:580 + // Case 3: sema saw and resolve

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-10 Thread Dennis Luxen via Phabricator via cfe-commits
DennisL marked 12 inline comments as done. DennisL added a comment. In D60139#1460233 , @JonasToth wrote: > Hey Dennis, > > my 2cents on the check. I think it is very good to have! Did you check coding > guidelines if they say something to this issue? (e.

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-10 Thread Dennis Luxen via Phabricator via cfe-commits
DennisL updated this revision to Diff 194505. DennisL marked an inline comment as done. DennisL added a comment. Changed the following - addressed reviewer feedback - fetch the placement parameter as written - add further test cases as requested - stylistic changes - add nothrow parameter support

[PATCH] D60055: Check i < FD->getNumParams() before querying

2019-04-10 Thread Violet via Phabricator via cfe-commits
Violet added a comment. Thanks. Can you land it for me? I'm a newcommer without landing privilege. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60055/new/ https://reviews.llvm.org/D60055 ___ cfe-commi

[PATCH] D60055: Check i < FD->getNumParams() before querying

2019-04-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. I'd be happy to land it, but I do want @rsmith to take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60055/new/ https://reviews.llvm.org/D60055 ___ cfe-commits mailin

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-10 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. What's the motivation for this change, are you working towards common flags for both platforms? The current way to select crypto on AArch64 is '-march=armv8.x-a+crypto/nocrypto'. I can see that would be an issue if Power PC doesn't support that syntax, or doesn't

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-10 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. I'm not in favour of adding AArch64 support to -mcrypto -mnocrypto for a few reasons: - Arm are trying to keep the options for controlling target features as consistent as possible with GCC and this option isn't supported in GCC (https://gcc.gnu.org/onlinedocs/gcc/

r358087 - clang-cl: Fix parsing of the /F option (PR41405)

2019-04-10 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Apr 10 07:27:47 2019 New Revision: 358087 URL: http://llvm.org/viewvc/llvm-project?rev=358087&view=rev Log: clang-cl: Fix parsing of the /F option (PR41405) Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td cfe/trunk/test/Driver/cl-options.c Modified: cfe

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-10 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. The motivation for this change is to make "crypto" setting an additive option e.g. like "-mavx" used in many media packages. Some packages in Chrome want to enable crypto conditionally for a few files to allow crypto feature to be used based on runtime cpu detection

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-10 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. In D60472#1461336 , @manojgupta wrote: > The motivation for this change is to make "crypto" setting an additive option > e.g. like "-mavx" used in many media packages. Some packages in Chrome want > to enable crypto conditio

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-10 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In D60472#1461351 , @peter.smith wrote: > > Is that not a limitation of the build system? I'd expect a package to be able > to locally override a global default rather than vice-versa. Although crypto > might be the area o

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-10 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In D60472#1461351 , @peter.smith wrote: > > Is that not a limitation of the build system? I'd expect a package to be able > to locally override a global default rather than vice-versa. Although crypto > might be the area o

[PATCH] D60513: [HIP] Use -mlink-builtin-bitcode to link device library

2019-04-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, ashi1. Herald added a subscriber: jdoerfert. Use -mlink-builtin-bitcode instead of llvm-link to link device library so that device library bitcode and user device code can be compiled in a consistent way. This is the same approach used by

[clang-tools-extra] r358091 - [clangd] Don't insert extra namespace qualifiers when Sema gets lost.

2019-04-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 10 08:16:54 2019 New Revision: 358091 URL: http://llvm.org/viewvc/llvm-project?rev=358091&view=rev Log: [clangd] Don't insert extra namespace qualifiers when Sema gets lost. Summary: There are cases where Sema can't tell that "foo" in foo::Bar is a namespace qualif

[PATCH] D60503: [clangd] Don't insert extra namespace qualifiers when Sema gets lost.

2019-04-10 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL358091: [clangd] Don't insert extra namespace qualifiers when Sema gets lost. (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior t

[PATCH] D60516: [LTO] Add plumbing to save stats during LTO on MacOS.

2019-04-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: anemet, tejohnson, thegameg. Herald added subscribers: cfe-commits, dang, dexonsmith, steven_wu, hiraditya, inglorion, mehdi_amini. Herald added projects: clang, LLVM. Gold and ld on Linux already support saving stats, but the infrastructure is

[PATCH] D59746: [LibTooling] Fix '-h' option

2019-04-10 Thread James Henderson via Phabricator via cfe-commits
jhenderson added a comment. Just chiming in from a LLVM binutils developer perspective. Some of the binutils are missing -h as an alias, when they really should have it for compatibility (specifically I checked llvm-nm and llvm-symbolizer). As a result, a solution that auto-adds -h as an alias

[PATCH] D59692: [ASTImporter] Fix name conflict handling

2019-04-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping @a_sidorin @shafik Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59692/new/ https://reviews.llvm.org/D59692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D59692: [ASTImporter] Fix name conflict handling

2019-04-10 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 194527. martong marked an inline comment as done. martong added a comment. - Put back the call to GetOriginalDecl Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59692/new/ https://reviews.llvm.org/D59692 Files: include/clan

[clang-tools-extra] r358093 - clangd: repair the build after SVN r358091

2019-04-10 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Apr 10 08:45:05 2019 New Revision: 358093 URL: http://llvm.org/viewvc/llvm-project?rev=358093&view=rev Log: clangd: repair the build after SVN r358091 Fix the name of the variable being checked. NFCI. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modi

[clang-tools-extra] r358094 - [clangd] Use #if CLANGD_BUILD_XPC because it may be defined as 0

2019-04-10 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Apr 10 08:45:54 2019 New Revision: 358094 URL: http://llvm.org/viewvc/llvm-project?rev=358094&view=rev Log: [clangd] Use #if CLANGD_BUILD_XPC because it may be defined as 0 Modified: clang-tools-extra/trunk/clangd/Transport.h Modified: clang-tools-extra/trunk/clangd

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-04-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Diagnostics.cpp:396 + for (llvm::StringRef Inc : IncludeStack) +OS << "In file included from: " << Inc << ":\n"; +} ilya-biryukov wrote: > kadircet wrote: > > ilya-biryukov wrote: > >

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-04-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 194528. kadircet marked 10 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59302/new/ https://reviews.llvm.org/D59302 Files: clangd/ClangdU

[PATCH] D60161: Expose non-trivial struct helpers for Swift.

2019-04-10 Thread Tony Allevato via Phabricator via cfe-commits
allevato updated this revision to Diff 194530. allevato added a comment. - Rename generate* to get* and cleanup param names. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60161/new/ https://reviews.llvm.org/D60161 Files: clang/include/clang/Code

[PATCH] D60161: Expose non-trivial struct helpers for Swift.

2019-04-10 Thread Tony Allevato via Phabricator via cfe-commits
allevato marked 2 inline comments as done. allevato added a comment. Thanks for the review! This is ready to go on my end if there aren't any other comments. Comment at: clang/lib/CodeGen/CGNonTrivialStruct.cpp:845 + // actually use them (it overwrites them with the addresses

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-10 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:45 + /// Evaluates this part to a string and appends it to `result`. + virtual llvm::Error eval(const ast_matchers::MatchFinder::MatchResult &Match, + std::stri

[clang-tools-extra] r358098 - [clangd] Fix non-indexing of builtin functions like printf when the TU is C

2019-04-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 10 09:26:58 2019 New Revision: 358098 URL: http://llvm.org/viewvc/llvm-project?rev=358098&view=rev Log: [clangd] Fix non-indexing of builtin functions like printf when the TU is C Modified: clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp clang-tool

[PATCH] D60161: Expose non-trivial struct helpers for Swift.

2019-04-10 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60161/new/ https://reviews.llvm.org/D60161 __

[PATCH] D60161: Expose non-trivial struct helpers for Swift.

2019-04-10 Thread Tony Allevato via Phabricator via cfe-commits
allevato added a comment. Oh, and in case I need to mention this (I don't contribute to llvm/clang frequently), I don't have commit access so I'll need someone else to merge it in. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60161/new/

[PATCH] D59746: [LibTooling] Fix '-h' option

2019-04-10 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 194539. hintonda added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. - Add DefaultOption logic. Still needs tests, but wanted to get early feedback on basic approach. Repository: rG LLVM Github Monorepo CHAN

[clang-tools-extra] r358103 - clangd: fix the build with XPC

2019-04-10 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Apr 10 09:48:52 2019 New Revision: 358103 URL: http://llvm.org/viewvc/llvm-project?rev=358103&view=rev Log: clangd: fix the build with XPC `Transport.h` does not include `Features.inc`. However, since it is used in a subdirectory, it cannot directly include the header

[PATCH] D58920: [Modules][PR39287] Consolidate multiple std's

2019-04-10 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg added a comment. Sorry for the delay. Just catching up on the code this covers, so apologies if the questions don't make sense. Comment at: lib/Sema/SemaDeclCXX.cpp:9214-9215 getStdNamespace()->setImplicit(true); +if (getLangOpts().Modules) + getStdNam

r358104 - Don't emit an unreachable return block.

2019-04-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Apr 10 10:03:09 2019 New Revision: 358104 URL: http://llvm.org/viewvc/llvm-project?rev=358104&view=rev Log: Don't emit an unreachable return block. Patch by Brad Moody. Added: cfe/trunk/test/CodeGen/unreachable-ret.c Modified: cfe/trunk/lib/CodeGen/CGCall.cpp

[PATCH] D57072: Don't codegen an unreachable return block

2019-04-10 Thread John McCall via Phabricator via cfe-commits
rjmccall commandeered this revision. rjmccall edited reviewers, added: bmoody; removed: rjmccall. rjmccall added a comment. This revision now requires review to proceed. Committed as r358104, thanks for your patience. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D59555: [analyzer] Add yaml parser to GenericTaintChecker

2019-04-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. We agreed to disagree on the static function stuff -- it doesn't really matter, and I don't insist. I have no objections against this patch, great job! I won't formally accept to make it stand out a little more. Thanks! CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp:20 +void UnhandledSelfAssignmentCheck::registerMatchers(MatchFinder *Finder) { + + // We don't care about deleted, default or implicit operator implementatio

[PATCH] D59988: [PR41276] Generate address space cast of 'this' for objects attributed by an address space in C++

2019-04-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: test/CodeGenCXX/address-space-of-this.cpp:9 +//CHECK: call void @_ZN6MyTypeC1Ei(%struct.MyType* addrspacecast (%struct.MyType addrspace(10)* @m to %struct.MyType*), i32 123) +MyType __attribute__((address_space(10))) m = 123; -

[PATCH] D60409: [clangd] Add -header-insertion=never flag to disable include insertion in code completion

2019-04-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Our Mac builders have started failing after this change with the following: [3145/3502] Building CXX object tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o FAILED: tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o

[clang-tools-extra] r358107 - build: add binary dir to the unittests

2019-04-10 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Apr 10 10:25:14 2019 New Revision: 358107 URL: http://llvm.org/viewvc/llvm-project?rev=358107&view=rev Log: build: add binary dir to the unittests Missed part of the change to make clangd build on Darwin. Fixes the build after SVN r358103. Modified: clang-tools-ex

[PATCH] D59746: [LibTooling] Fix '-h' option

2019-04-10 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:1187 +// FIXME: This is needed, but not sure why. +updateArgStr(Opt, NewArg, ChosenSubCommand); +Opt->setArgStr(NewArg); ---

[PATCH] D60513: [HIP] Use -mlink-builtin-bitcode to link device library

2019-04-10 Thread Aaron Enye Shi via Phabricator via cfe-commits
ashi1 accepted this revision. ashi1 added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60513/new/ https://reviews.llvm.org/D60513 ___ cfe-commits mailing list cfe-commits@lis

r358115 - Fix an off-by-one mistake in IRGen's copy-construction

2019-04-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Apr 10 11:07:18 2019 New Revision: 358115 URL: http://llvm.org/viewvc/llvm-project?rev=358115&view=rev Log: Fix an off-by-one mistake in IRGen's copy-construction special cases in the presence of zero-length arrays. Patch by Joran Bigalet! Modified: cfe/trunk/lib/C

[PATCH] D58016: fixes copy constructor generation of classes containing 0-length arrays followed by exactly 1 trivial field (fixes #40682)

2019-04-10 Thread John McCall via Phabricator via cfe-commits
rjmccall closed this revision. rjmccall added a comment. Committed as r358115. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58016/new/ https://reviews.llvm.org/D58016 ___ cfe-commits mailing list cfe-

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 194549. ymandel marked 13 inline comments as done. ymandel added a comment. Responded to comments and added wrapper for Stencil::cat in stencil namespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 194550. ymandel added a comment. deleted some stray comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 Files: clang/include/clang/Tooling/Refactoring/Stencil.h

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 194551. ymandel added a comment. tweaks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 Files: clang/include/clang/Tooling/Refactoring/Stencil.h clang/lib/Tooling/

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-04-10 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for the review. I've changed most of the things with only a few open questions. PTAL. Comment at: clang/include/clang/Tooling/Refactoring/Stencil.h:45 + /// Evaluates this part to a string and appends it to `result`. + virtual llvm::Error eval

[PATCH] D60523: [clang] Bugfixe for 41400

2019-04-10 Thread Gauthier via Phabricator via cfe-commits
Tyker created this revision. Tyker added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. this is a bugfixe for bugtracker added nullptr check at the relevent place and test Repository: rC Clang https://r

[PATCH] D60263: [clang-format] Preserve include blocks in ObjC Google style

2019-04-10 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Looks good to me. Comment at: cfe/trunk/lib/Format/Format.cpp:881 +// "Regroup" doesn't work well for ObjC yet (main header heuristic, +// relationship between ObjC standard library headers and other heades, +// #imports, etc.) ---

r358126 - [OPENMP]Improve detection of number of teams, threads in target

2019-04-10 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Apr 10 12:11:33 2019 New Revision: 358126 URL: http://llvm.org/viewvc/llvm-project?rev=358126&view=rev Log: [OPENMP]Improve detection of number of teams, threads in target regions. Added more complex analysis for number of teams and number of threads in the target region

r358125 - Fix for different build configurations.

2019-04-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Apr 10 12:11:32 2019 New Revision: 358125 URL: http://llvm.org/viewvc/llvm-project?rev=358125&view=rev Log: Fix for different build configurations. Modified: cfe/trunk/test/CodeGen/unreachable-ret.c Modified: cfe/trunk/test/CodeGen/unreachable-ret.c URL: http://ll

[clang-tools-extra] r358127 - clangd-fuzzer: repair the build

2019-04-10 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Apr 10 12:16:14 2019 New Revision: 358127 URL: http://llvm.org/viewvc/llvm-project?rev=358127&view=rev Log: clangd-fuzzer: repair the build The inclusion of private headers of clangd percolates into the fuzzer. Modified: clang-tools-extra/trunk/clangd/fuzzer/CMakeL

RE: [clang-tools-extra] r358103 - clangd: fix the build with XPC

2019-04-10 Thread via cfe-commits
Hi Saleem, This fix does not seem to work on the PS4 linux build bot. Can you take a look? http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/46575 FAILED: tools/clang/tools/extra/clangd/fuzzer/CMakeFiles/clangd-fuzzer.dir/clangd-fuzzer.cpp.o /usr/bin/clang++

[PATCH] D58920: [Modules][PR39287] Consolidate multiple std's

2019-04-10 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I expect that we get this wrong in the same way for all the `SemaDeclRefs` declarations (`StdNamespace`, `StdBadAlloc`, and `StdAlignValT`). I think the place where this is going wrong is `ASTDeclReader::findExisting`, which is assuming that the prior declaration for nor

r358132 - Add IRGen APIs to fetch ctor/dtor helper functions for non-trivial structs.

2019-04-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Apr 10 12:57:20 2019 New Revision: 358132 URL: http://llvm.org/viewvc/llvm-project?rev=358132&view=rev Log: Add IRGen APIs to fetch ctor/dtor helper functions for non-trivial structs. Patch by Tony Allevato! Modified: cfe/trunk/include/clang/CodeGen/CodeGenABITypes

[PATCH] D60161: Expose non-trivial struct helpers for Swift.

2019-04-10 Thread John McCall via Phabricator via cfe-commits
rjmccall closed this revision. rjmccall added a comment. Committed as r358132. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60161/new/ https://reviews.llvm.org/D60161 ___ cfe-commits mailing list cfe-

r358133 - [clang][ASTContext] Try to exit early before loading serialized comments from AST files

2019-04-10 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Apr 10 13:23:33 2019 New Revision: 358133 URL: http://llvm.org/viewvc/llvm-project?rev=358133&view=rev Log: [clang][ASTContext] Try to exit early before loading serialized comments from AST files Loading external comments is expensive. This change probably doesn't apply

r358134 - Check i < FD->getNumParams() before querying

2019-04-10 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Wed Apr 10 13:25:07 2019 New Revision: 358134 URL: http://llvm.org/viewvc/llvm-project?rev=358134&view=rev Log: Check i < FD->getNumParams() before querying Summary: As was already stated in a previous comment, the parameter isn't necessarily referring to one of the DeclCo

[PATCH] D60055: Check i < FD->getNumParams() before querying

2019-04-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358134: Check i < FD->getNumParams() before querying (authored by gribozavr, committed by ). Changed prior to commit: https://reviews.llvm.org/D60055?vs=194152&id=194581#toc Repository: rC Clang CHA

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D59923#1460696 , @MaskRay wrote: > > is that to imply that the first block all do not use split DWARF? > > The first block do not use split DWARF. That doesn't sound like what I'd expect (& would represent a change in behavio

r358136 - Fix a test, NFC

2019-04-10 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Wed Apr 10 14:18:21 2019 New Revision: 358136 URL: http://llvm.org/viewvc/llvm-project?rev=358136&view=rev Log: Fix a test, NFC This test was duplicated, and the last declaration had some syntax errors since the invalid attribute caused the @implementation to be skipped by the

[PATCH] D60539: Add -std=c++14 language standard option to tests that require C++14 default

2019-04-10 Thread Amy Kwan via Phabricator via cfe-commits
amyk created this revision. amyk added reviewers: ilya-biryukov, sammccall, ioeric, hokein, akyrtzi, yvvan. amyk added projects: clang, LLVM. Herald added subscribers: kadircet, arphaman, dexonsmith, jkorous. On one of the platforms that we build on, we build with the CMake macro, `CLANG_DEFAULT_

[PATCH] D60539: Add -std=c++14 language standard option to tests that require C++14 default

2019-04-10 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM Generally it's a good thing for our test suite to be robust against changes to Clang's default language mode. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60539/new/ https://r

[PATCH] D59673: [Driver] Allow setting the DWO name DWARF attribute separately

2019-04-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D59673#1460605 , @aaronpuchert wrote: > Ok, here is an idea. We introduce `-split-dwarf-output` in Clang instead of > `-fsplit-dwarf-dwo-name-attr`. If given, it overrides the output file name > for the Split DWARF file, whi

[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags

2019-04-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Approved pending the LLVM side changes/discussion. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59347/new/ https://reviews.llvm.org/D59347

[PATCH] D60112: [analyzer] Treat write into a top-level parameter variable with destructor as escape.

2019-04-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Okay, I played around with this patch, I see now where this is going! LGTM! > Do you think i should document it somehow? Aye, the description you gave was enlightening, thanks! If you ca

[PATCH] D59555: [analyzer] Add yaml parser to GenericTaintChecker

2019-04-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Sorry, I rushed my earlier comment -- I definitely think that we should get rid of the `UINT_MAX` thing before landing this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59555/new/ https://reviews.llvm.org/D59555 __

  1   2   >