[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7851 +if (!getImportDeclErrorIfAny(FromD)) { + // Error encountered for the first time. + // After takeError the error is not usable any more in ToDOrErr. martong wrote: > a_s

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:4743 +} + INSTANTIATE_TEST_CASE_P(ParameterizedTests, ErrorHandlingTest, Maybe add a similar test for namespace and check that the error is not propagated? Repository: rG LL

Re: r364080 - [OPENMP]Fix PR42068: Vla type is not captured.

2019-06-24 Thread Alexey Bataev via cfe-commits
Thanks, will fix this ASAP. Best regards, Alexey Bataev > 24 июня 2019 г., в 1:37, Yvan Roux написал(а): > > Hi Alexey, > > This commit broke ARM bots, logs are availabale here: > > http://lab.llvm.org:8011/builders/clang-cmake-armv8-quick/builds/13627/steps/ninja%20check%201/logs/FAIL%3A%20C

[PATCH] D63607: [DO NOT SUBMIT] [clang][driver] Prototype --driver-mode=fortran support for new flang

2019-06-24 Thread Peter Waller via Phabricator via cfe-commits
peterwaller-arm updated this revision to Diff 206172. peterwaller-arm added a comment. Include full context. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63607/new/ https://reviews.llvm.org/D63607 Files: clang/include/clang/Driver/Driver.h clang/include/clang/Driver/ToolChain.h

[PATCH] D62804: [clangd] Enable extraction of system includes from custom toolchains

2019-06-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:345 CompileCommandsDir); +if (!ClangdServerOpts.QueryDriverGlobs.empty()) + BaseCDB = get

[PATCH] D63497: Add support for openSUSE RISC-V triple

2019-06-24 Thread Andreas Schwab via Phabricator via cfe-commits
schwab updated this revision to Diff 206173. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63497/new/ https://reviews.llvm.org/D63497 Files: clang/lib/Driver/ToolChains/Gnu.cpp llvm/unittests/ADT/TripleTest.cpp Index: llvm/unittests/ADT/TripleTest.cpp ==

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Alexei, I think I still owe you some explanation about this patch. I do consider this patch as one of the most intricate patches regarding ASTImporter. I'd like to answer the following questions in this comment: What is an ImportPath and why do we need to track it? What

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

2019-06-24 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206178. jvikstrom marked 18 inline comments as done. jvikstrom added a comment. Removed LSP specific stuff. Changed a bunch of types and names. Added fixme for macro expansion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

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

2019-06-24 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked 2 inline comments as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:129 +std::vector> getSemanticScopes() { + return {{"variable"}, {"entity.name.function"}}; +} hokein wrote: > This is Textmate

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

2019-06-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:69 + +// Query the index to get other file where the Decl is referenced. +llvm::Optional getOtherRefFile(co

r364174 - [OpenCL] Restore ATOMIC_VAR_INIT

2019-06-24 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Mon Jun 24 03:06:40 2019 New Revision: 364174 URL: http://llvm.org/viewvc/llvm-project?rev=364174&view=rev Log: [OpenCL] Restore ATOMIC_VAR_INIT We accidentally lost the ATOMIC_VAR_INIT and ATOMIC_FLAG_INIT macros in r363794. Also put the `memory_order` typedef back inside a

r364173 - [OpenCL] Remove more duplicates from opencl-c.h

2019-06-24 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Mon Jun 24 03:06:34 2019 New Revision: 364173 URL: http://llvm.org/viewvc/llvm-project?rev=364173&view=rev Log: [OpenCL] Remove more duplicates from opencl-c.h Identified the duplicate declarations using sort lib/Headers/opencl-c.h | uniq -c | grep ' 2' Modified:

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

2019-06-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked 3 inline comments as done. svenvh added inline comments. Comment at: cfe/trunk/lib/Headers/opencl-c.h:13638-13640 -#ifndef ATOMIC_VAR_INIT -#define ATOMIC_VAR_INIT(x) (x) -#endif //ATOMIC_VAR_INIT yaxunl wrote: > kzhuravl wrote: > > Any reason this

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 4 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7851 +if (!getImportDeclErrorIfAny(FromD)) { + // Error encountered for the first time. + // After takeError the error is not usable any more in ToDOrE

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

2019-06-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Implementation LG though please do check that the new test results look useful and not too duplicative Comment at: clang-tools-extra/clangd/XRefs.cpp:723 + // Fill in

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7840 + // Push FromD to the stack, and remove that when we return. + ImportPathBuilder PathRAII(ImportPath, FromD); It is possible to use the `make_scope_exit` instead, this results in

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

2019-06-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 206185. hokein added a comment. More cleanups. 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-tools-extra/cla

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

2019-06-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 206184. hokein marked 11 inline comments as done. hokein added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63426/new/ https://reviews.llvm.org/D63426 Files: clang-tools-e

[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-06-24 Thread Russell Gallop via Phabricator via cfe-commits
russell.gallop added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:67 // Only include sections longer than TimeTraceGranularity msec. -if (duration_cast(E.Duration).count() > TimeTraceGranularity) This comment looks wrong since this ch

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7851 +if (!getImportDeclErrorIfAny(FromD)) { + // Error encountered for the first time. + // After takeError the error is not usable any more in ToDOrErr. martong wrote: > bal

[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-06-24 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev updated this revision to Diff 206187. anton-afanasyev added a comment. Changed comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63325/new/ https://reviews.llvm.org/D63325 Files: clang/lib/CodeGen/CodeGenAction.cpp clang/te

[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-06-24 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev marked 2 inline comments as done. anton-afanasyev added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:67 // Only include sections longer than TimeTraceGranularity msec. -if (duration_cast(E.Duration).count() > TimeTraceGranularity)

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

2019-06-24 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 206190. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D33841/new/ https://reviews.llvm.org/D33841 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantExternCheck.cpp c

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

2019-06-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:315 private: + /// Maps from a start location to an end location of transformations performed + /// by t

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 206193. kadircet added a comment. - Introduce a new wrapper CDB that adds target and mode info to returned compile commands Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63194/new/ https://reviews.llvm.org/D6

[PATCH] D63708: [clangd] Fix NestedNameSpecifierLoc in SelectionTree

2019-06-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D63708 Files: clangd/Selection.cpp clangd/uni

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D63194#1553649 , @ilya-biryukov wrote: > The only suggestion from me would be maybe try moving this to a layer that > would also make also benefit other compilation-db-based things like > `clang-tidy`, etc? > Any ideas on h

[PATCH] D63710: [SYCL] Re-use OpenCL sampler in SYCL device mode

2019-06-24 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added subscribers: cfe-commits, Anastasia, ebevhan, yaxunl. Herald added a project: clang. Fznamznon added reviewers: bader, Anastasia. sampler_t type name is replaced with __ocl_sampler_t to avoid potential collisions with user types. Selectively enabled a

[PATCH] D63194: [clangd] Link in target infos and pass target and mode while invoking driver

2019-06-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks, this looks very good! Leaving a few nitpicky comments, but nothing important really. Two more general NITs: - could we update the title and description of this revision to mirror that it focuses on code in tooling rather than in clangd? - maybe land the cl

[clang-tools-extra] r364180 - [clangd] Improve SelectionTree string representation

2019-06-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jun 24 06:01:28 2019 New Revision: 364180 URL: http://llvm.org/viewvc/llvm-project?rev=364180&view=rev Log: [clangd] Improve SelectionTree string representation Modified: clang-tools-extra/trunk/clangd/Selection.cpp Modified: clang-tools-extra/trunk/clangd/Selecti

[PATCH] D63714: [clangd] Cleanup the duplicated getTokenRange.

2019-06-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Also lift it to SourceCode.h, so that it can be used in other places (semantic code highlighting). Repository: rG LLVM Github Mon

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

2019-06-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 206210. kadircet marked 9 inline comments as done and an inline comment as not 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.o

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

2019-06-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:920 + {R"cpp( +constexpr int add(int a, int b) { return a + b; } +int [[b^ar]] = add(1, 2); sammccall wrote: > constexpr may not be required here, I

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

2019-06-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:11 + +// Collects all semantic symbols in an ASTContext. Symbols on line i are always +// in front of symbols on line i+1 The comment is out of date now. C

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-06-24 Thread Dmitry Vyukov via Phabricator via cfe-commits
dvyukov added a comment. I assume you tried to run it on the kernel. Please post the current output somewhere. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59963/new/ https://reviews.llvm.org/D59963

[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.

2019-06-24 Thread Dmitry Vyukov via Phabricator via cfe-commits
dvyukov added a comment. Re more checks. I guess we can borrow some from the existing checkers: https://www.kernel.org/doc/html/v4.12/dev-tools/sparse.html https://bottest.wiki.kernel.org/coccicheck https://lwn.net/Articles/752408/ https://lwn.net/Articles/691882/ They do some checks very well. B

Re: r363985 - [test][Driver] Fix Clang :: Driver/cl-response-file.c

2019-06-24 Thread Rainer Orth via cfe-commits
Hi Douglas, > I figured it out. Because you are using printf, you no longer need the > '\\c'. If I use the following RUN line, the test passes on both > Windows/linux (I don't have solaris to test unfortunately): > > // RUN: printf '%%s\n' '/I%S\Inputs\cl-response-file\ /DFOO=2' > %t.rsp I've now

r364183 - [CUDA][HIP] Don't set comdat attribute for CUDA device stub functions.\nDifferential Revision: https://reviews.llvm.org/D63277

2019-06-24 Thread Konstantin Pyzhov via cfe-commits
Author: kpyzhov Date: Mon Jun 24 07:40:20 2019 New Revision: 364183 URL: http://llvm.org/viewvc/llvm-project?rev=364183&view=rev Log: [CUDA][HIP] Don't set comdat attribute for CUDA device stub functions.\nDifferential Revision: https://reviews.llvm.org/D63277 Modified: cfe/trunk/lib/CodeGen

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

2019-06-24 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" +#include "SourceCode.h" License header was not added despite comment was marked as done. Comment at: clang-tools

[PATCH] D63718: [ADT] Implement llvm::bsearch() with std::partition_point()

2019-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: EricWF, sammccall. Herald added subscribers: llvm-commits, cfe-commits, kadircet, arphaman, dexonsmith, jkorous. Herald added projects: clang, LLVM. Deprecate the begin-end form because the standard std::partition_point can be easily used as

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206218. martong marked 2 inline comments as done. martong added a comment. - Assert that we set the error only once - Remove the macro and use std::string.op+ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62373/

[PATCH] D62373: [ASTImporter] Store import errors for Decls

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 4 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7851 +if (!getImportDeclErrorIfAny(FromD)) { + // Error encountered for the first time. + // After takeError the error is not usable any more in ToDOrE

[PATCH] D63718: [ADT] Implement llvm::bsearch() with std::partition_point()

2019-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 206220. MaskRay edited the summary of this revision. MaskRay added a comment. Delete the begin-end form Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63718/new/ https://reviews.llvm.org/D63718 Files: clang-t

r364189 - [OPENMP]Relax the test checks to pacify 32bit buildbots, NFC.

2019-06-24 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jun 24 08:30:20 2019 New Revision: 364189 URL: http://llvm.org/viewvc/llvm-project?rev=364189&view=rev Log: [OPENMP]Relax the test checks to pacify 32bit buildbots, NFC. Modified: cfe/trunk/test/OpenMP/parallel_codegen.cpp Modified: cfe/trunk/test/OpenMP/parallel_co

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206223. martong added a comment. - Remove the macro and use std::string.op+ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63603/new/ https://reviews.llvm.org/D63603 Files: clang/lib/AST/ASTImporter.cpp cla

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet. After evaluation it would be an Unknow

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. - Make the test fail. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63720/new/ https://reviews.llvm.org/D63720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 206227. Charusso added a comment. - Make the test pass. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63720/new/ https://reviews.llvm.org/D63720 Files: clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp clang/test/Analysis/symbol-escape.cpp Index

[PATCH] D63714: [clangd] Cleanup the duplicated getTokenRange.

2019-06-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/XRefs.cpp:926 for (const auto &Ref : MainFileRefs) { Location Result; +if (auto Range = nit: move de

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206228. martong added a comment. - Remove the macro and use std::string.op+ - We may set up an error twice in case of a cycle, thus remove the assert Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/ htt

[PATCH] D62804: [clangd] Enable extraction of system includes from custom toolchains

2019-06-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 206231. kadircet marked 9 inline comments as done. kadircet added a comment. - Rename SystemIncludeExtractor to QueryDriverDatabase - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62804/new/ h

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8647 - assert(ImportDeclErrors.find(From) == ImportDeclErrors.end() && - "Setting import error allowed only once for a Decl."); ImportDeclErrors[From] = Error; We should not rem

r364193 - [analyzer] Fix JSON dumps for ExplodedNodes

2019-06-24 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Mon Jun 24 09:06:44 2019 New Revision: 364193 URL: http://llvm.org/viewvc/llvm-project?rev=364193&view=rev Log: [analyzer] Fix JSON dumps for ExplodedNodes Summary: - Now we could see the `has_report` property in `trim-egraph` mode. - This patch also removes the trailing co

[PATCH] D63436: [analyzer] Fix JSON dumps for ExplodedNodes

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Charusso marked an inline comment as done. Closed by commit rL364193: [analyzer] Fix JSON dumps for ExplodedNodes (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

r364197 - [analyzer] print() JSONify: ProgramPoint revision

2019-06-24 Thread Csaba Dabis via cfe-commits
Author: charusso Date: Mon Jun 24 09:19:39 2019 New Revision: 364197 URL: http://llvm.org/viewvc/llvm-project?rev=364197&view=rev Log: [analyzer] print() JSONify: ProgramPoint revision Summary: Now we also print out the filename with its path. Reviewers: NoQ Reviewed By: NoQ Subscribers: xazax

[PATCH] D63438: [analyzer] print() JSONify: ProgramPoint revision

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364197: [analyzer] print() JSONify: ProgramPoint revision (authored by Charusso, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

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

2019-06-24 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl added inline comments. Comment at: cfe/trunk/lib/Headers/opencl-c.h:13638-13640 -#ifndef ATOMIC_VAR_INIT -#define ATOMIC_VAR_INIT(x) (x) -#endif //ATOMIC_VAR_INIT svenvh wrote: > yaxunl wrote: > > kzhuravl wrote: > > > Any reason this piece of code got c

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206244. martong added a comment. - Add back an assertion in setImportDeclError(), remove the condition in Import() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/ https://reviews.llvm.org/D62375 File

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. These bitwise operations only affects the part which we do not analyze. My previous approach to solve this problem caused one false positive, so we should be that strict. Just in case for the future developments, copy-pasted here: // If we have a bitwise operation (e

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8647 - assert(ImportDeclErrors.find(From) == ImportDeclErrors.end() && - "Setting import error allowed only once for a Decl."); ImportDeclErrors[From] =

r364201 - [clang][NewPM] Remove exception handling before loading pgo sample profile data

2019-06-24 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Mon Jun 24 09:44:27 2019 New Revision: 364201 URL: http://llvm.org/viewvc/llvm-project?rev=364201&view=rev Log: [clang][NewPM] Remove exception handling before loading pgo sample profile data This patch ensures that SimplifyCFGPass comes before SampleProfileLoaderPass on

[PATCH] D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data

2019-06-24 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364201: [clang][NewPM] Remove exception handling before loading pgo sample profile data (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D63626?vs=206065&id=20

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

2019-06-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 206246. ilya-biryukov marked 10 inline comments as done. ilya-biryukov added a comment. - Address comments, document code. - s/Expansion/CollectedExpansions. - Added FIXMEs for macro arguments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

2019-06-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/Tokens.h:319 + /// 2. macro name and arguments for macro expansions. + using PPExpansions = llvm::DenseMap; class Builder; sammccall wrote: > do I understand right that thi

r364202 - [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-24 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Mon Jun 24 09:49:18 2019 New Revision: 364202 URL: http://llvm.org/viewvc/llvm-project?rev=364202&view=rev Log: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM For CodeGenOpenCL/convergent.cl, the new PM produced a slightly different fo

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

2019-06-24 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206247. jvikstrom marked 7 inline comments as done. jvikstrom added a comment. Fixed tests and edge case with function declarations without names for parameters. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

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

2019-06-24 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:75 + SemanticSymbolASTCollector Collector(Ctx); + Collector.TraverseAST(Ctx); + return Collector.getSymbols(); hokein wrote: > let's move the above lines into `Semantic

[PATCH] D63462: [analyzer] JsonSupport: Escape escapes

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 206248. Charusso added a comment. - Test case added. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63462/new/ https://reviews.llvm.org/D63462 Files: clang/include/clang/Basic/JsonSupport.h clang/test/Analysis/dump_egraph.c Index: clang/test/

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 4 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:1724 + }; + DefinitionCompleter CompleterRAII(To); jkorous wrote: > You might consider using just a lambda with `llvm::make_scope_exit`. > > ht

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206250. martong marked 2 inline comments as done. martong added a comment. - Use make_scope_exit - Add test ErrorIsNotPropagatedFromMemberToNamespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63603/new/ htt

[PATCH] D63726: [analyzer] print() JSONify: Create pointers

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Charusso added a parent revision: D63462: [analyzer] JsonSupport

[PATCH] D63727: [analyzer] print() JSONify: Stable LocationContext IDs

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. - Repository: rC Clang https://reviews.llvm.org/D63727 Fi

[PATCH] D63093: [analyzer] WIP: MallocChecker: Release temporary CXXNewExpr

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso abandoned this revision. Charusso added a comment. The seen error solved by D63720 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63093/new/ https://reviews.llvm.org/D63093

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 206253. ymandel marked an inline comment as done. ymandel added a comment. Added tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63288/new/ https://reviews.llvm.org/D63288 Files: clang-tools-extra/clang

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8668 + +bool ASTImporter::ImportPathTy::hasCycleAtBack() { + return Aux[Nodes.back()] > 1; a_sidorin wrote: > const? Thanks! I made to be const. Comment at: clang/lib/AST

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7892 -// Error encountered for the first time. -assert(!getImportDeclErrorIfAny(FromD) && We may set up an error multiple times now, but t

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-06-24 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 206254. martong marked 5 inline comments as done. martong added a comment. - Use make_scope_exit - Make hasCycleAtBack const Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/ https://reviews.llvm.org/D62

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 206258. ymandel marked 4 inline comments as done. ymandel added a comment. Adjust comments in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63288/new/ https://reviews.llvm.org/D63288 Files: clang-tools

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-24 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp:33 +StringRef Name, ClangTidyContext *Context) +: ClangTidyCheck(Name, Context), Rule(MakeRule(getLangOpts(), Options)) { + assert(llvm::all_of(Rule.Cases, [](cons

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-24 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: include/clang/Basic/Attr.td:954 +def CUDADeviceShadow : InheritableAttr { + let Spellings = [GNU<"device_shadow">, Declspec<"__device_shadow__">]; `HIPDeviceShadow` ? Comment at: include/clang/Basic/Att

[PATCH] D63720: [analyzer] ExprEngine: Escape pointers in bitwise operations

2019-06-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp:123 state = state->BindExpr(B, LCtx, Result); } I have seen we are producing tons of Unknowns and I am still not

[PATCH] D62970: [clang-doc] De-duplicate comments and locations

2019-06-24 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. LGTM Comment at: clang-tools-extra/clang-doc/Representation.h:66 + + bool operator<(const CommentInfo &Other) const { +auto FirstCI = std::tie(Kind, Text, Name, Direction, ParamName, CloseName, We should be explicit about what

[PATCH] D63518: WIP BitStream reader: propagate errors

2019-06-24 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. `check-clang` now passes all tests, so the patch is pretty much ready to review. I'll get started on the other parts of LLVM that use this API. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63518/new/ https://reviews.llvm.org/

[PATCH] D63276: [AST] Add FunctionDecl::getParametersSourceRange()

2019-06-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Decl.h:2331 + /// Attempt to compute an informative source range covering the + /// function parameters. This omits the ellipsis of a variadic function. + So

[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-24 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 206273. jcai19 added a comment. Fix typos and formatting issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63623/new/ https://reviews.llvm.org/D63623 Files: clang-tools-extra/clang-tidy/android/AndroidTid

[libunwind] r364217 - Merging r360861:

2019-06-24 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Mon Jun 24 11:40:58 2019 New Revision: 364217 URL: http://llvm.org/viewvc/llvm-project?rev=364217&view=rev Log: Merging r360861: r360861 | mstorsjo | 2019-05-15 23:49:13 -0700 (Wed, 15 May 2019) | 13 l

[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D63623#1552716 , @jcai19 wrote: > In D63623#1552679 , @lebedev.ri > wrote: > > > Why is this in android module? > > Is that android-specific behavior, or posix? > > > I implemented i

[PATCH] D63623: [clang-tidy] Add a check on expected return values of posix functions (except posix_openpt) in Android module.

2019-06-24 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 10 inline comments as done. jcai19 added inline comments. Comment at: clang-tools-extra/clang-tidy/android/PosixReturnCheck.cpp:23 + binaryOperator( + hasOperatorName("<"), + hasLHS(callExpr(callee(functionDecl(matchesName("^::posix_"), unles

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: include/clang/Basic/Attr.td:955 +def CUDADeviceShadow : InheritableAttr { + let Spellings = [GNU<"device_shadow">, Declspec<"__device_shadow__">]; + let Subjects = SubjectList<[Var]>; ---

[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

2019-06-24 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 206274. yonghong-song added a comment. do not use ctx.getParents() to check whether a GEP candidate inside a preserve_access_index. instead, mark the region upfront. Add the new clang intrinsic into the language doc. Repository: rC Clang CHANGES S

[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

2019-06-24 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song marked an inline comment as not done. yonghong-song added a comment. @eli.friedman I removed the usage of astcontext getParents() stuff. Instead, I mark the region upfront. I also added the intrinsic __builtin_preserve_access_index() into clang lang extention doc. Could you take a

[PATCH] D63734: Update CODE_OWNERS.txt for clang-doc

2019-06-24 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added a reviewer: klimek. juliehockett added a project: clang-tools-extra. https://reviews.llvm.org/D63734 Files: clang-tools-extra/CODE_OWNERS.TXT Index: clang-tools-extra/CODE_OWNERS.TXT ===

[PATCH] D63180: [clang-doc] Adds HTML generator

2019-06-24 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. I got to the 'genHTML' functions and I decided that this general approach is not great. What if we have a baby internal representation of an HTML tree, generate instances of that, and then implement a render method on that (preferably one that handles indentation

[clang-tools-extra] r364222 - [clang-doc] Add basic support for templates and typedef

2019-06-24 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Mon Jun 24 12:31:02 2019 New Revision: 364222 URL: http://llvm.org/viewvc/llvm-project?rev=364222&view=rev Log: [clang-doc] Add basic support for templates and typedef In serialize::parseBases(...), when a base record is a template specialization, the specialization was

[PATCH] D63367: [clang-doc] Add basic support for templates and typedef

2019-06-24 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364222: [clang-doc] Add basic support for templates and typedef (authored by juliehockett, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63678: Fix test Clang :: Driver/cl-response-file.c for Solaris

2019-06-24 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63678/new/ https://reviews.llvm.org/D63678 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D48680: Add missing visibility annotation for __base

2019-06-24 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. @ldionne Does Peter's example answer your questions? Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48680/new/ https://reviews.llvm.org/D48680 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-06-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaSYCL/device-attributes.cpp:3 + +[[clang::sycl_kernel]] int gv2 = 0; // expected-warning {{'sycl_kernel' attribute only applies to functions}} +__attribute((sycl_kernel)) int gv3 = 0; // expected-warning {{'sycl_kern

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-24 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Generally this LGTM. I'll take another pass after the comments are addressed. Comment at: clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp:19 + +static const llvm::StringRef CheckMessage = +"Googletest APIs named with 'case' are de

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-24 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. In D62977#1540184 , @lebedev.ri wrote: > Without seeing the tests - what version checks does this have? > It shouldn't fire if the go

  1   2   >