[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Please fix this also for libclang clients. I think it's safe to assume that files might be edited once CXTranslationUnit_PrecompiledPreamble or CXTranslationUnit_CacheCompletionResults is set as flag - that's what clang_defaultEditingTranslationUnitOptions() returns. Repo

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-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. LGTM Comment at: clangd/FSProvider.cpp:33 + return File; +return std::unique_ptr( +new VolatileFile(std::move(std::move(*File; make_

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 176318. yvvan retitled this revision from "[MemoryBuffer] By default assume that all files are volatile to prevent unintended file locks" to "[MemoryBuffer] Add the setter to be able to force disabled mmap". yvvan edited the summary of this revision. yvvan adde

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Support/MemoryBuffer.cpp:42 +static bool MemoryMappingEnabled = true; + Such global flags are a bad idea in general, and really not great in LLVM's case. The editor would set it for "it's" llvm, but that will a

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan marked an inline comment as done. yvvan added inline comments. Comment at: lib/Support/MemoryBuffer.cpp:42 +static bool MemoryMappingEnabled = true; + lebedev.ri wrote: > Such global flags are a bad idea in general, and really not great in LLVM's > case.

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-12-03 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: lib/Parse/ParseExprCXX.cpp:248 // seen a leading '::' or part of a nested-name-specifier. + ParsedType ObjectTypeForCompletion = ObjectType;

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked 4 inline comments as done. courbet added inline comments. Comment at: lib/AST/NestedNameSpecifier.cpp:308-310 +if (ResolveTemplateArguments && getAsRecordDecl()) { + if (const auto *Record = + dyn_cast(getAsRecordDecl())) { aa

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 176320. courbet added a comment. - Fix spurious formating changes - Add tests - Improve readability. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54903/new/ https://reviews.llvm.org/D54903 Files: include/clang/AST/NestedN

[PATCH] D55189: Extract TextNodeDumper class

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Start by moving some utilities to it. It will eventually house dumping of individual nodes (after indentation etc has already been accounted for). Repository: rC Clang https://rev

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D55188 Files: include/clang/AST/ASTDumperUtils.h lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp =

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176323. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55062/new/ https://reviews.llvm.org/D55062 Files: clangd/index/Ba

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.cpp:260 +std::unique_ptr IG = +Index.Sources ? llvm::make_unique(getSubGraph( +URI::create(Path), Index.Sources.getValue())) ilya-biryukov wrote: > What ar

[PATCH] D55190: Move dump of individual comment nodes to NodeDumper

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D55190 Files: include/clang/AST/ASTTextNodeDumper.h lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp ==

[PATCH] D55191: [clangd] Refine the way of checking a declaration is referenced by the written code.

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric. The previous solution (checking the AST) is not a reliable way to determine whether a declaration is explicitly referenced by the source code, we are still

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176327. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Do not introduce a new local var, reuse existing Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55124/new/ https://reviews.llvm.org

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:248 // seen a leading '::' or part of a nested-name-specifier. + ParsedType ObjectTypeForCompletion = ObjectType; ObjectType = nullptr; kadircet wrote: > What about fir

[PATCH] D55136: [OpenCL][Sema] Improve BuildResolvedCallExpr handling of builtins

2018-12-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:5556 // Extract the return type from the (builtin) function pointer type. -auto FnPtrTy = Context.getPointerType(FDecl->getType()); +// FIXME Several builtins still have setType in Sema::CheckBuiltin

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-03 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina updated this revision to Diff 176328. MarinaKalashina added a comment. Fixes: - empty line before 'Standalone tool' - table columns with '+/-' aligned - line width limited to 80 (except for the table) Additions: - clang-tidy-vs plugin - Clangd in the intro, the table, and CLion'

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-12-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 176330. serge-sans-paille edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55121/new/ https://reviews.llvm.org/D55121 Files: bindings/python/clang/cindex.py docs/tools/dump_format_style.py tools/scan-

[PATCH] D55128: [CMake] Store path to vendor-specific headers in clang-headers target property

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348116: [CMake] Store path to vendor-specific headers in clang-headers target property (authored by stefan.graenitz, committed by ). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. We need to keep mmapping the PCH files. In D55139#1315944 , @malaperle wrote: > Hi Ilya. Does this apply to compile_commands.json too? I've seen that problem > for that file a

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. The isIndexedForCodeCompletion is called in the code patch of SymbolCollector. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55206 File

[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

2018-12-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:7232 + if (D.getContext() == DeclaratorContext::TemplateArgContext) +// Do not deduce address space for non-pointee type in template arg. +; ---

r348120 - [OpenCL][Sema] Improve BuildResolvedCallExpr handling of builtins

2018-12-03 Thread Marco Antognini via cfe-commits
Author: mantognini Date: Mon Dec 3 02:58:56 2018 New Revision: 348120 URL: http://llvm.org/viewvc/llvm-project?rev=348120&view=rev Log: [OpenCL][Sema] Improve BuildResolvedCallExpr handling of builtins Summary: This is a follow-up on https://reviews.llvm.org/D52879, addressing a few issues. Thi

[PATCH] D55136: [OpenCL][Sema] Improve BuildResolvedCallExpr handling of builtins

2018-12-03 Thread Marco Antognini via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348120: [OpenCL][Sema] Improve BuildResolvedCallExpr handling of builtins (authored by mantognini, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/CodeComplete.cpp:1654 +default: + return false; +}; nit: maybe just `break` in here Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55206/new/ https://r

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-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. LG Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55206/new/ https://reviews.llvm.org/D55206 __

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. It seems there are still cases where memory-mapping should be preferred, even on Windows, specifically: - PCH files produced by libclang: they are huge, loading them in memory is wasteful and they can clearly be used - (maybe?) PCM (precompiled module) files: they

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176356. kadircet added a comment. - Rebase Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55062/new/ https://reviews.llvm.org/D55062 Files: clangd/index/Background.cpp unittests/clangd/BackgroundIndexTests.

r348123 - [clang] Do not read from 'test/SemaCXX/Inputs' inside 'test/AST'

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 03:26:35 2018 New Revision: 348123 URL: http://llvm.org/viewvc/llvm-project?rev=348123&view=rev Log: [clang] Do not read from 'test/SemaCXX/Inputs' inside 'test/AST' Our integrate relies on test inputs being taken from the same diretory as the test itself. Adde

r348124 - [Analysis] Properly prepare test env in test/Analysis/undef-call.c

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 03:28:17 2018 New Revision: 348124 URL: http://llvm.org/viewvc/llvm-project?rev=348124&view=rev Log: [Analysis] Properly prepare test env in test/Analysis/undef-call.c The test expectes the '%T/ctudir' to be present, but does not create it. Modified: cfe/tr

r348125 - [Analyzer] Actually check for -model-path being a directory

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 03:34:08 2018 New Revision: 348125 URL: http://llvm.org/viewvc/llvm-project?rev=348125&view=rev Log: [Analyzer] Actually check for -model-path being a directory The original patch (r348038) clearly contained a typo and checked for '-ctu-dir' twice. Modified:

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan planned changes to this revision. yvvan added a comment. Ok, no global option. Why not placing your VolatileFSProvider in clang so that libclang could you it too? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54995/new/ https://reviews.llvm.org/D54995 _

Re: r348038 - [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-03 Thread Ilya Biryukov via cfe-commits
Hi Kristóf, There is clearly a typo in checking for -ctu-dir and -model-path being a directory. Instead of checking -model-path, the code was checking for -ctu-dir twice. Landed a fix in r348125. On Fri, Nov 30, 2018 at 10:27 PM Kristof Umann via cfe-commits < cfe-commits@lists.llvm.org> wrote:

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1316437 , @yvvan wrote: > Ok, no global option. > Why not placing your VolatileFSProvider in clang so that libclang could you > it too? Would be happy to, will need to figure out what to do with PCH and PCM file

[PATCH] D54947: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-12-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54947/new/ https://reviews.llvm.org/D54947 ___ cfe-commits mailing lis

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-12-03 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings accepted this revision. michaelplatings added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55121/new/ https://reviews.llvm.org/D55121 ___ cfe-commits mailing

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. In D54995#1316457 , @ilya-biryukov wrote: > In D54995#1316437 , @yvvan wrote: > > > Ok, no global option. > > Why not placing your VolatileFSProvider in clang so that libclang could > > you

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348127: Portable Python script across version (authored by serge_sans_paille, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55121?vs=176330&

r348126 - Portable Python script across Python version

2018-12-03 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Mon Dec 3 04:11:21 2018 New Revision: 348126 URL: http://llvm.org/viewvc/llvm-project?rev=348126&view=rev Log: Portable Python script across Python version Python2 supports the two following equivalent construct raise ExceptionType, exception_value and

r348116 - [CMake] Store path to vendor-specific headers in clang-headers target property

2018-12-03 Thread Stefan Granitz via cfe-commits
Author: stefan.graenitz Date: Mon Dec 3 02:34:25 2018 New Revision: 348116 URL: http://llvm.org/viewvc/llvm-project?rev=348116&view=rev Log: [CMake] Store path to vendor-specific headers in clang-headers target property Summary: LLDB.framework wants a copy these headers. With this change LLDB ca

r348127 - Portable Python script across version

2018-12-03 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Mon Dec 3 04:12:48 2018 New Revision: 348127 URL: http://llvm.org/viewvc/llvm-project?rev=348127&view=rev Log: Portable Python script across version Have all classes derive from object: that's implicitly the default in Python3, it needs to be done explicilty in Py

Re: r348123 - [clang] Do not read from 'test/SemaCXX/Inputs' inside 'test/AST'

2018-12-03 Thread Aaron Ballman via cfe-commits
On Mon, Dec 3, 2018 at 6:29 AM Ilya Biryukov via cfe-commits wrote: > > Author: ibiryukov > Date: Mon Dec 3 03:26:35 2018 > New Revision: 348123 > > URL: http://llvm.org/viewvc/llvm-project?rev=348123&view=rev > Log: > [clang] Do not read from 'test/SemaCXX/Inputs' inside 'test/AST' > > Our integ

[PATCH] D55068: NFC: Simplify dumpStmt child handling

2018-12-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 D55068#1315924 , @steveire wrote: > Aaron, you added tests for the existing behavior which pass after this patch. > Is there anything

r348128 - [AST][NFC] Pack CXXDeleteExpr

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 04:32:32 2018 New Revision: 348128 URL: http://llvm.org/viewvc/llvm-project?rev=348128&view=rev Log: [AST][NFC] Pack CXXDeleteExpr Use the newly available space in the bit-fields of Stmt. This saves 8 bytes per CXXDeleteExpr. NFC. Modified: cfe/trunk/incl

r348129 - Portable Python script across Python version

2018-12-03 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Mon Dec 3 04:41:35 2018 New Revision: 348129 URL: http://llvm.org/viewvc/llvm-project?rev=348129&view=rev Log: Portable Python script across Python version Python3 does not support type destructuring in function parameters. Differential Revision: https://reviews.

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expression. Comment is a bit out of date as this is no longer specific to `stati

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: george.burgess.iv, aaron.ballman, jdenny. Herald added a subscriber: cfe-commits. I have been trying to statically find and analyze all calls to heap allocation functions to determine how many of them use sizes known at compile time v

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 176368. arichardson added a comment. Remove RUN: line added for debugging Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212 Files: include/clang/Basic/Attr.td lib/AST/ExprConsta

[clang-tools-extra] r348130 - [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Dec 3 04:53:19 2018 New Revision: 348130 URL: http://llvm.org/viewvc/llvm-project?rev=348130&view=rev Log: [clangd] Get rid of AST matchers in CodeComplete, NFC Summary: The isIndexedForCodeCompletion is called in the code patch of SymbolCollector. Reviewers: kadircet

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176370. hokein marked an inline comment as done. hokein added a comment. Using break. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55206/new/ https://reviews.llvm.org/D55206 Files: clangd/CodeComplete.cpp I

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348130: [clangd] Get rid of AST matchers in CodeComplete, NFC (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://revie

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2018-12-03 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp updated this revision to Diff 176372. dkrupp added a comment. new undef/defined testcase added CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55125/new/ https://reviews.llvm.org/D55125 Files: clang-tidy/misc/RedundantExpressionCheck.cpp test/clang-tidy/misc-redundant-expressi

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2018-12-03 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp marked 2 inline comments as done. dkrupp added inline comments. Comment at: test/clang-tidy/misc-redundant-expression.cpp:109 #define COND_OP_OTHER_MACRO 9 +#define COND_OP_THIRD_MACRO COND_OP_MACRO int TestConditional(int x, int y) { JonasToth wrote: >

r348131 - [AST] Fix an uninitialized bug in the bits of FunctionDecl

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 05:04:10 2018 New Revision: 348131 URL: http://llvm.org/viewvc/llvm-project?rev=348131&view=rev Log: [AST] Fix an uninitialized bug in the bits of FunctionDecl FunctionDeclBits.IsCopyDeductionCandidate was not initialized. This caused a warning with valgrind.

[clang-tools-extra] r348133 - [clangd] Fix a stale comment, NFC.

2018-12-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Dec 3 05:16:04 2018 New Revision: 348133 URL: http://llvm.org/viewvc/llvm-project?rev=348133&view=rev Log: [clangd] Fix a stale comment, NFC. Modified: clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp clang-tools-extra/trunk/clangd/index/SymbolCollector.h

[PATCH] D54466: [Analyzer] Iterator Checkers - Use the region of the topmost base class for iterators stored in a region

2018-12-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 176374. baloghadamsoftware added a comment. Now I think I understand the terminology and the concept so I could add Doxygen comment. I also refactored the code as you suggested, original code was based on `getBaseRegion()`. CHANGES SINCE LAST AC

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7711-7715 + // It's an integer promotion if the destination type is the promoted + // source type. + return ICE->getCastKind() == CK_IntegralCast && + From->i

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:22 + +namespace ast_dumper { +// Colors used for various parts of the AST dump I'm not certain this namespace is useful, especially when it gets imported at TU scope in ASTDumper

r348134 - [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 05:23:56 2018 New Revision: 348134 URL: http://llvm.org/viewvc/llvm-project?rev=348134&view=rev Log: [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType CallExpr::setNumArgs is the only thing that prevents storing the arguments of a call exp

[PATCH] D54900: [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348134: [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews

[PATCH] D55191: [clangd] Refine the way of checking a declaration is referenced by the written code.

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The **idea** of using the AST-based approach here was really nice, it was less expensive and seemed to clearly look at the semantic. I wonder if there's a way to keep it on the AST level, without looking at the source locations. What are the cases we're trying to

r348135 - [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 05:29:17 2018 New Revision: 348135 URL: http://llvm.org/viewvc/llvm-project?rev=348135&view=rev Log: [CodeComplete] Cleanup access checking in code completion Summary: Also fixes a crash (see the added 'accessibility-crash.cpp' test). Reviewers: ioeric, kadirce

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348135: [CodeComplete] Cleanup access checking in code completion (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https:

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked an inline comment as done. courbet added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expression. aaron.ballman wrote: > Comment i

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176381. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. This revision is now accepted and ready to land. - Keep using memory-mapped files for PCHs - Move once Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTIO

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clangd/FSProvider.cpp:33 + return File; +return std::unique_ptr( +new VolatileFile(std::move(std::move(*File; kadircet wrote: > make_unique? Unfo

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176382. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - s/VolatileFSProvider/VolatileFileSystem Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55139/new/ https://reviews.llv

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > ebevhan wrote: > > > > rjmccall wrote: > > > > > Hmm. So adding a signed integer to an unsign

r348139 - [OpenCL][Sema] Improving formatting

2018-12-03 Thread Marco Antognini via cfe-commits
Author: mantognini Date: Mon Dec 3 06:03:49 2018 New Revision: 348139 URL: http://llvm.org/viewvc/llvm-project?rev=348139&view=rev Log: [OpenCL][Sema] Improving formatting Reformat comment added in r348120 following review https://reviews.llvm.org/D55136. Modified: cfe/trunk/lib/Sema/SemaE

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:22 + +namespace ast_dumper { +// Colors used for various parts of the AST dump aaron.ballman wrote: > I'm not certain this namespace is usefu

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1072 def AllocSize : InheritableAttr { let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[HasFunctionProto]>; Does GCC support writing `alloc_size` on function point

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:22 + +namespace ast_dumper { +// Colors used for various parts of the AST dump steveire wrote: > aaron.ballman wrote: > > I'm not certain this namespace is useful, especially when

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7711-7715 + // It's an integer promotion if the destination type is the promoted + // source type. + return ICE->getCastKind() == CK_IntegralCast && + From->isPromotableIntegerType() && +

[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch

2018-12-03 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Also, `AnalyzerOptions.def` was recently clan-formatted, feel free to run it again after the changes you make in it. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135 __

[PATCH] D32950: Support C++1z features in `__has_extension`

2018-12-03 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Hi Eric, I know this is old, but are you interested in reviving this patch? I don't know enough about clang's extensions to LGTM such a patch (updated for the current code), but would really like to have a way to know if extensions are supported. We just now had people a

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expression. courbet wrote: > aaron.ballman wrote: > > Comment is a bit out of da

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked 2 inline comments as done. ebevhan added inline comments. Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s + aaron.ballman wrote: > aaron.ballman wrote: > > Runn

r348142 - [AArch64] Add command-line option for SSBS

2018-12-03 Thread Pablo Barrio via cfe-commits
Author: pabbar01 Date: Mon Dec 3 06:40:37 2018 New Revision: 348142 URL: http://llvm.org/viewvc/llvm-project?rev=348142&view=rev Log: [AArch64] Add command-line option for SSBS Summary: SSBS (Speculative Store Bypass Safe) is only mandatory from 8.5 onwards but is optional from Armv8.0-A. This p

[PATCH] D54961: [AArch64] Add command-line option for SSBS

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348142: [AArch64] Add command-line option for SSBS (authored by pabbar01, committed by ). Changed prior to commit: https://reviews.llvm.org/D54961?vs=175537&id=176388#toc Repository: rC Clang CHANGE

[PATCH] D53812: [Analyzer] Iterator Checker - Forbid decrements past the begin() and increments past the end() of containers

2018-12-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 176389. baloghadamsoftware added a comment. One error message slightly updated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53812/new/ https://reviews.llvm.org/D53812 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Anal

[PATCH] D54630: Move detection of libc++ include dirs to Driver on MacOS

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54630#1315168 , @arphaman wrote: > So far everything looks fine, but I have to rerun a couple of things due to > infrastructural issues. I should have the final results next Monday. Thanks for the update. Will be waiti

r348145 - [AST][Sema] Remove CallExpr::setNumArgs

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 06:54:03 2018 New Revision: 348145 URL: http://llvm.org/viewvc/llvm-project?rev=348145&view=rev Log: [AST][Sema] Remove CallExpr::setNumArgs CallExpr::setNumArgs is the only thing that prevents storing the arguments in a trailing array. There is only 3 places i

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s + ebevhan wrote: > aaron.ballman wrote: > > aaron.ball

[PATCH] D54902: [AST][Sema] Remove CallExpr::setNumArgs

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348145: [AST][Sema] Remove CallExpr::setNumArgs (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D54902?vs=175434&id=17

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked an inline comment as done. courbet added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expression. aaron.ballman wrote: > courbet w

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Everything looks good, just a single important request about testing the included files do not have any edges in the resulting graph Comment at: clangd/index/Background.cpp:79 + + // Since the strings in direct includes are references to the key

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-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! Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expressi

[PATCH] D53866: [Preamble] Fix preamble for circular #includes

2018-12-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53866/new/ https://reviews.llvm.org/D53866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1316476 , @yvvan wrote: > I don't think removing the flag is a good idea since I can easily assume > cases when user wants mmap and is ready to encounter locks. In our case it > can be an IDE option which behavior

[clang-tools-extra] r348147 - [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 07:21:49 2018 New Revision: 348147 URL: http://llvm.org/viewvc/llvm-project?rev=348147&view=rev Log: [clangd] Avoid memory-mapping files on Windows Summary: Memory-mapping files on Windows leads to them being locked and prevents editors from saving changes to th

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2018-12-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41005/new/ https://reviews.llvm.org/D41005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE348147: [clangd] Avoid memory-mapping files on Windows (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D55139?vs=176382&id=176401#toc Repository: rCTE Clan

[PATCH] D52984: [analyzer] Checker reviewer's checklist

2018-12-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 176403. xazax.hun marked 4 inline comments as done. xazax.hun added a comment. - Addressed further comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52984/new/ https://reviews.llvm.org/D52984 Files: www/analyzer/checker_dev_manual.html I

[PATCH] D55066: [ASan] Minor documentation fix: remove static linking limitation.

2018-12-03 Thread Max Moroz via Phabricator via cfe-commits
Dor1s added a comment. In D55066#1315365 , @eugenis wrote: > Sorry for the delay. > This is wrong, static linking is NOT supported. > You could be confusing it with static linking of asan runtime library to an > executable - that is and has always been

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-12-03 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump! Thanks again for your time. As far as I can tell, it's ready for another round of review! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40988/new/ https://reviews.llvm.org/D40988 ___ cfe-commits mailing

[PATCH] D54881: Prevent Clang-Format from editing leading whitespace on lines outside of the format range

2018-12-03 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump! Thanks for your consideration. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54881/new/ https://reviews.llvm.org/D54881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

Re: r348123 - [clang] Do not read from 'test/SemaCXX/Inputs' inside 'test/AST'

2018-12-03 Thread Ilya Biryukov via cfe-commits
No worries, this was easy to fix. It's impossible to catch those in advance, we miss things like that all the time. On Mon, Dec 3, 2018 at 1:19 PM Aaron Ballman wrote: > On Mon, Dec 3, 2018 at 6:29 AM Ilya Biryukov via cfe-commits > wrote: > > > > Author: ibiryukov > > Date: Mon Dec 3 03:26:35

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Frontend/ASTUnit.h:581 + unsigned getPreambleCounter() const { return PreambleCounter; } + NIT: `getPreambleCounterForTests()`? This is clearly an internal detail, would try giving it a name that

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @ilya-biryukov Hm. What about another way around? - We have user include paths (-I) and report them to the filesystem. This means that we have specific paths under which nothing can be mmaped and everything else can be. In particular cases we can also report -isystem the

  1   2   3   >