[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:3961 + // linkage so that the linker preserves the symbol name. + llvm::GlobalValue::LinkageTypes LT = + Section.empty() || Section.startswith("__DATA") Hmm, when would you have a metada

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This looks pretty nice to me! Sorry for the wait. Adding @kadircet as hover-guru-in-waiting. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:814 +return Reply(llvm::None); + // FIXME: rende

r359864 - [Sema][ObjC] Disable -Wunused-parameter for ObjC methods

2019-05-03 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri May 3 00:19:46 2019 New Revision: 359864 URL: http://llvm.org/viewvc/llvm-project?rev=359864&view=rev Log: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods The warning isn't very useful when the function is an ObjC method. rdar://problem/41561853 Differential

[PATCH] D61147: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods

2019-05-03 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359864: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods (authored by ahatanak, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 2 inline comments as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:3961 + // linkage so that the linker preserves the symbol name. + llvm::GlobalValue::LinkageTypes LT = + Section.empty() || Section.startswith("__DATA") ---

[clang-tools-extra] r359866 - [clangd] Minor code style cleanups in Protocol.h. NFC

2019-05-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri May 3 01:03:21 2019 New Revision: 359866 URL: http://llvm.org/viewvc/llvm-project?rev=359866&view=rev Log: [clangd] Minor code style cleanups in Protocol.h. NFC - Remove a parameter name that was misspelled (OS used for non-stream parameter) - Declare operator == (T

[PATCH] D61480: Added an AST matcher for declarations that are in the `std` namespace

2019-05-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. gribozavr added a reviewer: alexfh. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D61480 Files: clang-tools-extra/clang-tidy/bugprone/InaccurateEraseCheck.cpp clang/includ

[PATCH] D61454: [CodeGen][ObjC] Remove the leading 'l_' from ObjC symbols and make private symbols in the __DATA segment internal.

2019-05-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7266 + false, + CGM.getTriple().isOSBinFormatMachO() +

[PATCH] D61480: Added an AST matcher for declarations that are in the `std` namespace

2019-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. You should also update Registry.cpp to add this to clang-query and you should also regenerate the documentation by running clang\docs\tools\dump_ast_matchers.py. ===

[PATCH] D60605: [clangd] Revamp textDocument/onTypeFormatting.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 197928. sammccall added a comment. Fix latest case (trailing comment outdented in vscode). Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60605/new/ https://reviews.llvm.org/D60605 Files: clangd/CMakeLists.t

[PATCH] D60605: [clangd] Revamp textDocument/onTypeFormatting.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D60605#1488039 , @ilya-biryukov wrote: > Maybe that's due to some extra logic applied in VSCode on top of what we do. > Let me know if this does not reproduce. Aha, the missing piece was that vscode reindented the cursor t

[PATCH] D60925: [analyzer] Don't display implementation checkers under -analyzer-checker-help, but do under the new flag -analyzer-checker-help-hidden

2019-05-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D60925#1489034 , @o.gyorgy wrote: > Great, at least the users will not enable the debug checkers by accident! > We will check on the CodeChecker side if any configuration needs to be > updated. > > LGTM I committed after c

[PATCH] D61480: Added an AST matcher for declarations that are in the `std` namespace

2019-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Please regenerate the HTML docs using clang/docs/tools/dump_ast_matchers.py. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61480/new/ https://reviews.llvm.org/D61480 ___ cfe-com

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-03 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 197932. Pierre marked 39 inline comments as done. Pierre added a comment. Requested changes have been made in this diff. Some comments/ TODO have not been done yet. They will be done in a next patch. This first patch is meant to start introducing the featur

[PATCH] D60454: [OpenCL] Prevent mangling kernel functions

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 197934. Anastasia marked an inline comment as done. Anastasia added a comment. Removed redundant C linkage checks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60454/new/ https://reviews.llvm.org/D60454 Files: include/clang/Basic/DiagnosticSem

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-05-03 Thread Pierre via Phabricator via cfe-commits
Pierre added inline comments. Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:65 +class QualType { + // How to get the QualType. Can be one of ("field", "func") + string AccessMethod = _AccessMethod; Anastasia wrote: > I don't think "field" and "func" a

[PATCH] D61422: [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse in pointer arithmetic

2019-05-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 197933. baloghadamsoftware added a comment. Dot added to the end of the comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61422/new/ https://reviews.llvm.org/D61422 Files: clang-tidy/bugprone/SizeofExpressionCheck.cpp test/clang

[PATCH] D61422: [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse in pointer arithmetic

2019-05-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D61422#1488081 , @aaron.ballman wrote: > Out of curiosity, have you run this over any large code bases to see what the > false positive and true positive rate is? Neither false, nor true positives found so far. I

[PATCH] D60454: [OpenCL] Prevent mangling kernel functions

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D60454#1488348 , @rjmccall wrote: > I think it would be more reasonable to just change `getDeclLanguageLinkage` > to check for a kernel function. I tried to change `getDeclLanguageLinkage` only but Sema calls `isInExternCC

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D57464#1462342 , @ebevhan wrote: > In D57464#1438213 , @Anastasia wrote: > > > > I think I would lean towards the latter since it means less fudging > > > around with a whole bunch of

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2019-05-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. $ cat orig.cpp #define a(b) switch (b) { #define c(b) \ b: int d; e() { a(d) c(2); c(3) $ debugBuild/bin/clang-tidy orig.cpp -checks=bugprone-branch-clone -- clang-tidy: ../extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:200: clang::DiagnosticBuild

[PATCH] D61318: [Sema] Prevent binding references with mismatching address spaces to temporaries

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 197940. Anastasia added a comment. Updated comments! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61318/new/ https://reviews.llvm.org/D61318 Files: include/clang/AST/Type.h include/clang/Basic/DiagnosticIDs.h include/clang/Basic/Diagnostic

[PATCH] D61475: Update an information about ReSharper C++ and clang-tidy custom binary integration

2019-05-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61475/new/ https://reviews.llvm.org/D61475 __

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:186 void findHover(PathRef File, Position Pos, - Callback> CB); + Callback> CB); sammccall wrote: > Not sure about switching from `Hover` to `

[PATCH] D61438: [ASTImporter] Use llvm::Expected and Error in the importer API

2019-05-03 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 197948. martong added a comment. - Log and do not assert anywhere Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61438/new/ https://reviews.llvm.org/D61438 Files: clang/include/clang/AST/ASTImporter.h clang

[PATCH] D61485: Added an assert in `isConstantInitializer`: initializer lists must be in semantic form

2019-05-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D61485 Files: clang/lib/AST/Expr.cpp Index: clang/lib/AST/Expr.cpp ==

[PATCH] D61486: [Basic] Introduce active dummy DiagnosticBuilder

2019-05-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ...which does not emit anything. This dummy is useful for filtering. Code expecting a DiagnosticBuilder object can get a dummy and report further details, without knowing/checking whether this is nee

[PATCH] D61480: Added an AST matcher for declarations that are in the `std` namespace

2019-05-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked 2 inline comments as done. gribozavr added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:2079 +} + TEST(EqualsBoundNodeMatcher, QualType) { aaron.ballman wrote: > Can you also add a negative test case for:

[PATCH] D61480: Added an AST matcher for declarations that are in the `std` namespace

2019-05-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr updated this revision to Diff 197950. gribozavr added a comment. Regenerated documentation and added one more test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61480/new/ https://reviews.llvm.org/D61480 Files: clang-tools-extra/clang-

[PATCH] D61487: [clang-tidy] Make the plugin honor NOLINT

2019-05-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. The clang-tidy standalone tool implements the NOLINT filtering in ClangTidyDiagnosticConsumer::HandleDiagnostic. For the plugin case no ClangTidyDiagnosticConsumer is set up as it would have

[PATCH] D61487: [clang-tidy] Make the plugin honor NOLINT

2019-05-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. This one depends on https://reviews.llvm.org/D61486 Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61487/new/ https://reviews.llvm.org/D61487 ___ cfe-commits mailing list cfe-commits

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. Thanks! mostly LGTM, only confused about changing symbolcollector to produce a unique header per symbol(where as it was(could) produce multiple headers before). What is the rationale behin

[PATCH] D60678: [libclang] Forward isInline for NamespaceDecl to libclang

2019-05-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Did you forget to push the change to c-index-test.c? Otherwise fine with me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60678/new/ https://reviews.llvm.org/D60678 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D61487: [clang-tidy] Make the plugin honor NOLINT

2019-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Apart from NOLINT handling there's more logic in `ClangTidyDiagnosticConsumer::HandleDiagnostic`, which isn't properly transferred to `ClangTidyContext::diag` in this patch. The logic that is transferred seems to change the behavior w.r.t. notes that can "unmute" ignored

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: kpet, rjmccall. Herald added subscribers: ebevhan, yaxunl. We need to be able to enqueue internal function that initializes global constructors on the host side. Therefore it has to be converted to a kernel. Note, supporting destruction

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:1231 + assert(((FD && CGF) || (!FD && !CGF)) && + "Incorrect use - FD and CFG should either be both null or not!"); + // Create MDNodes that represent

[clang-tools-extra] r359874 - [clangd] Also perform merging for symbol definitions

2019-05-03 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Fri May 3 05:11:14 2019 New Revision: 359874 URL: http://llvm.org/viewvc/llvm-project?rev=359874&view=rev Log: [clangd] Also perform merging for symbol definitions Summary: clangd currently prefers declarations from codegen files. This patch implements that behavior for de

[PATCH] D61126: [clangd] Also perform merging for symbol definitions

2019-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked 2 inline comments as done. Closed by commit rL359874: [clangd] Also perform merging for symbol definitions (authored by kadircet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-

[PATCH] D61495: [clangd] Use more relaxed fuzzy-matching rules for local variables and class members.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. I think the actual rules implemented here are probably *too* relaxed, and we should require the first character to

[PATCH] D61480: Added an AST matcher for declarations that are in the `std` namespace

2019-05-03 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61480/new/ https://reviews.llvm.org/D61480

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D61458#1488970 , @jlebar wrote: > Here's one for you: > > __host__ float bar(); > __device__ int bar(); > __host__ __device__ auto foo() -> decltype(bar()) {} > > > What is the return type of `foo`? :) > > I don't believe t

[PATCH] D61260: [clang-tidy] Extend bugprone-sizeof-expression to check sizeof(pointers to structures)

2019-05-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 2 inline comments as done. baloghadamsoftware added inline comments. Comment at: test/clang-tidy/bugprone-sizeof-expression.cpp:196 typedef const MyStruct TMyStruct; + typedef const MyStruct *PMyStruct; whisperity wrote: > While I

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D61458#1488981 , @rjmccall wrote: > In D61458#1488972 , @hfinkel wrote: > > > In D61458#1488970 , @jlebar wrote: > > > > > Here's one for you: > > >

[PATCH] D61260: [clang-tidy] Extend bugprone-sizeof-expression to check sizeof(pointers to structures)

2019-05-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 197966. baloghadamsoftware added a comment. New tests added. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61260/new/ https://reviews.llvm.org/D61260 Files: clang-tidy/bugprone/SizeofExpressionCheck.cpp test/clang-tidy/bugprone-sizeo

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 197967. sammccall marked 3 inline comments as done. sammccall added a comment. Extract setIncludeLocation() and call it from a more obvious point in the code. Tweak test to make it harder. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION h

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/SymbolCollector.h:130 + // The final spelling is calculated in finish(). + llvm::DenseMap IncludeFiles; + // Indexed macros, to be erased if they turned out to be include guards. kadircet wrote: > This

[PATCH] D61487: [clang-tidy] Make the plugin honor NOLINT

2019-05-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Thanks for the fast comments! In D61487#1489308 , @alexfh wrote: > I suspect that we're missing proper test coverage here. True, ideally all the test scripts would also trigger the plugin case code path. I've started with a modifie

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D61458#1488970 , @jlebar wrote: > Here's one for you: > > __host__ float bar(); > __device__ int bar(); > __host__ __device__ auto foo() -> decltype(bar()) {} > > > What is the return type of `foo`? :) > > I don't believe t

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/SymbolCollector.h:130 + // The final spelling is calculated in finish(). + llvm::DenseMap IncludeFiles; + // Indexed macros, to be erased if they turned out to be include guards. sammccall wrote: > kadir

[PATCH] D61480: Added an AST matcher for declarations that are in the `std` namespace

2019-05-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. gribozavr marked an inline comment as done. Closed by commit rCTE359876: Added an AST matcher for declarations that are in the `std` namespace (authored by gribozavr, committed by ). Changed prior to commit: https://revie

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/include/clang/Sema/Sema.h:10407-10409 bool IsAllowedCUDACall(const FunctionDecl *Caller, const FunctionDecl *Callee) { +if (llvm::any_of(ExprEvalContexts, -

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

r359876 - Added an AST matcher for declarations that are in the `std` namespace

2019-05-03 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Fri May 3 05:50:00 2019 New Revision: 359876 URL: http://llvm.org/viewvc/llvm-project?rev=359876&view=rev Log: Added an AST matcher for declarations that are in the `std` namespace Reviewers: alexfh Subscribers: cfe-commits Tags: #clang Differential Revision: https://r

[clang-tools-extra] r359876 - Added an AST matcher for declarations that are in the `std` namespace

2019-05-03 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Fri May 3 05:50:00 2019 New Revision: 359876 URL: http://llvm.org/viewvc/llvm-project?rev=359876&view=rev Log: Added an AST matcher for declarations that are in the `std` namespace Reviewers: alexfh Subscribers: cfe-commits Tags: #clang Differential Revision: https://r

[PATCH] D61496: Fixed tests where grep was not matching the linefeed

2019-05-03 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea created this revision. aganea added reviewers: rnk, jlebar. aganea added a project: clang. Herald added a subscriber: mstorsjo. aganea edited the summary of this revision. The files below have been synced by Tortoise as CRLF, and it looks like they are like that in the depot as well (I'm s

[PATCH] D61422: [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse in pointer arithmetic

2019-05-03 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. In D61422#1489159 , @baloghadamsoftware wrote: > In D61422#1488081 , @aaron.ballman > wrote: >

[PATCH] D61496: Fixed tests where grep was not matching the linefeed

2019-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. The tests should be fixed to use `FileCheck`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61496/new/ https://reviews.llvm.org/D61496 ___

[PATCH] D61497: [clangd] Introduce a structured hover response

2019-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Change ClangdServer layer to output a structured response for Hover, which can be rendered by client according to

[clang-tools-extra] r359880 - [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri May 3 06:17:29 2019 New Revision: 359880 URL: http://llvm.org/viewvc/llvm-project?rev=359880&view=rev Log: [clangd] Fix header-guard check for include insertion, and don't index header guards. Summary: Both of these attempt to check whether a header guard exists whil

[PATCH] D61136: [Analyzer] Refactor begin and end symbol creation

2019-05-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 197980. baloghadamsoftware retitled this revision from "[Analyzer] IteratorChecker - Ensure end()>=begin() and refactor begin and end symbol creation" to "[Analyzer] Refactor begin and end symbol creation". baloghadamsoftware edited the summary of

[PATCH] D60691: [ARM] Replace fp-only-sp and d16 with fp64 and d32.

2019-05-03 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added inline comments. Comment at: clang/test/Driver/arm-mfpu.c:112 +// CHECK-VFP3XD-NOT: "-target-feature" "+fp64" +// CHECK-VFP3XD-NOT: "-target-feature" "+32" // CHECK-VFP3XD: "-target-feature" "+vfp3" "+d32" ? Comment at: llvm/li

[PATCH] D61497: [clangd] Introduce a structured hover response

2019-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet planned changes to this revision. kadircet added a comment. This is still WIP, just looking for feedbacks on `HoverInfo` struct and overall layering Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61497/new/ https://reviews.llvm.org/D61497

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE359880: [clangd] Fix header-guard check for include insertion, and don't index header… (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D61442?vs=197967&id=197

[PATCH] D61496: Fixed tests where grep was not matching the linefeed

2019-05-03 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Checked-in files should not have CRLF endings, in general (there are a very few exceptions, and these aren't among them). If the checked-in files have LF endings but your tool checks them out with CRLF then that is a problem with your config, or with the tool. Adding d

[PATCH] D61422: [clang-tidy] Extend bugprone-sizeof-expression check to detect sizeof misuse in pointer arithmetic

2019-05-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D61422#1489451 , @aaron.ballman wrote: > Hmm, I am a little bit skeptical about the utility of this compared to the > expense of making the check marginally slower. However, I don't have any > specific objections a

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 197986. ilya-biryukov marked 7 inline comments as done. ilya-biryukov added a comment. - Rebase - Parse client capabilities, send markdown on hover if client supports it - Use inline block for the scope - Add a language for code blocks - Add a FIXME for

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/FormattedString.cpp:41 + +void FormattedString::appendCodeBlock(std::string Code) { + Chunk C; sammccall wrote: > you may want to take the l

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:186 void findHover(PathRef File, Position Pos, - Callback> CB); + Callback> CB); kadircet

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 197989. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Return 'HoverInfo' instead of FormattedString - Reformat Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58547/new/ h

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 197991. ilya-biryukov added a comment. - Remove a FIXME that was fixed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58547/new/ https://reviews.llvm.org/D58547 Files: clang-tools-extra/clangd/CMakeList

[PATCH] D61496: Fixed tests where grep was not matching the linefeed

2019-05-03 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In D61496#1489523 , @probinson wrote: > Checked-in files should not have CRLF endings, in general (there are a very > few exceptions, and these aren't among them). > If the checked-in files have LF endings but your tool checks the

[PATCH] D61496: Fixed tests where grep was not matching the linefeed

2019-05-03 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea updated this revision to Diff 197990. aganea added a comment. Changed to use `FileCheck` instead of `grep` Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61496/new/ https://reviews.llvm.org/D61496 Files: clang/trunk/test/Preprocessor/indent_macro.c cla

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 2 inline comments as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/FormattedString.h:27 + /// Append plain text to the end of the string. + void appendText(std::string Text); + /// Append a block of C++ code. This translat

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:186 void findHover(PathRef File, Position Pos, - Callback> CB); + Callback> CB); ilya-biryukov wrote: > kadircet wrote: > > sammccall wro

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is ready for another round of review. As mentioned in the comments, I think some of the comments are better addressed by a separate change, because they would touch lots of lines in the test. Let me know if I missed anything else. Repository: rG LLVM Githu

[PATCH] D58547: [clangd] Introduce intermediate representation of formatted text

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 197994. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Remove dead test code. NFC Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58547/new/ https://reviews.llvm.org/D58547

[PATCH] D61506: [OpenCL] Switch to C++17

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: kpet. Herald added subscribers: ebevhan, yaxunl. Caused test update as frontend now produces better IR due to copy elision. https://reviews.llvm.org/D61506 Files: include/clang/Frontend/LangStandards.def test/CodeGenOpenCLCXX/addr

[PATCH] D61335: [LibTooling] Add support to Transformer for composing rules as an ordered choice.

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > As for naming, agreed, but does that concern drop away once we have only a > single RewriteRule definition? Sure, that won't be an issue. The use-cases make sense, thanks for the examples. Could you add one or two to the code? Would probably make sense to expre

[PATCH] D61130: [llvm-mc] Add reportWarning() to MCContext

2019-05-03 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. ping! any comments or concerns about this change? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61130/new/ https://reviews.llvm.org/D61130 ___ cfe-commits mailing list cfe-commi

[PATCH] D61495: [clangd] Use more relaxed fuzzy-matching rules for local variables and class members.

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. With two modes of operation, could inconsistencies between the client-side and the server-side filtering become more/less of an issue? Is it true that the clients (VSCode, etc) do something closer to `Lax` mode? Repository: rCTE Clang Tools Extra CHANGES SINCE

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61399#1488897 , @hfinkel wrote: > In D61399#1488366 , @ABataev wrote: > > > In D61399#1488329 , @hfinkel wrote: > > > > > In D61399#1488309

[PATCH] D61495: [clangd] Use more relaxed fuzzy-matching rules for local variables and class members.

2019-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Another fair question is: how much should we care about client-side and server-side filtering consistencty in the first place? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61495/new/ https://reviews.llvm.org/D61495

[PATCH] D61508: [clang-tidy] misc-header-guard : a simple version of llvm-header-guard

2019-05-03 Thread Tom Rix via Phabricator via cfe-commits
trixirt created this revision. trixirt added reviewers: alexfh, bkramer. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. A general use, missing header guard finder and fixer. No style checks. If there is already a working header guard, it is used. If the h

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-03 Thread Kévin Petit via Phabricator via cfe-commits
kpet added inline comments. Comment at: lib/CodeGen/CGDeclCXX.cpp:583 + // In OpenCL global init function should be converted to the kernel to be + // able to initiate its execution from the host side. functions should be -> must be? to the kernel -> to a ker

[PATCH] D61506: [OpenCL] Switch to C++17

2019-05-03 Thread Kévin Petit via Phabricator via cfe-commits
kpet added inline comments. Comment at: include/clang/Frontend/LangStandards.def:162 OpenCL, "OpenCL C++ 1.0", - LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs | OpenCL) + LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 |

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added reviewers: ABataev, rnk, Eugene.Zelenko, akyrtzi, rsmith. Herald added subscribers: jdoerfert, dexonsmith, guansong. Herald added a project: clang. Currently, an OpenMP AST node's recorded location starts at the `omp` token after the `#pragma` token, and

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

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia 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 __attrib

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. If the patch is going to be accepted, then definitely it must be solution #1. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61509/new/ https://reviews.llvm.org/D61509 ___ cfe-c

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-03 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. @ABataev this patch works for both C and C++ and for both math.h and cmath headers. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61399/new/ https://reviews.llvm.org/D61399 ___ cfe-commits

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D61509#1489752 , @ABataev wrote: > If the patch is going to be accepted, then definitely it must be solution #1. I certainly have no objection to that and will be happy to implement it, but can you help me to understand the ra

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61399#1489757 , @gtbercea wrote: > @ABataev this patch works for both C and C++ and for both math.h and cmath > headers. Did you test it for the builtins? like `pow`, `powf` and `powl`? How are the builtins resolved with th

[PATCH] D60379: Make precompiled headers reproducible

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Can this be closed now due to commit r358674? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60379/new/ https://reviews.llvm.org/D60379 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D60678: [libclang] Forward isInline for NamespaceDecl to libclang

2019-05-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. Seems so. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60678/new/ https://reviews.llvm.org/D60678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D61509: [PragmaHandler][OpenMP] Expose `#pragma` location

2019-05-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D61509#1489761 , @jdenny wrote: > In D61509#1489752 , @ABataev wrote: > > > If the patch is going to be accepted, then definitely it must be solution > > #1. > > > I certainly have no ob

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-03 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > At [nvcc] from CUDA 10, that's not acceptable as we are declaring two > functions only differ from the return type. It seems CUDA attributes do not > contribute to the function signature. clang is quite different here. Yes, this is an intentional and more relaxed seman

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-03 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In D61399#1489762 , @ABataev wrote: > In D61399#1489757 , @gtbercea wrote: > > > @ABataev this patch works for both C and C++ and for both math.h and cmath > > headers. > > > Did you test

[PATCH] D61335: [LibTooling] Add support to Transformer for composing rules as an ordered choice.

2019-05-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D61335#1489680 , @ilya-biryukov wrote: > > As for naming, agreed, but does that concern drop away once we have only a > > single RewriteRule definition? > > Sure, that won't be an issue. > > The use-cases make sense, thanks fo

[PATCH] D61508: [clang-tidy] misc-header-guard : a simple version of llvm-header-guard

2019-05-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/HeaderGuardCheck.cpp:21 + StringRef OldGuard) { + if (OldGuard.size()) { +return OldGuard; Please use early return. Comment a

[PATCH] D61518: [clangd] add CLANG_ENABLE_CLANGD option to build clangd. Require threads.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: gribozavr. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D61518 Files: CMakeLists.txt

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-05-03 Thread Richard Townsend (Arm) via Phabricator via cfe-commits
richard.townsend.arm added a comment. Just completed testing... everything seems to be working correctly. So long as the all the tests pass, let's commit! :D CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349

  1   2   >