[clang-tools-extra] r363765 - [clangd] Add ClangdServer accessor for buffer contents

2019-06-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jun 19 00:29:05 2019 New Revision: 363765 URL: http://llvm.org/viewvc/llvm-project?rev=363765&view=rev Log: [clangd] Add ClangdServer accessor for buffer contents Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp clang-tools-extra/trunk/clangd/ClangdSer

[clang-tools-extra] r363766 - Revert "[clangd] Return vector from applyTweak. NFC"

2019-06-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Jun 19 00:29:10 2019 New Revision: 363766 URL: http://llvm.org/viewvc/llvm-project?rev=363766&view=rev Log: Revert "[clangd] Return vector from applyTweak. NFC" This reverts commit r363691. Modified: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp clang-too

[PATCH] D62953: [Syntax] Do not glue multiple empty PP expansions to a single mapping

2019-06-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry, I'm having trouble understanding this patch. Can you try to find some clearer names for the new concepts, or describe how they differ? Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:318 + /// 2. macro name and arguments for macro e

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-19 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D59744#1549675 , @wxiao3 wrote: > Can anyone provide me some small reproducers code for the issue tripped over > by Chromium / Skia? Sorry, I don't have a small repro yet. I'm still working on finding out exactly what's happeni

[PATCH] D57055: [RISCV] Mark TLS as supported

2019-06-19 Thread Lewis Revill 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 rL363776: [RISCV] Mark TLS as supported (authored by lewis-revill, committed by ). Herald added a project: LLVM. Herald adde

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-19 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. The code uses a raw lexer, so it doesn't expand macros. Thus the piece of code quoted will not get the "#if QT_HAS_INCLUDE()" part rewritten. My specific use case is the Icecream distributed build tool which does remote builds in a chroot and so this #if will be false an

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-19 Thread Tor Arne Vestbø via Phabricator via cfe-commits
torarnv added a comment. Just a thought: From the point of view of `-frewrite-includes`, it should technically do full/nested macro expansion right? But from the point of view of Icecream, that would defeat the purpose of using `-frewrite-includes`, since the goal is to embed all includes into

[PATCH] D63330: [clangd] Add Value field to HoverInfo

2019-06-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:733 +else + Init->printPretty(ValueOS, nullptr, Policy); + } sammccall wrote: > why not print the non-evaluated init if it's dependent? not-necessary anymore, sin

[PATCH] D63330: [clangd] Add Value field to HoverInfo

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

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-06-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, a_sidorin, baloghadamsoftware, rnkovacs, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. For th

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-06-19 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. Thanks! Please add tests in `./unittests/Tooling/ReplacementsYamlTest.cpp`. Comment at: clang/include/clang/Tooling/ReplacementsYaml.h:43 +ReplacementText.replace(lineBreakPos, 1, "\n\n"); +// Get the next occurrence from the current p

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-19 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. I've raised https://bugs.llvm.org/show_bug.cgi?id=42319 which suggests the creation of a EMMS insertion pass. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744

[PATCH] D62953: [Syntax] Do not glue multiple empty PP expansions to a single mapping

2019-06-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 7 inline comments as done. ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:318 + /// 2. macro name and arguments for macro expansions. + using SpelledMappings = + llvm::DenseMap; sammccall

[PATCH] D62953: [Syntax] Do not glue multiple empty PP expansions to a single mapping

2019-06-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 205537. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62953/new/ https://reviews.llvm.org/D62953 Files:

[PATCH] D63376: [clang] Small improvments after Adding APValue to ConstantExpr

2019-06-19 Thread Tyker via Phabricator via cfe-commits
Tyker marked an inline comment as done. Tyker added inline comments. Comment at: clang/include/clang/Sema/Sema.h:10298 + bool AllowFold = true, + bool StoreResult = true); ExprResult Verify

[PATCH] D63426: [clangd] Narrow rename to local symbols.

2019-06-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 205540. hokein marked an inline comment as done. hokein added a comment. Switch to a hybrid solution (language semantic + index) to detect "symbol local". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63426/new/

[PATCH] D63426: [clangd] Narrow rename to local symbols.

2019-06-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Use the hybrid approach based on our discussion, the implementation should be fine to review, I'm still working on adding more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63426/new/ https://reviews.llvm.org/D63426

[PATCH] D63426: [clangd] Narrow rename to local symbols.

2019-06-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 205541. hokein added a comment. Remove the unrelated changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63426/new/ https://reviews.llvm.org/D63426 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-

r363788 - [analyzer][NFC][tests] Pre-normalize expected-sarif files

2019-06-19 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Wed Jun 19 04:19:51 2019 New Revision: 363788 URL: http://llvm.org/viewvc/llvm-project?rev=363788&view=rev Log: [analyzer][NFC][tests] Pre-normalize expected-sarif files As discussed in the review for D62952, this patch pre-normalizes the reference expected ou

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-19 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D59744#1549746 , @hans wrote: > In D59744#1549675 , @wxiao3 wrote: > > > Can anyone provide me some small reproducers code for the issue tripped > > over by Chromium / Skia? > > > Sorry, I

[PATCH] D63417: [RISCV] Specify registers used for exception handling

2019-06-19 Thread Edward Jones via Phabricator via cfe-commits
edward-jones updated this revision to Diff 205542. edward-jones retitled this revision from "[WIP][RISCV] Specify registers used for exception handling" to "[RISCV] Specify registers used for exception handling". edward-jones edited the summary of this revision. edward-jones added a comment. Add

r363790 - Revert r363116 "[X86] [ABI] Fix i386 ABI "__m64" type bug"

2019-06-19 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Jun 19 04:34:08 2019 New Revision: 363790 URL: http://llvm.org/viewvc/llvm-project?rev=363790&view=rev Log: Revert r363116 "[X86] [ABI] Fix i386 ABI "__m64" type bug" This introduced MMX instructions in code that wasn't previously using them, breaking programs using 64-bit

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-19 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. I've reverted in r363790 until a solution can be found. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59744/new/ https://reviews.llvm.org/D59744 ___ cfe-commits mailing list cfe-commits@lists.llv

r363776 - [RISCV] Mark TLS as supported

2019-06-19 Thread Lewis Revill via cfe-commits
Author: lewis-revill Date: Wed Jun 19 01:53:46 2019 New Revision: 363776 URL: http://llvm.org/viewvc/llvm-project?rev=363776&view=rev Log: [RISCV] Mark TLS as supported Inform Clang that TLS is implemented by LLVM for RISC-V Differential Revision: https://reviews.llvm.org/D57055 Modified:

r363794 - [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-19 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Wed Jun 19 05:48:22 2019 New Revision: 363794 URL: http://llvm.org/viewvc/llvm-project?rev=363794&view=rev Log: [OpenCL] Split type and macro definitions into opencl-c-base.h Using the -fdeclare-opencl-builtins option will require a way to predefine types and macros such as `

[PATCH] D63256: [OpenCL] Split type and macro definitions into opencl-c-base.h

2019-06-19 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363794: [OpenCL] Split type and macro definitions into opencl-c-base.h (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 205559. Tyker marked 3 inline comments as done. Tyker added a comment. fixed requested changes. > Are you getting errors from running it, or just incorrect output? the issue happens to me even on master so i suppose the input is correct. here is the error repo

[clang-tools-extra] r363798 - [clangd] Correct the MessageType enum values.

2019-06-19 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jun 19 06:14:59 2019 New Revision: 363798 URL: http://llvm.org/viewvc/llvm-project?rev=363798&view=rev Log: [clangd] Correct the MessageType enum values. Modified: clang-tools-extra/trunk/clangd/Protocol.h Modified: clang-tools-extra/trunk/clangd/Protocol.h URL: htt

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D61552#1550080 , @Tyker wrote: > fixed requested changes. > > > Are you getting errors from running it, or just incorrect output? > > the issue happens to me even on master so i suppose the input is correct. > here is the

[PATCH] D62953: [Syntax] Do not glue multiple empty PP expansions to a single mapping

2019-06-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. To clarify, I don't think there are new concepts in this patch. Previously, we only took information from source locations into account when building token buffers. That works fine in most cases, but not enough to find the boundaries of empty macro expansions. In o

[PATCH] D33841: [clang-tidy] redundant 'extern' keyword check

2019-06-19 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel marked an inline comment as done. koldaniel added inline comments. Comment at: clang-tidy/readability/RedundantExternCheck.cpp:43-44 + + if (FD->getBeginLoc().isMacroID()) +return; + lebedev.ri wrote: > koldaniel wrote: > > lebedev.ri wrote: > > >

[PATCH] D63454: [OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC

2019-06-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63454/new/ https://reviews.llvm.org/D63454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D63454: [OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC

2019-06-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63454/new/ https://reviews.llvm.org/D63454 ___ cfe-commits ma

r363801 - [Syntax] Fix a crash when dumping empty token buffer

2019-06-19 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jun 19 06:56:36 2019 New Revision: 363801 URL: http://llvm.org/viewvc/llvm-project?rev=363801&view=rev Log: [Syntax] Fix a crash when dumping empty token buffer Modified: cfe/trunk/lib/Tooling/Syntax/Tokens.cpp cfe/trunk/unittests/Tooling/Syntax/TokensTest.cpp

[clang-tools-extra] r363803 - [clangd] Collect tokens of main files when building the AST

2019-06-19 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jun 19 07:03:19 2019 New Revision: 363803 URL: http://llvm.org/viewvc/llvm-project?rev=363803&view=rev Log: [clangd] Collect tokens of main files when building the AST Summary: The first use of this is a code tweak to expand macro calls. Will later be used to build syn

[PATCH] D62956: [clangd] Collect tokens of main files when building the AST

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363803: [clangd] Collect tokens of main files when building the AST (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r363804 - Allow copy/move assignment operator to be coroutine as per N4775

2019-06-19 Thread Vivek Pandya via cfe-commits
Author: vivekvpandya Date: Wed Jun 19 07:12:19 2019 New Revision: 363804 URL: http://llvm.org/viewvc/llvm-project?rev=363804&view=rev Log: Allow copy/move assignment operator to be coroutine as per N4775 This change fixes https://bugs.llvm.org/show_bug.cgi?id=40997. Reviewers: GorNishanov, rsmit

[PATCH] D63381: Allow copy/move assignment operator to be coroutine as per N4775

2019-06-19 Thread Vivek Pandya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363804: Allow copy/move assignment operator to be coroutine as per N4775 (authored by vivekvpandya, committed by ). Herald added a project: LLVM. Changed prior to commit: https://reviews.llvm.org/D63381

[PATCH] D62960: SVE opaque type for C intrinsics demo

2019-06-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:2680 +break; +#include "clang/Basic/AArch64SVEACLETypes.def" } erik.pilkington wrote: > jfb wrote: > > @rjmccall you probably should re

r363809 - [OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC

2019-06-19 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Wed Jun 19 07:26:43 2019 New Revision: 363809 URL: http://llvm.org/viewvc/llvm-project?rev=363809&view=rev Log: [OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC Summary: This patch strengthens the tests introduced in D63009 by: - addi

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Fixed in D63454 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63009/new/ https://reviews.llvm.org/D63009 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D63454: [OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363809: [OpenMP] Strengthen regression tests for task allocation under nowait depend… (authored by gbercea, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repositor

[PATCH] D61637: [Syntax] Introduce syntax trees

2019-06-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 205589. ilya-biryukov added a comment. - Do the renames Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61637/new/ https://reviews.llvm.org/D61637 Files: clang/include/clang/Tooling/Syntax/BuildTree.h

[PATCH] D62952: [analyzer][tests] Use normalize_sarif in place of diff_sarif

2019-06-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 205590. hubert.reinterpretcast added a comment. Update based on review comments from D62949 as confirmed in D62952 Normalized versions of the reference expected SARIF output f

[PATCH] D63290: Unify DependencyFileGenerator class and DependencyCollector interface

2019-06-19 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea accepted this revision. aganea added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63290/new/ https://reviews.llvm.org/D63290 ___ cfe-commits mailing list cfe-commits@

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-19 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. > $ bin/clang -m32 -O0 /tmp/a.c && ./a.out > -nan > > Before your change, it prints 3.14. I looked through the Intel manual to understand what's happening in detail: When we return from f() with the new ABI, we write to the %mm0 register, and as a side effect: (9.5

[PATCH] D62952: [analyzer] SARIF: Add EOF newline; replace diff_sarif

2019-06-19 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: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62952/new/ https://reviews.llvm.org/D62952 ___

[PATCH] D63366: AMDGPU: Add GWS instruction builtins

2019-06-19 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. I'm now getting test suite failures like this: /home/uweigand/llvm/llvm-head/tools/clang/test/CodeGenOpenCL/builtins-amdgcn.cl:554:3: error: cannot compile this builtin function yet __builtin_amdgcn_ds_gws_init(value, id); Is this supposed to work? I'm not seei

r363819 - Change the way we output templates for JSON AST dumping and dump information about template arguments.

2019-06-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jun 19 08:24:06 2019 New Revision: 363819 URL: http://llvm.org/viewvc/llvm-project?rev=363819&view=rev Log: Change the way we output templates for JSON AST dumping and dump information about template arguments. Previously, we attempted to write out template paramet

r363820 - Add a script to help generate expected test output for dumping the AST to JSON.

2019-06-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jun 19 08:25:24 2019 New Revision: 363820 URL: http://llvm.org/viewvc/llvm-project?rev=363820&view=rev Log: Add a script to help generate expected test output for dumping the AST to JSON. Patch by Abhishek Bhaskar. Added: cfe/trunk/test/AST/gen_ast_dump_json_te

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 205602. Tyker added a comment. i was confuse because the log seemed like an error and it was happening in python2.7 and python3.7 but the actual error that was preventing generating the documentation only occurs in 3.7. it works in python2.7. CHANGES SINCE

[PATCH] D63490: Script for generating AST JSON dump test cases

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r363820; we'll look into integrating the script into lit as you suggested for a possible follow-up. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63490/new/ https://reviews.llvm.org/D63490 __

r363822 - [analyzer] SARIF: Add EOF newline; replace diff_sarif

2019-06-19 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Wed Jun 19 08:27:35 2019 New Revision: 363822 URL: http://llvm.org/viewvc/llvm-project?rev=363822&view=rev Log: [analyzer] SARIF: Add EOF newline; replace diff_sarif Summary: This patch applies a change similar to rC363069, but for SARIF files. The `%diff_sar

[PATCH] D62952: [analyzer] SARIF: Add EOF newline; replace diff_sarif

2019-06-19 Thread Hubert Tong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363822: [analyzer] SARIF: Add EOF newline; replace diff_sarif (authored by hubert.reinterpretcast, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL L

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread Tyker via Phabricator via cfe-commits
Tyker added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6190 +/// cxxDeductionGuideDecl(isExplicit()) will match #6, but not #5. +/// cxxConstructorDecl(isExplicit()) will match #8, but not #7 or #9. +AST_POLYMORPHIC_MATCHER(isExplicit, AST_POLYMORP

[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

2019-06-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, xazax.hun. Herald added a project: clang. Adds functionality for getting semantic highlights Repository: rG LLVM Github Monorepo https://revie

[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

2019-06-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 205608. jvikstrom added a comment. Herald added a subscriber: mgorny. Adds CMakeLists changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/ https://reviews.llvm.org/D63559 Files: clang-tools-ext

r363824 - Revert rL363684 : AMDGPU: Add GWS instruction builtins

2019-06-19 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Jun 19 08:35:45 2019 New Revision: 363824 URL: http://llvm.org/viewvc/llvm-project?rev=363824&view=rev Log: Revert rL363684 : AMDGPU: Add GWS instruction builtins Depends on rL363678 which was reverted at rL363797 Modified: cfe/trunk/include/clang/Basic/Buil

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-19 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. The attribute parts LGTM! You can change the `TargetItaniumCXXABI` part in a follow-up commit if you'd prefer. Comment at: lib/AST/Decl.cpp:3945 +retur

r363826 - [NFC][codeview] Avoid undefined grep in debug-info-codeview-display-name.cpp

2019-06-19 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Wed Jun 19 08:48:12 2019 New Revision: 363826 URL: http://llvm.org/viewvc/llvm-project?rev=363826&view=rev Log: [NFC][codeview] Avoid undefined grep in debug-info-codeview-display-name.cpp vertical-line is not a BRE special character. POSIX.1-2017 XBD Section

[PATCH] D63561: [OpenCL] Improve diagnostic for placement new

2019-06-19 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. Without an explicit declaration for placement new, clang would reject uses of placement new with "default new' is not supported in OpenCL C++", suggesting

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 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 aside from a documentation nit. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6190 +/// cxxDeductionGuideDecl(isExplicit()) will match #6, but

[PATCH] D63535: [clang][AST] MangleUtil: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/include/clang/AST/Mangle.h:19 +#include "clang/AST/DeclCXX.h" +#include "clang/AST/DeclObjC.h" #include "clang/AST/Type.h" Move these into the implementation, forward declarations should be sufficient.

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D57086#1549632 , @domdom wrote: > clang-format the patch Thanks! Do you need someone to commit on your behalf? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57086/new/ https://reviews.llvm.org/D57086 __

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread Tyker via Phabricator via cfe-commits
Tyker marked an inline comment as done. Tyker added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6190 +/// cxxDeductionGuideDecl(isExplicit()) will match #6, but not #5. +/// cxxConstructorDecl(isExplicit()) will match #8, but not #7 or #9. +AST_POLY

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Is it ok now? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63082/new/ https://reviews.llvm.org/D63082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:3306 +def warn_xor_used_as_pow_base_two : Warning< + "result of '%0' is %1, maybe you mean '%2' (%3)?">, + InGroup; We usually use "did you mean" in these kinds of diagn

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63423#1547244 , @regehr wrote: > In D63423#1547216 , @xbolva00 wrote: > > > The only remaining question is, as your said, whether or not to diagnose > > xors in macros. @regerh @j

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6190 +/// cxxDeductionGuideDecl(isExplicit()) will match #6, but not #5. +/// cxxConstructorDecl(isExplicit()) will match #8, but not #7 or #9. +AST_POLYMORPHIC_MATCHER(isExplicit, AST_

[PATCH] D63562: [clangd] Format changes produced by rename

2019-06-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: hokein, kadircet, sammccall. Herald added subscribers: arphaman, jkorous, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63562 Files: clang-tools-extra/clangd/ClangdServ

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5612 +def warn_left_shift_in_bool_context : Warning< + "'<<' in boolean context, maybe you mean '<'?">, + InGroup; I will this line

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5612 +def warn_left_shift_in_bool_context : Warning< + "'<<' in boolean context, maybe you mean '<'?">, + InGroup; xbolva00 wrote:

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. We will be noisy in this case #define IRQ_CHINT4_LEVEL(11 ^ 7) #define IRQ_CHINT3_LEVEL(10 ^ 7) #define IRQ_CHINT2_LEVEL(9 ^ 7) #define IRQ_CHINT1_LEVEL(8 ^ 7) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ htt

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63423#1550563 , @xbolva00 wrote: > We will be noisy in this case > > #define IRQ_CHINT4_LEVEL(11 ^ 7) > #define IRQ_CHINT3_LEVEL(10 ^ 7) > #define IRQ_CHINT2_LEVEL(9 ^ 7) > #define IRQ_CHIN

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. ... But I go thru codesearch and this is just one case I think. I think we should warn in macros... In codesearch case ,they are many more true positives, then false negatives. #define MAX_T_U32 ((2^32)-1) Ouch. CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D63361: Pretend NRVO variables are references so they can be found by debug info

2019-06-19 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:3946 + // the address of the variable. + if (VD->isNRVOVariable()) +Expr.push_back(llvm::dwarf::DW_OP_deref); rnk wrote: > I think we shou

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63423#1550586 , @xbolva00 wrote: > ... But I go thru codesearch and this is just one case I think. > > I think we should warn in macros... In codesearch case ,they are many more > true positives, then false negatives. >

[PATCH] D63361: Pretend NRVO variables are references so they can be found by debug info

2019-06-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:3946 + // the address of the variable. + if (VD->isNRVOVariable()) +Expr.push_back(llvm::dwarf::DW_OP_deref); akhuang wrote: > rnk wrote: > > I think we should check for `getLangOpts()

[PATCH] D63535: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 205625. plotfi added a comment. Addressing @compnerd's feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63535/new/ https://reviews.llvm.org/D63535 Files: clang/include/clang/AST/Mangle.h clang/includ

r363840 - Unify DependencyFileGenerator class and DependencyCollector interface (NFCI)

2019-06-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jun 19 10:07:36 2019 New Revision: 363840 URL: http://llvm.org/viewvc/llvm-project?rev=363840&view=rev Log: Unify DependencyFileGenerator class and DependencyCollector interface (NFCI) Make DependencyFileGenerator a DependencyCollector as it was intended when Dependency

[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

2019-06-19 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 205626. jvikstrom added a comment. Renamed SemanticSymbol to SemanticToken Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/ https://reviews.llvm.org/D63559 Files: clang-tools-extra/clangd/CMakeList

[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

2019-06-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:1 +#include "SemanticHighlight.h" + Header is missing. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:32 + void addSymbol(Decl *D, Sem

[PATCH] D63290: Unify DependencyFileGenerator class and DependencyCollector interface

2019-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363840: Unify DependencyFileGenerator class and DependencyCollector interface (NFCI) (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed p

[PATCH] D63535: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Mangle.h:249-250 +struct ASTNameGenerator { + std::unique_ptr MC; + llvm::DataLayout DL; + Do these still need to be public members? Back when this class was an implementation detail, tha

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-19 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. Icecream's usage of -frewrite-includes is not special, the purpose is always to merge everything necessary for the compilation into one source file that can be later compiled on its own as if the original file was compiled. The #include expansion done during -frewrite-in

[PATCH] D63535: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/include/clang/AST/Mangle.h:248 + +struct ASTNameGenerator { + std::unique_ptr MC; Please make this a `class` and hide the members, exposing just the constructor and the 3 methods as @aaron.ballman pointed out th

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Perhaps we should rewrite all `#if`-like directives to `#if 0` or `#if 1`? Either that or we could emit pragmas indicating the values of later `__has_include`s. Special-casing macros of this specific form is at best a partial solution. Repository: rC Clang CHANGES S

[PATCH] D63535: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added inline comments. Comment at: clang/include/clang/AST/Mangle.h:249-250 +struct ASTNameGenerator { + std::unique_ptr MC; + llvm::DataLayout DL; + aaron.ballman wrote: > Do these still need to be public members

[clang-tools-extra] r363843 - [clangd] Format changes produced by rename

2019-06-19 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jun 19 10:25:24 2019 New Revision: 363843 URL: http://llvm.org/viewvc/llvm-project?rev=363843&view=rev Log: [clangd] Format changes produced by rename Reviewers: hokein, kadircet, sammccall Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, cfe-commits T

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-19 Thread Tor Arne Vestbø via Phabricator via cfe-commits
torarnv added a comment. In D63508#1550668 , @rsmith wrote: > Perhaps we should rewrite all `#if`-like directives to `#if 0` or `#if 1`? If I understand your suggestion correctly, wouldn't the latter break this case? #if QT_HAS_INCLUDE() # include

[PATCH] D63562: [clangd] Format changes produced by rename

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363843: [clangd] Format changes produced by rename (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews

[clang-tools-extra] r363844 - [clangd] Consume error returned by cleanupAndFormat

2019-06-19 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jun 19 10:30:02 2019 New Revision: 363844 URL: http://llvm.org/viewvc/llvm-project?rev=363844&view=rev Log: [clangd] Consume error returned by cleanupAndFormat When called by ClangdServer::applyTweak. No idea how to actually trigger this in practice, so no tests. Modi

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205636. xbolva00 added a comment. Added support to warn in macros. Renamed to -Wxor-used-as-pow. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/cl

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. What I meant with macros was that I don't think we should warn on: #define LEGIT(a, b) ({ work work work; a ^ b; work work work; }) LEGIT(10, 5); If the constants are inline in the macros then sure, warn there. Basically: if you literally wrote `CONSTANT ^ CONSTANT`

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, Curr

r363846 - [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM

2019-06-19 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Wed Jun 19 10:41:30 2019 New Revision: 363846 URL: http://llvm.org/viewvc/llvm-project?rev=363846&view=rev Log: [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM - CodeGen/flatten.c will fail under new PM becausec the new PM AlwaysInliner seems to

[PATCH] D63277: [CUDA][HIP] Don't set "comdat" attribute for CUDA device stub functions.

2019-06-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. SGTM in principle. Folding the stubs would be bad as their addresses are implicitly used to identify the kernels to launch. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4294 setNonAliasAttributes(GD, Fn); SetLLVMFunctionAttributesForDefinition(D,

[PATCH] D62225: [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363846: [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D62225?vs=204198&id=205639#toc

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63423#1550697 , @jfb wrote: > What I meant with macros was that I don't think we should warn on: > > #define LEGIT(a, b) ({ work work work; a ^ b; work work work; }) > > LEGIT(10, 5); > > > If the constants are inli

r363848 - [clang][test] Add missing LambdaTemplateParams test and migrate from getLocStart

2019-06-19 Thread Jordan Rupprecht via cfe-commits
Author: rupprecht Date: Wed Jun 19 10:43:58 2019 New Revision: 363848 URL: http://llvm.org/viewvc/llvm-project?rev=363848&view=rev Log: [clang][test] Add missing LambdaTemplateParams test and migrate from getLocStart These were removed a long time ago in r341573, but this test was missed because

  1   2   3   >