[PATCH] D26350: Keep invalid Switch in the AST

2017-07-14 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. Thanks for your review and i'll try to address the concerns. I believe tools that really need valid code relies on the diagnostics and bail out on error. On the other hand, tools that may work on code containing error do a best effort to work on the remaining AST . And

[clang-tools-extra] r308085 - ClangApplyReplacementsTests: Add clangBasic in libdeps.

2017-07-14 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Fri Jul 14 23:32:10 2017 New Revision: 308085 URL: http://llvm.org/viewvc/llvm-project?rev=308085&view=rev Log: ClangApplyReplacementsTests: Add clangBasic in libdeps. r308015 introduced clangBasic to instantiate Diagnostics &c, Modified: clang-tools-extra/trunk/unittes

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-14 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. Generate more IntSymExpr constraints, perform SVal simplification for IntSymExpr and SymbolCast constraints, and create fully symbolic SymExprs https://reviews.llvm.org/D35450 Files: include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Checkers/SValE

[PATCH] D35427: [clang] Fix handling of "%zd" format specifier

2017-07-14 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni added inline comments. Comment at: cfe/trunk/test/FixIt/format.m:240 + int x; + printf("%zn", &x); // expected-warning{{format specifies type 'ssize_t *' (aka 'long *') but the argument has type 'int *'}} + // PrintfSpecifier::fixType doesn't handle %n, so a fix-it is

r308084 - clang/test/FixIt/format.m: Tweak for i686, where ssize_t is int. (r308067)

2017-07-14 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Fri Jul 14 23:14:47 2017 New Revision: 308084 URL: http://llvm.org/viewvc/llvm-project?rev=308084&view=rev Log: clang/test/FixIt/format.m: Tweak for i686, where ssize_t is int. (r308067) Modified: cfe/trunk/test/FixIt/format.m Modified: cfe/trunk/test/FixIt/format.m URL

[PATCH] D35447: [Bash-autocompletion] Add support for -W and -Wno

2017-07-14 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: clang/include/clang/Basic/DiagnosticIDs.h:266 + static std::vector getDiagnosticFlags(); + Please write a function comment just like other member functions in this class. Comment at: clang/lib/Basic/Di

[PATCH] D35448: [Bash-autocompletion] Fixed a bug on bash

2017-07-14 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu accepted this revision. ruiu added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D35448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. This patch adds support for __builtin_cpu_is. I've tried to match the strings supported to the latest version of gcc. I've only tested this on my Macbook so far so I'd appreciate if others would test it. An AMD system would be great. https://reviews.llvm.or

[PATCH] D35448: [Bash-autocompletion] Fixed a bug on bash

2017-07-14 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Maybe I mismerged when merging previous commits by hand. https://reviews.llvm.org/D35448 Files: clang/utils/bash-autocomplete.sh Index: clang/utils/bash-autocomplete.sh === --- clang/utils/bash-

[PATCH] D35447: [Bash-autocompletion] Add support for -W and -Wno

2017-07-14 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. `-W[tab]` will autocomplete warnings defined in this link: https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables https://reviews.llvm.org/D35447 Files: clang/include/clang/Basic/DiagnosticIDs.h clang/lib/Basic/DiagnosticIDs.cpp clang/lib/Driv

r308077 - [ODRHash] Revert r307743 which reverted r307720

2017-07-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Jul 14 19:55:13 2017 New Revision: 308077 URL: http://llvm.org/viewvc/llvm-project?rev=308077&view=rev Log: [ODRHash] Revert r307743 which reverted r307720 Reapply r307720 to allow processing of constructors and destructors. Reuse the diagnostics for CXXMethodDecl for th

[PATCH] D35438: CodeGen: Ensure there is basic block when performing address space cast

2017-07-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh, of course. Sadly, in C/C++ the declaration point of a variable does not necessarily dominate all uses of the variable, so you need to emit the cast immediately after the alloca. Just temporarily move CGF.Builder to that point; hopefully we can assume that this fu

[PATCH] D34654: Allow passing a regex for headers to exclude from clang-tidy

2017-07-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Please regenerate the patch with full context (e.g. as described in llvm.org/docs/Phabricator.html). Repository: rL LLVM https://reviews.llvm.org/D34654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D35438: CodeGen: Ensure there is basic block when performing address space cast

2017-07-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D35438#810234, @rjmccall wrote: > Hmm. It doesn't seem unreasonable for this to require an insertion point as > a precondition. In what situation do we emit addrspace casts after a return? When the alloca address space is not zero and we de

r308073 - [clang] Fix format test

2017-07-14 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Jul 14 18:06:59 2017 New Revision: 308073 URL: http://llvm.org/viewvc/llvm-project?rev=308073&view=rev Log: [clang] Fix format test This diff makes the test FixIt/format.m more robust. The issue was caught by the build bot clang-cmake-thumbv7-a15. Test plan: make chec

r308071 - Try to fix modules build

2017-07-14 Thread Matthias Braun via cfe-commits
Author: matze Date: Fri Jul 14 17:29:25 2017 New Revision: 308071 URL: http://llvm.org/viewvc/llvm-project?rev=308071&view=rev Log: Try to fix modules build Module builds somehow report an ambiguity between clang::Diagnostic and clang::Tooling::Diagnostic. It seems as if one of the additional hea

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-07-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 106735. ahatanak marked 3 inline comments as done. ahatanak added a comment. Address review comments. - Allow attaching "noescape" to pointers other than block pointers. Update the docs accordingly. - Attach attribute "nocapture" to parameters that are anno

[PATCH] D26350: Keep invalid Switch in the AST

2017-07-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D26350#809577, @ogoffart wrote: > The problem i'm trying to solve is precisely to keep as much as possible of > the valid AST in the main AST, despite errors. > I've already done some work with r249982, r272962 and more, and there is >

[PATCH] D35427: [clang] Fix handling of "%zd" format specifier

2017-07-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308067: [clang] Fix handling of "%zd" format specifier (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D35427?vs=106694&id=106726#toc Repository: rL LLVM https://reviews.ll

r308067 - [clang] Fix handling of "%zd" format specifier

2017-07-14 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Jul 14 15:57:00 2017 New Revision: 308067 URL: http://llvm.org/viewvc/llvm-project?rev=308067&view=rev Log: [clang] Fix handling of "%zd" format specifier This diff addresses FIXME in lib/Analysis/PrintfFormatString.cpp and makes PrintfSpecifier::getArgType return the c

[PATCH] D35438: CodeGen: Ensure there is basic block when performing address space cast

2017-07-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Hmm. It doesn't seem unreasonable for this to require an insertion point as a precondition. In what situation do we emit addrspace casts after a return? https://reviews.llvm.org/D35438 ___ cfe-commits mailing list cfe-co

[PATCH] D35427: [clang] Fix handling of "%zd" format specifier

2017-07-14 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: rL LLVM https://reviews.llvm.org/D35427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D35438: CodeGen: Ensure there is basic block when performing address space cast

2017-07-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. There are cases when TargetCodeGenInfo::performAddrSpaceCast is called there is no basic block, e.g. right after a `return` statement. This causes dangling addrspacecast. This patch fixes that. https://reviews.llvm.org/D35438 Files: lib/CodeGen/TargetInfo.cpp

[PATCH] D34475: [AArch64] Add support for __builtin_ms_va_list on aarch64

2017-07-14 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 106701. mstorsjo added a comment. Updated for the new version of https://reviews.llvm.org/D34474. https://reviews.llvm.org/D34475 Files: include/clang-c/Index.h include/clang/Basic/Builtins.def include/clang/Basic/BuiltinsX86.def include/clang/Basi

[PATCH] D35081: [ThinLTO] Allow multiple summary entries.

2017-07-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In https://reviews.llvm.org/D35081#808789, @tejohnson wrote: > In https://reviews.llvm.org/D35081#808517, @mehdi_amini wrote: > > > In https://reviews.llvm.org/D35081#808207, @tejohnson wrote: > > > > > My first option was if any copy is under the threshold, simply pick

[PATCH] D35427: [clang] Fix handling of "%zd" format specifier

2017-07-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 106694. alexshap added a comment. Address comments Repository: rL LLVM https://reviews.llvm.org/D35427 Files: lib/Analysis/PrintfFormatString.cpp test/FixIt/format.m Index: test/FixIt/format.m ==

Re: [PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-07-14 Thread Joerg Sonnenberger via cfe-commits
On Fri, Jul 14, 2017 at 02:40:25PM +, Manuel Klimek via Phabricator via cfe-commits wrote: > klimek added a comment. > > In https://reviews.llvm.org/D34440#809581, @vladimir.plyashkun wrote: > > > > Are there any concerns using the alternative? > > > > I can't say that it's a big problems, b

[PATCH] D34475: [AArch64] Add support for __builtin_ms_va_list on aarch64

2017-07-14 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 106690. mstorsjo edited the summary of this revision. mstorsjo added a comment. Initial attempt at unifying the use of __builtin_ms_va_list and calling conventions between x86_64 and aarch64. This goes with the current (un-unified) version of https://review

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-14 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 106685. malhar1995 added a comment. Suppresses false positives involving functions which perform reference counting. Added relevant test-cases to test/Analysis/retain-release-inline.m https://reviews.llvm.org/D34937 Files: lib/StaticAnalyzer/Checkers/R

[PATCH] D35379: Add documentation for @available

2017-07-14 Thread Nico Weber via Phabricator via cfe-commits
thakis marked an inline comment as done. thakis added inline comments. Comment at: docs/LanguageExtensions.rst:1278 +It is possible use the newest SDK but still build a program that can run on +older macOS and iOS versions, by passing ``-mmacosx-version-info=`` / +``--miphoneos-v

r308048 - Fix flag names in @available docs.

2017-07-14 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Jul 14 11:52:30 2017 New Revision: 308048 URL: http://llvm.org/viewvc/llvm-project?rev=308048&view=rev Log: Fix flag names in @available docs. Modified: cfe/trunk/docs/LanguageExtensions.rst Modified: cfe/trunk/docs/LanguageExtensions.rst URL: http://llvm.org/viewvc/l

[PATCH] D35379: Add documentation for @available

2017-07-14 Thread Sidney San Martín via Phabricator via cfe-commits
sdy added inline comments. Comment at: docs/LanguageExtensions.rst:1278 +It is possible use the newest SDK but still build a program that can run on +older macOS and iOS versions, by passing ``-mmacosx-version-info=`` / +``--miphoneos-version-min=``. thakis wrote

r308046 - Fix link in docs.

2017-07-14 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Jul 14 11:45:36 2017 New Revision: 308046 URL: http://llvm.org/viewvc/llvm-project?rev=308046&view=rev Log: Fix link in docs. Modified: cfe/trunk/include/clang/Basic/AttrDocs.td Modified: cfe/trunk/include/clang/Basic/AttrDocs.td URL: http://llvm.org/viewvc/llvm-proje

[PATCH] D35379: Add documentation for @available

2017-07-14 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I went ahead and landed this in r308044, given that I addressed the nits and removed the possibly contentious bits. Happy to address remaining nits in a follow-up. https://reviews.llvm.org/D35379 ___ cfe-commits mailing lis

r308045 - do more processing in clang-fuzzer (use EmitAssemblyAction)

2017-07-14 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Fri Jul 14 11:42:07 2017 New Revision: 308045 URL: http://llvm.org/viewvc/llvm-project?rev=308045&view=rev Log: do more processing in clang-fuzzer (use EmitAssemblyAction) Summary: use EmitAssemblyAction in clang-fuzzer Reviewers: klimek, rsmith Reviewed By: klimek Subscriber

r308044 - Add documentation for @available

2017-07-14 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Jul 14 11:40:52 2017 New Revision: 308044 URL: http://llvm.org/viewvc/llvm-project?rev=308044&view=rev Log: Add documentation for @available https://reviews.llvm.org/D35379 Modified: cfe/trunk/docs/LanguageExtensions.rst cfe/trunk/include/clang/Basic/AttrDocs.td M

r308043 - Prevent ClangTools from generating dependency files.

2017-07-14 Thread Sterling Augustine via cfe-commits
Author: saugustine Date: Fri Jul 14 11:33:30 2017 New Revision: 308043 URL: http://llvm.org/viewvc/llvm-project?rev=308043&view=rev Log: Prevent ClangTools from generating dependency files. D34304 created a way for ToolInvocations to conditionally generate dependency files, and updated call sites

[PATCH] D35131: Prevent ClangTools from generating dependency files.D34304 created a way for ToolInvocations to conditionally generatedependency files, and updated call sites to preserve the old behav

2017-07-14 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. This sort of thing seems obvious in the future :) -eric https://reviews.llvm.org/D35131 ___ cfe-commits mailing list cfe-commits@lists.llvm.

r308041 - [Dominators] Update Clang's DominatorTree to use the new template argument

2017-07-14 Thread Jakub Kuderski via cfe-commits
Author: kuhar Date: Fri Jul 14 11:26:21 2017 New Revision: 308041 URL: http://llvm.org/viewvc/llvm-project?rev=308041&view=rev Log: [Dominators] Update Clang's DominatorTree to use the new template argument Summary: This patch makes the Clang's DominatorTree use the new IsPostDom template argume

[PATCH] D35427: [clang] Fix handling of "%zd" format specifier

2017-07-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added inline comments. Comment at: lib/Analysis/PrintfFormatString.cpp:539 case LengthModifier::AsSizeT: return ArgType(); // FIXME: ssize_t case LengthModifier::AsPtrDiff: What a

[PATCH] D35426: [clang] Add abi-breaking-checks support to clang

2017-07-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. The test clang/test/Rewriter/objc-modern-metadata-visibility2.mm is listed as UNSUPPORTED since the test contains REQUIRES:abi-breaking-checks but clang does not support this yet. https://reviews.llvm.org/D35426 ___ cfe-com

[PATCH] D35427: [clang] Fix handling of "%zd" format specifier

2017-07-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. This diff addresses FIXME in lib/Analysis/PrintfFormatString.cpp and makes Clang warn on incorrect using of "%zd" format specifier. Test plan: make check-all Repository: rL LLVM https://reviews.llvm.org/D35427 Files: lib/Analysis/PrintfFormatString.cpp te

[PATCH] D35426: [clang] Add abi-breaking-checks support to clang

2017-07-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. You can now use REQUIRES:abi-breaking-checks in clang too https://reviews.llvm.org/D35426 Files: test/lit.cfg test/lit.site.cfg.in Index: test/lit.site.cfg.in === --- test/lit.site.cfg.in +++ tes

[PATCH] D35337: [Solaris] gcc runtime dropped support for .ctors, switch to .init_array

2017-07-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r308038. https://reviews.llvm.org/D35337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r308038 - Unconditionally use .init_array instead of .ctors on Solaris.

2017-07-14 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Jul 14 10:49:52 2017 New Revision: 308038 URL: http://llvm.org/viewvc/llvm-project?rev=308038&view=rev Log: Unconditionally use .init_array instead of .ctors on Solaris. Patch by Fedor Sergeev Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp cfe/trunk/lib/

[PATCH] D35337: [Solaris] gcc runtime dropped support for .ctors, switch to .init_array

2017-07-14 Thread Fedor Sergeev via Phabricator via cfe-commits
fedor.sergeev added a comment. Can anybody commit this for me, please? :-/ https://reviews.llvm.org/D35337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r308037 - [clang] Add getSignedSizeType method

2017-07-14 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Jul 14 10:30:14 2017 New Revision: 308037 URL: http://llvm.org/viewvc/llvm-project?rev=308037&view=rev Log: [clang] Add getSignedSizeType method C11 standard refers to the signed counterpart of the type size_t in the paragraph 7.21.6.1 where it defines d, i, o, u, x, or

[PATCH] D35378: [clang] Add getSignedSizeType method

2017-07-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308037: [clang] Add getSignedSizeType method (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D35378?vs=106496&id=106662#toc Repository: rL LLVM https://reviews.llvm.org/D35

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-14 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 106654. wangxindsb marked an inline comment as done. wangxindsb added a comment. - Change two maps to one map. - Move the declarations of PSM and SVB after the next early return. - Delete the variable std::string DeclName. - Delete last return in reportbug(

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-14 Thread wangxin via Phabricator via cfe-commits
wangxindsb marked 5 inline comments as done. wangxindsb added inline comments. Comment at: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp:72 +REGISTER_MAP_WITH_PROGRAMSTATE(CtorMap, const MemRegion *, bool) +REGISTER_MAP_WITH_PROGRAMSTATE(DtorMap, const MemRegion *, bool) + -

[PATCH] D35379: Add documentation for @available

2017-07-14 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Mostly done, thanks! Comment at: docs/LanguageExtensions.rst:1274 +Objective-C @available +-- sdy wrote: > sdy wrote: > > I think "Objective-C" is redundant, this is already in the ObjC section and > > most of the

[PATCH] D35379: Add documentation for @available

2017-07-14 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 106652. thakis marked 3 inline comments as done. thakis added a comment. sdy comments https://reviews.llvm.org/D35379 Files: docs/LanguageExtensions.rst include/clang/Basic/AttrDocs.td Index: include/clang/Basic/AttrDocs.td =

[PATCH] D35379: Add documentation for @available

2017-07-14 Thread Sidney San Martín via Phabricator via cfe-commits
sdy added inline comments. Comment at: docs/LanguageExtensions.rst:1274 +Objective-C @available +-- I think "Objective-C" is redundant, this is already in the ObjC section and most of the other headers don't start with "Objective-C".

[PATCH] D35379: Add documentation for @available

2017-07-14 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 106650. thakis marked an inline comment as done. thakis added a comment. arphaman comments https://reviews.llvm.org/D35379 Files: docs/LanguageExtensions.rst include/clang/Basic/AttrDocs.td Index: include/clang/Basic/AttrDocs.td

[PATCH] D35379: Add documentation for @available

2017-07-14 Thread Nico Weber via Phabricator via cfe-commits
thakis marked 7 inline comments as done. thakis added a comment. Thanks, all done, much better! Comment at: docs/LanguageExtensions.rst:1347 + +In rare cases, the availability annotation on an API might be overly +conservative. For example, ``[NSProcessInfo processInfo]`` secr

r308035 - [Hexagon] Add intrinsics for data cache operations

2017-07-14 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Fri Jul 14 09:01:24 2017 New Revision: 308035 URL: http://llvm.org/viewvc/llvm-project?rev=308035&view=rev Log: [Hexagon] Add intrinsics for data cache operations This is the clang part, adding support for void __builtin_HEXAGON_Y2_dccleana(void*); void __builtin_HEXAGO

[PATCH] D35406: [clangd] Replace ASTUnit with manual AST management.

2017-07-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D35406#809623, @malaperle wrote: > For synching with what I am doing. I am "only" looking right now at the > modeling of the index and its on-disk storage, not really on the speeding up > of the parsing of the TUs (i.e. the input of the

[PATCH] D35406: [clangd] Replace ASTUnit with manual AST management.

2017-07-14 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D35406#809609, @ilya-biryukov wrote: > The idea is to allows us changing the way we manage/rebuild PCHs and ASTs. > ASTUnit is used for many things and has a fairly complicated and verbose > interface and does a lot of mutations all other t

[PATCH] D35406: [clangd] Replace ASTUnit with manual AST management.

2017-07-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The idea is to allows us changing the way we manage/rebuild PCHs and ASTs. ASTUnit is used for many things and has a fairly complicated and verbose interface and does a lot of mutations all other the place inside it, so making changes to it is not particularly easy

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-07-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D34440#809581, @vladimir.plyashkun wrote: > > Are there any concerns using the alternative? > > I can't say that it's a big problems, but i think that: > //CompilationDatabase.json// is more //CMake //specific format. > It can be generated au

[PATCH] D35406: [clangd] Replace ASTUnit with manual AST management.

2017-07-14 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Could you explain what the goal of this change is? It would help understand how it will impact the indexing work I am currently doing. https://reviews.llvm.org/D35406 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-07-14 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun added a comment. > Are there any concerns using the alternative? I can't say that it's a big problems, but i think that: //CompilationDatabase.json// is more //CMake //specific format. It can be generated automatically by //CMake//, while other build systems may not do it. So

[PATCH] D34654: Allow passing a regex for headers to exclude from clang-tidy

2017-07-14 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added reviewers: aaron.ballman, alexfh, hokein. JonasToth added a comment. i added reviewers, since it seems nobody takes care of this check. remove if this was bad. Repository: rL LLVM https://reviews.llvm.org/D34654 ___ cfe-commits ma

[PATCH] D26350: Keep invalid Switch in the AST

2017-07-14 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. The problem i'm trying to solve is precisely to keep as much as possible of the valid AST in the main AST, despite errors. I've already done some work with r249982, r272962 and more, and there is still a lot to do. But the goal is to keep as much as possible of it. The

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-14 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp:72 +REGISTER_MAP_WITH_PROGRAMSTATE(CtorMap, const MemRegion *, bool) +REGISTER_MAP_WITH_PROGRAMSTATE(DtorMap, const MemRegion *, bool) + I was wondering if there is an

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-07-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D34440#809522, @klimek wrote: > In https://reviews.llvm.org/D34440#809325, @vladimir.plyashkun wrote: > > > Even if i'll change content of //arguments.rsp// to > > `-std=c++11 -Ipath/to/include -Ipath/to/include2 -DMACRO ` > > and will try

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-07-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D34440#808156, @vladimir.plyashkun wrote: > **To discuss:** > ... > By this moment, we unable to use //CompilationDatabase.json// from //CLion > //side which is widely used in //Clang-Tidy// and in other common tools. It would be interestin

[PATCH] D35406: [clangd] Replace ASTUnit with manual AST management.

2017-07-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 106632. ilya-biryukov added a comment. - Replaced TODO with FIXME in a comment. https://reviews.llvm.org/D35406 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h Index: clangd/ClangdUnit.h

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-07-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D34440#809325, @vladimir.plyashkun wrote: > Even if i'll change content of //arguments.rsp// to > `-std=c++11 -Ipath/to/include -Ipath/to/include2 -DMACRO ` > and will try to call clang-tidy process in this way: > `clang-tidy -checks=* ma

[clang-tools-extra] r308022 - [clang-tidy] Minor documentation fix. NFC.

2017-07-14 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Fri Jul 14 05:31:21 2017 New Revision: 308022 URL: http://llvm.org/viewvc/llvm-project?rev=308022&view=rev Log: [clang-tidy] Minor documentation fix. NFC. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/bugprone-undefined-memory-manipulation.rst Modified: clang

[PATCH] D26350: Keep invalid Switch in the AST

2017-07-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. You've explained how you are accomplishing this but not why. I don't think Clang typically keeps erroneous AST nodes in the tree. What kind of problem is this intended to solve? https://reviews.llvm.org/D26350 ___ cf

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2017-07-14 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 106627. baloghadamsoftware added a comment. Type selection simplified, FIXME added. https://reviews.llvm.org/D35110 Files: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp test/Analysis/constraint_manager_negate_difference.c test/Analysis

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-07-14 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 106626. baloghadamsoftware added a comment. Difference of unsigned is converted to signed. https://reviews.llvm.org/D35109 Files: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp test/Ana

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308021: [clang-tidy] Add bugprone-undefined-memory-manipulation check (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D35051?vs=106234&id=106625#toc Repository: rL LLVM https:

[clang-tools-extra] r308021 - [clang-tidy] Add bugprone-undefined-memory-manipulation check

2017-07-14 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Fri Jul 14 05:20:19 2017 New Revision: 308021 URL: http://llvm.org/viewvc/llvm-project?rev=308021&view=rev Log: [clang-tidy] Add bugprone-undefined-memory-manipulation check Patch by: Reka Nikolett Kovacs Differential Revision: https://reviews.llvm.org/D35051 Added: cla

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308020: [clang-tidy] Add bugprone-suspicious-memset-usage check (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D32700?vs=106620&id=106624#toc Repository: rL LLVM https://revi

[clang-tools-extra] r308020 - [clang-tidy] Add bugprone-suspicious-memset-usage check

2017-07-14 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Fri Jul 14 05:15:55 2017 New Revision: 308020 URL: http://llvm.org/viewvc/llvm-project?rev=308020&view=rev Log: [clang-tidy] Add bugprone-suspicious-memset-usage check Created new module bugprone and placed the check in that. Finds memset() calls with potential mistakes in th

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-14 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 106620. rnkovacs marked an inline comment as done. rnkovacs added a comment. Moved comments inside `if` bodies. https://reviews.llvm.org/D32700 Files: clang-tidy/CMakeLists.txt clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-14 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp:57-58 +void SuspiciousMemsetUsageCheck::check(const MatchFinder::MatchResult &Result) { + // Case 1: fill_char of memset() is a character '0'. Probably an integer zero + // was int

[PATCH] D35405: [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.

2017-07-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308016: [index] Added a method indexTopLevelDecls to run indexing on a list of Decls. (authored by ibiryukov). Changed prior to commit: https://reviews.llvm.org/D35405?vs=106604&id=106614#toc Repositor

r308016 - [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.

2017-07-14 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Jul 14 03:47:45 2017 New Revision: 308016 URL: http://llvm.org/viewvc/llvm-project?rev=308016&view=rev Log: [index] Added a method indexTopLevelDecls to run indexing on a list of Decls. Summary: We need it in clangd for refactoring that replaces ASTUnit with manual AST

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with a single comment. Thank you for working on this! Comment at: clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp:74-75 + + // Case 2: fill_char of memset() i

[PATCH] D35349: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output

2017-07-14 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308015: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D35349?vs=106406&id=106609#toc Repository:

[PATCH] D34404: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output

2017-07-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: unittests/Tooling/DiagnosticsYamlTest.cpp:35-45 +TEST(DiagnosticsYamlTest, serializesDiagnostics) { + TranslationUnitDiagnostics TUD; + TUD.MainSourceFile = "path/to/source.cpp"; + + StringMap Fix1 = { +{ + "path/to/source.c

[PATCH] D34404: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output

2017-07-14 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308014: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D34404?vs=106402&id=106608#toc Repository:

[clang-tools-extra] r308015 - [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output

2017-07-14 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jul 14 03:37:46 2017 New Revision: 308015 URL: http://llvm.org/viewvc/llvm-project?rev=308015&view=rev Log: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output Summary: To get properly integration Clang-Tidy with CLion IDE, next things were impl

r308014 - [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output

2017-07-14 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Jul 14 03:37:44 2017 New Revision: 308014 URL: http://llvm.org/viewvc/llvm-project?rev=308014&view=rev Log: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output Summary: To get properly integration Clang-Tidy with CLion IDE, next things were impl

[PATCH] D35186: [analyzer] Add annotation for functions taking user-facing strings

2017-07-14 Thread Erik Verbruggen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308012: [analyzer] Add annotation for functions taking user-facing strings (authored by erikjv). Changed prior to commit: https://reviews.llvm.org/D35186?vs=105792&id=106605#toc Repository: rL LLVM

r308012 - [analyzer] Add annotation for functions taking user-facing strings

2017-07-14 Thread Erik Verbruggen via cfe-commits
Author: erikjv Date: Fri Jul 14 03:24:36 2017 New Revision: 308012 URL: http://llvm.org/viewvc/llvm-project?rev=308012&view=rev Log: [analyzer] Add annotation for functions taking user-facing strings There was already a returns_localized_nsstring annotation to indicate that the return value could

[PATCH] D35405: [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.

2017-07-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM, thanks. https://reviews.llvm.org/D35405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D35405: [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.

2017-07-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 2 inline comments as done. ilya-biryukov added inline comments. Comment at: lib/Index/IndexingAction.cpp:181 +void index::indexTopLevelDecls(ASTContext &Ctx, ArrayRef Decls, +std::shared_ptr DataConsumer, +Index

[PATCH] D35405: [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.

2017-07-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 106604. ilya-biryukov added a comment. - Fixed formatting. https://reviews.llvm.org/D35405 Files: include/clang/Index/IndexingAction.h lib/Index/IndexingAction.cpp Index: lib/Index/IndexingAction.cpp =

[PATCH] D35405: [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.

2017-07-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman requested changes to this revision. arphaman added a comment. This revision now requires changes to proceed. Nice, I will need something like this for the refactoring stress test tool in the future that verifies that the indexer and renaming engine have a similar view of the code. ==

[PATCH] D35406: [clangd] Replace ASTUnit with manual AST management.

2017-07-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Depends on change to cfe (https://reviews.llvm.org/D35405) to compile properly. https://reviews.llvm.org/D35406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D35405: [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.

2017-07-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. For reference: clangd refactoring https://reviews.llvm.org/D35406 https://reviews.llvm.org/D35405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35406: [clangd] Replace ASTUnit with manual AST management.

2017-07-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. This refactoring does not aim to introduce any significant changes to the behaviour of clangd to keep the change as simple as possible. https://reviews.llvm.org/D35406 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h Index: cla

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-07-14 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun added a comment. Even if i'll change content of //arguments.rsp// to `-std=c++11 -Ipath/to/include -Ipath/to/include2 -DMACRO ` and will try to call clang-tidy process in this way: `clang-tidy -checks=* main.cpp -export-fixes=... -- @arguments.rsp` it also has no effect, bec

[PATCH] D35405: [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.

2017-07-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. We need it in clangd for refactoring that replaces ASTUnit with manual AST management. https://reviews.llvm.org/D35405 Files: include/clang/Index/IndexingAction.h lib/Index/IndexingAction.cpp Index: lib/Index/IndexingAction.cpp

r308008 - Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-14 Thread Olivier Goffart via cfe-commits
Author: ogoffart Date: Fri Jul 14 02:23:40 2017 New Revision: 308008 URL: http://llvm.org/viewvc/llvm-project?rev=308008&view=rev Log: Keep the IdentifierInfo in the Token for alternative operator keyword The goal of this commit is to fix clang-format so it does not merge tokens when using the al

[PATCH] D35172: Keep the IdentifierInfo in the Token for alternative operator keyword

2017-07-14 Thread Olivier Goffart via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308008: Keep the IdentifierInfo in the Token for alternative operator keyword (authored by ogoffart). Changed prior to commit: https://reviews.llvm.org/D35172?vs=105816&id=106594#toc Repository: rL L

  1   2   >