[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. ping Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [clang-tools-extra] r329448 - [clang-tidy] Check if grand-..parent's virtual method was called instead of overridden parent's.

2018-04-09 Thread Mikael Holmén via cfe-commits
Hi Zivony, From this patch: > +void ParentVirtualCallCheck::check(const MatchFinder::MatchResult &Result) { > + const auto *MatchedDecl = Result.Nodes.getNodeAs("call"); > + assert(MatchedDecl); > + The code above yields a warning when compiled without asserts since MatchedDecl is not us

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-04-09 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 abandoned this revision. avt77 added a comment. It is not a bug. https://reviews.llvm.org/D44559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r329550 - Fix unused variable warning.

2018-04-09 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Mon Apr 9 00:26:42 2018 New Revision: 329550 URL: http://llvm.org/viewvc/llvm-project?rev=329550&view=rev Log: Fix unused variable warning. Modified: clang-tools-extra/trunk/clang-tidy/bugprone/ParentVirtualCallCheck.cpp Modified: clang-tools-extra/trunk/clang-tidy/b

Re: [clang-tools-extra] r329550 - Fix unused variable warning.

2018-04-09 Thread Zinovy Nis via cfe-commits
Thanks, Chandler. assert(Result.Nodes.getNodeAs("call")); would also be fine. пн, 9 апр. 2018 г. в 10:29, Chandler Carruth via cfe-commits < cfe-commits@lists.llvm.org>: > Author: chandlerc > Date: Mon Apr 9 00:26:42 2018 > New Revision: 329550 > > URL: http://llvm.org/viewvc/llvm-project?r

Re: [clang-tools-extra] r329550 - Fix unused variable warning.

2018-04-09 Thread Chandler Carruth via cfe-commits
I have no opinion other than removing the warning. =D This seemed to be the idiomatic pattern in the rest of LLVM and Clang. If someone wants to adjust this locally, by all means. On Mon, Apr 9, 2018 at 12:47 AM Zinovy Nis via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Thanks, Chandler. >

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi, my 2 cents: - On which codebases did you run the check? - did you consider looking for `implicitCastExpr`? You can capture all narrowing conversion with that and analyze them further. I think it is possible to warn for the subset mentioned in the guidelines. - yo

[PATCH] D44888: [RISCV] Default enable linker relaxation and add -mrelax, -mno-relax flags

2018-04-09 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 updated this revision to Diff 141591. shiva0217 added a comment. Update patch to address Alex's comments. Repository: rL LLVM https://reviews.llvm.org/D44888 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Arch/RISCV.cpp test/Driver/riscv-features.c Index: test

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-04-09 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added a comment. George or Devin, please accept it or give me some feedback if not. Since this patch affects the core infrastructure I think it is wise to merge it only if at least two of you have accepted it. Artem is one,

[PATCH] D45409: [cmake] Include LLVMTestingSupport when doing stand-alone build

2018-04-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a subscriber: sammccall. ilya-biryukov added a comment. This LG to fix the standalone build. However, why not install LLVMTestingSupport in llvm? It feels that we should either include it or disable the tests for standalone builds. And disabling the tests seems wrong. WDYT? @

[PATCH] D45285: [clangd-vscode] Update VScode dependencies

2018-04-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a subscriber: hokein. ilya-biryukov added a comment. In https://reviews.llvm.org/D45285#1058567, @malaperle wrote: > Do we need to bump the version of the extension and do a new release or > anything like that? Or leave this for later? We should bump the version and republi

[PATCH] D43764: [clang-apply-replacements] Convert tooling::Replacements to tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting.

2018-04-09 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D43764#1061042, @jdemeule wrote: > I suspect some undefined order when applying replacements as directly > dependent on which order OS reads `file1.yaml`, `file2.yaml`and `file3.yaml`. $ ls -f /mparsons/llvm/llvm-build/tools/clang/t

[PATCH] D45409: [cmake] Include LLVMTestingSupport when doing stand-alone build

2018-04-09 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. This seems fine to me too to fix the immediate issue. Personally I'd rather drop our usage of llvmtestingsupport as it provides marginal value anyway. But also happy to do this as a clea

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. Hi Jonas, In https://reviews.llvm.org/D38455#1061228, @JonasToth wrote: > Hi, > > my 2 cents: > > - On which codebases did you run the check? A large repository of open-source code, plus internal code at google. External code includes e.g. code from ffmpeg, Eigen, R,

[PATCH] D45356: [clangd] Adapt index interfaces to D45014, and fix the old bugs.

2018-04-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45426: [clangd] Allow using customized include path in URI.

2018-04-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: MaskRay, ioeric, jkorous-apple, ilya-biryukov, klimek. Calculating the include path from absolute file path does not always work for all build system, e.g. bazel uses symlink as the build working directory.

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons accepted this revision. malcolm.parsons added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D45405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. That sounds good. > Removing from my dashboard for now. @aaron.ballman seems to be busy now, maybe you should add alexfh again and discuss the results. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38455 _

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-auto.rst:202 + neither warn nor fix type names having a length less than the option value. + The option affects expressions only, not iterators. + nit: document the default value.

[PATCH] D45006: [Tooling] A CompilationDatabase wrapper that infers header commands.

2018-04-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM with a small nit. Really excited about this landing! Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:353 + } + Best = Candidate.firs

[PATCH] D45409: [cmake] Include LLVMTestingSupport when doing stand-alone build

2018-04-09 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. I've based this change on an earlier fix to lldb when that project started using LLVMTestingSupport. That change in turn was based on how we handle gtest across the projects. As for gtest, I think installing was not considered as an option since different projects may b

[PATCH] D45285: [clangd-vscode] Update VScode dependencies

2018-04-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D45285#1061243, @ilya-biryukov wrote: > In https://reviews.llvm.org/D45285#1058567, @malaperle wrote: > > > Do we need to bump the version of the extension and do a new release or > > anything like that? Or leave this for later? > > > We should

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-04-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping. @aaron.ballman ping, do you have any further thoughts on that macro false-negative? #define vardecl(type, name) type name; void variables_15() { // FIXME: surely we should still warn here? vardecl(int, a); vardecl(int, b); } // CHECK-MESSAGE

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 141610. courbet edited the summary of this revision. courbet added a comment. - Add support for bad cast detection. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38455 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppco

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. In https://reviews.llvm.org/D38455#1061300, @JonasToth wrote: > That sounds good. > > > Removing from my dashboard for now. > > maybe you should add alexfh again and discuss the results. Is there anything I need to do for the diff to change state ? I thought updating t

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > Is there anything I need to do for the diff to change state ? I thought updating the code would automatically mark it "ready for review" again. I think all comments must be marked as done to be ready for review again. Usually the reviewer reacts to changed code, too.

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. In https://reviews.llvm.org/D38455#1061406, @JonasToth wrote: > > I think all comments must be marked as done to be ready for review > again. > > I think alexfh did disable the notifications for now. Add/ping him again. I see, thanks. Repository: rCTE Clang Too

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:32 + Finder->addMatcher( + implicitCastExpr(hasImplicitDestinationType(isInteger()), + hasSourceExpression(IsFloatExpr), Do you pla

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:290 +: ClangTidyCheck(Name, Context), RemoveStars(Options.get("RemoveStars", 0)), + MinTypeNameLength(Options.get("MinTypeNameLength", 0)) {} Maybe make the default 5? Or

[PATCH] D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'

2018-04-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. I wonder whether the readability-identifier-naming check could be extended to support this use case instead of adding a new check specifically for underscores in ivar names? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45392 ___

[PATCH] D43779: [Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>

2018-04-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D43779#1061043, @lebedev.ri wrote: > Hmm. > Got back to this issue. > > Not reproducible with gcc-4.8.5 and gcc-4.9.3 in ubuntu 16.04 chroot. > *Reproducible* with gcc-4.8.4 and gcc-4.9.2 in debian oldstable (Jessie) > chroot. > So one might

[PATCH] D43779: [Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>

2018-04-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D43779#1061444, @alexfh wrote: > In https://reviews.llvm.org/D43779#1061043, @lebedev.ri wrote: > > > Hmm. > > Got back to this issue. > > > > Not reproducible with gcc-4.8.5 and gcc-4.9.3 in ubuntu 16.04 chroot. > > *Reproducible* with gc

[PATCH] D45258: [clang-tidy] Return non-zero exit code for clang errors.

2018-04-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:290 +: ClangTidyCheck(Name, Context), RemoveStars(Options.get("RemoveStars", 0)), + MinTypeNameLength(Options.get("MinTypeNameLength", 0)) {} alexfh wrote: > Maybe mak

[PATCH] D45094: [LibTooling] Make interface of VFS injection into ClangTool more user-friendly

2018-04-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Basic/VirtualFileSystem.h:313 +/// \brief Creates a \p vfs::OverlayFileSystem which overlays the given file +/// system above the 'real' file system, as seen by the operating system. +IntrusiveRefCntPtr --

[PATCH] D45094: [LibTooling] Make interface of VFS injection into ClangTool more user-friendly

2018-04-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Basic/VirtualFileSystem.h:315 +IntrusiveRefCntPtr +createOverlayOnRealFilesystem(IntrusiveRefCntPtr TopFS); + NIT: I'm not an expert in English, but shouldn't it be createOverlay**Over**Real. Als

[PATCH] D45095: [clang-tidy] Align usage of ClangTool interface with new VFS injection

2018-04-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added subscribers: hokein, alexfh. ilya-biryukov added inline comments. Comment at: clang-tidy/ClangTidy.cpp:91 public: - ErrorReporter(ClangTidyContext &Context, bool ApplyFixes, -llvm::IntrusiveRefCntPtr BaseFS) - : Files(FileSystemOptions()

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:290 +: ClangTidyCheck(Name, Context), RemoveStars(Options.get("RemoveStars", 0)), + MinTypeNameLength(Options.get("MinTypeNameLength", 0)) {} lebedev.ri wrote: > alexf

r329558 - Try to fix libclang reproducer tests after r329465

2018-04-09 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Apr 9 05:21:12 2018 New Revision: 329558 URL: http://llvm.org/viewvc/llvm-project?rev=329558&view=rev Log: Try to fix libclang reproducer tests after r329465 They were failing on Windows because the output YAML didn't parse: YAML:1:664: error: Unrecognized escape code!

Re: r329465 - Recommit r329442: Generate Libclang invocation reproducers using a new

2018-04-09 Thread Hans Wennborg via cfe-commits
Hopefully r329558 should fix it. On Sat, Apr 7, 2018 at 9:44 PM, via cfe-commits wrote: > Hi Alex, > > The two tests you added in this commit seem to be failing because of a crash > on one of the Windows bots. Can you take a look? > > http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive

[PATCH] D45094: [LibTooling] Make interface of VFS injection into ClangTool more user-friendly

2018-04-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: include/clang/Basic/VirtualFileSystem.h:315 +IntrusiveRefCntPtr +createOverlayOnRealFilesystem(IntrusiveRefCntPtr TopFS); + ilya-biryukov wrote: > NIT: I'm not an expert in English, but shouldn't it be > createOverla

[PATCH] D45095: [clang-tidy] Align usage of ClangTool interface with new VFS injection

2018-04-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tidy/ClangTidy.cpp:91 public: - ErrorReporter(ClangTidyContext &Context, bool ApplyFixes, -llvm::IntrusiveRefCntPtr BaseFS) - : Files(FileSystemOptions(), BaseFS), DiagOpts(new DiagnosticOptions()), + Err

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D45383#1060354, @efriedma wrote: > How could this patch possibly affect vprintf? vprintf is defined in the builtins.def file, and other than our messages considering it a 'library function', it is otherwise identical. Repository: rC C

Re: r311958 - Revert "Revert r311552: [Bash-autocompletion] Add support for static analyzer flags"

2018-04-09 Thread Yuka Takahashi via cfe-commits
Hi Nico, Thanks for your comment! I do agree that this code is hacky. Do you mean to ask tablegen to generate Checkers.inc under Driver so that we can do like this? : #define CHECKER(FULLNAME, CLASS, DESCFILE, HT, G, H) FULLNAME "," #include "clang/Driver/Checkers.inc" #undef GET_CHECKERS

Re: r311958 - Revert "Revert r311552: [Bash-autocompletion] Add support for static analyzer flags"

2018-04-09 Thread Nico Weber via cfe-commits
Yes. On Mon, Apr 9, 2018 at 9:00 AM, Yuka Takahashi wrote: > Hi Nico, > > Thanks for your comment! > > I do agree that this code is hacky. Do you mean to ask tablegen to > generate Checkers.inc under Driver so that we can do like this? : > #define CHECKER(FULLNAME, CLASS, DESCFILE, HT, G, H)

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:290 +: ClangTidyCheck(Name, Context), RemoveStars(Options.get("RemoveStars", 0)), + MinTypeNameLength(Options.get("MinTypeNameLength", 0)) {} zinovy.nis wrote: > lebed

Re: r311958 - Revert "Revert r311552: [Bash-autocompletion] Add support for static analyzer flags"

2018-04-09 Thread Yuka Takahashi via cfe-commits
Sounds good! 2018-04-09 15:03 GMT+02:00 Nico Weber : > Yes. > > On Mon, Apr 9, 2018 at 9:00 AM, Yuka Takahashi wrote: > >> Hi Nico, >> >> Thanks for your comment! >> >> I do agree that this code is hacky. Do you mean to ask tablegen to >> generate Checkers.inc under Driver so that we can do like

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2018-04-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. @firolino do you plan on finishing this? https://reviews.llvm.org/D27621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2018-04-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Still work on this one? https://reviews.llvm.org/D27621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43969: Improve completion experience for headers

2018-04-09 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[clang-tools-extra] r329566 - Improve completion experience for headers

2018-04-09 Thread Philipp Stephani via cfe-commits
Author: phst Date: Mon Apr 9 06:31:44 2018 New Revision: 329566 URL: http://llvm.org/viewvc/llvm-project?rev=329566&view=rev Log: Improve completion experience for headers Summary: When calling `completing-read', we should provide a default to prevent the behavior described in https://github.c

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2018-04-09 Thread Firat Kasmis via Phabricator via cfe-commits
firolino marked an inline comment as done. firolino added a comment. In https://reviews.llvm.org/D27621#1061562, @lebedev.ri wrote: > @firolino do you plan on finishing this? Sometimes the universe is really funny! I have just re-started working on it today. https://reviews.llvm.org/D27621

[PATCH] D43969: Improve completion experience for headers

2018-04-09 Thread Philipp via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329566: Improve completion experience for headers (authored by phst, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43969 Files: clang-tools-e

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked 2 inline comments as done. courbet added a comment. Thanks. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:32 + Finder->addMatcher( + implicitCastExpr(hasImplicitDestinationType(isInteger()), + hasSourceExpressi

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 141635. courbet marked 2 inline comments as done. courbet added a comment. - Add `*=` and `/=`. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38455 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCore

[PATCH] D45421: [X86] Emit native IR for pmuldq/pmuludq builtins.

2018-04-09 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. > The only question I have is whether its ok to emit the v2i32 intermediate > type for the 128-bit version. I wasn't sure of any examples where we use an > illegal type in our intrinsic/builtin handling. At least not a narrower type. > I know pavg uses a wider type. I d

[PATCH] D45426: [clangd] Allow using customized include path in URI.

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/URI.h:63 + /// Tries to get the include path of the file corresponding to the URI. + /// This allows clients to provide their customized include paths. Avoid "tries to" which is vague about what cases are fa

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:34 + hasSourceExpression(IsFloatExpr), + unless(hasParent(castExpr(.bind("cast"), + this); courbet wrote:

r329570 - [Index] Return SourceLocation to consumers, not FileID/Offset pair.

2018-04-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Apr 9 07:12:51 2018 New Revision: 329570 URL: http://llvm.org/viewvc/llvm-project?rev=329570&view=rev Log: [Index] Return SourceLocation to consumers, not FileID/Offset pair. Summary: The FileID/Offset conversion is lossy. The code takes the fileLoc, which loses e.g.

[PATCH] D45014: [Index] Return SourceLocation to consumers, not FileID/Offset pair.

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC329570: [Index] Return SourceLocation to consumers, not FileID/Offset pair. (authored by sammccall, committed by ). Chang

[PATCH] D45014: [Index] Return SourceLocation to consumers, not FileID/Offset pair.

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Oops, I got my reviews crossed and thought @ilya-biryukov had already approved it (we chatted about this today) Repository: rC Clang https://reviews.llvm.org/D45014 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D45014: [Index] Return SourceLocation to consumers, not FileID/Offset pair.

2018-04-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. LGTM, but let's watch out for @akyrtzi's and @arphaman's comments, just in case they're not happy with the change. In that case we'll have to revert it. Repository: rC Clang https://reviews.llvm.org/D45014 ___ cfe-

[PATCH] D45285: [clangd-vscode] Update VScode dependencies

2018-04-09 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D45285#1061374, @hokein wrote: > In https://reviews.llvm.org/D45285#1061243, @ilya-biryukov wrote: > > > In https://reviews.llvm.org/D45285#1058567, @malaperle wrote: > > > > > Do we need to bump the version of the extension and do a new rele

[clang-tools-extra] r329571 - [clangd] Adapt index interfaces to D45014, and fix the old bugs.

2018-04-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Apr 9 07:28:52 2018 New Revision: 329571 URL: http://llvm.org/viewvc/llvm-project?rev=329571&view=rev Log: [clangd] Adapt index interfaces to D45014, and fix the old bugs. Summary: Fix bugs: - don't count occurrences of decls where we don't spell the name - findDefini

[PATCH] D45356: [clangd] Adapt index interfaces to D45014, and fix the old bugs.

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329571: [clangd] Adapt index interfaces to D45014, and fix the old bugs. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D4

[PATCH] D45356: [clangd] Adapt index interfaces to D45014, and fix the old bugs.

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE329571: [clangd] Adapt index interfaces to D45014, and fix the old bugs. (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D45356?vs=141300&id=141643#toc Repos

[clang-tools-extra] r329574 - [clangd-vscode] Update VScode dependencies

2018-04-09 Thread Marc-Andre Laperle via cfe-commits
Author: malaperle Date: Mon Apr 9 07:32:12 2018 New Revision: 329574 URL: http://llvm.org/viewvc/llvm-project?rev=329574&view=rev Log: [clangd-vscode] Update VScode dependencies Summary: This allows the extension to work with LSP 3.0 and is useful for testing. Signed-off-by: Marc-Andre Laperle

[PATCH] D45285: [clangd-vscode] Update VScode dependencies

2018-04-09 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rCTE329574: [clangd-vscode] Update VScode dependencies (authored by malaperle, committed by ). Changed prior to commit: h

[PATCH] D45014: [Index] Return SourceLocation to consumers, not FileID/Offset pair.

2018-04-09 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Some bots are sad: http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/16346/ http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/17364/ http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/28078/ Repository: rC Clan

Re: [PATCH] D45014: [Index] Return SourceLocation to consumers, not FileID/Offset pair.

2018-04-09 Thread Sam McCall via cfe-commits
The matching clangd patch is r329571, I got distracted and it took me a few minutes to land it. Apologies! On Mon, Apr 9, 2018 at 4:35 PM Hans Wennborg via Phabricator < revi...@reviews.llvm.org> wrote: > hans added a comment. > > Some bots are sad: > http://lab.llvm.org:8011/builders/clang-atom-

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Could you please add some tests that include user defined literals and there interaction with other literals. We should catch narrowing conversions from them, too. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38455 __

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D38455#1061195, @courbet wrote: > ping Sorry for the long review due to the holidays. Generally, I would also like Aaron to take a look when he's back, since he had some concerns. While we're waiting, one minor comment from me. ==

[PATCH] D45441: [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__

2018-04-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. also disable `__CUDA_ARCH__` for HIP. This patch depends on https://reviews.llvm.org/D44984 https://reviews.llvm.org/D45441 Files: lib/Frontend/InitPreprocessor.cpp test/Preprocessor/predefined-macros.c Index: test/Preprocessor/

[PATCH] D45426: [clangd] Allow using customized include path in URI.

2018-04-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 141650. hokein marked 3 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45426 Files: clangd/ClangdServer.cpp clangd/URI.cpp clangd/URI.h unittests/clangd/Clangd

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-04-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:41 + binaryOperator( + anyOf(hasOperatorName("+="), hasOperatorName("-=")), + hasLHS(hasType(isInteger())), alexfh wrote: > JonasToth wrot

[PATCH] D45426: [clangd] Allow using customized include path in URI.

2018-04-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clangd/URI.h:66 + /// + /// If the returned string is non-empty, clangd will use it directly when + /// doing include insertion; otherwise we will fall back to the clang to samm

[PATCH] D45426: [clangd] Allow using customized include path in URI.

2018-04-09 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: clangd/URI.h:69 + /// calculate the include path from the resolved absolute path. + static llvm::Expected includePath(const URI &U); + ---

[PATCH] D45426: [clangd] Allow using customized include path in URI.

2018-04-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 141654. hokein marked an inline comment as done. hokein added a comment. includeSpelling Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45426 Files: clangd/ClangdServer.cpp clangd/URI.cpp clangd/URI.h unittests/clangd/ClangdTests.cpp

[clang-tools-extra] r329578 - [clangd] Allow using customized include path in URI.

2018-04-09 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Apr 9 08:09:44 2018 New Revision: 329578 URL: http://llvm.org/viewvc/llvm-project?rev=329578&view=rev Log: [clangd] Allow using customized include path in URI. Summary: Calculating the include path from absolute file path does not always work for all build system, e.g. b

[PATCH] D45426: [clangd] Allow using customized include path in URI.

2018-04-09 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE329578: [clangd] Allow using customized include path in URI. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D45426?vs=141654&id=141655#toc Repository: rCTE C

[clang-tools-extra] r329579 - [clang-tidy] Return non-zero exit code for clang errors.

2018-04-09 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Apr 9 08:12:10 2018 New Revision: 329579 URL: http://llvm.org/viewvc/llvm-project?rev=329579&view=rev Log: [clang-tidy] Return non-zero exit code for clang errors. Summary: Updated tests broken by this change. Fixes https://bugs.llvm.org/show_bug.cgi?id=27628 Reviewers:

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:290 +: ClangTidyCheck(Name, Context), RemoveStars(Options.get("RemoveStars", 0)), + MinTypeNameLengt

[PATCH] D45258: [clang-tidy] Return non-zero exit code for clang errors.

2018-04-09 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE329579: [clang-tidy] Return non-zero exit code for clang errors. (authored by alexfh, committed by ). Changed prior to commit: https://reviews.llvm.org/D45258?vs=140956&id=141656#toc Repository: rL

[PATCH] D45258: [clang-tidy] Return non-zero exit code for clang errors.

2018-04-09 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329579: [clang-tidy] Return non-zero exit code for clang errors. (authored by alexfh, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D45258 Files

r329580 - [Tooling] A CompilationDatabase wrapper that infers header commands.

2018-04-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Apr 9 08:17:39 2018 New Revision: 329580 URL: http://llvm.org/viewvc/llvm-project?rev=329580&view=rev Log: [Tooling] A CompilationDatabase wrapper that infers header commands. Summary: The wrapper finds the closest matching compile command using filename heuristics an

[PATCH] D45006: [Tooling] A CompilationDatabase wrapper that infers header commands.

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329580: [Tooling] A CompilationDatabase wrapper that infers header commands. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llv

[PATCH] D45006: [Tooling] A CompilationDatabase wrapper that infers header commands.

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rC329580: [Tooling] A CompilationDatabase wrapper that infers header commands. (authored by sammccall, committed by ). Changed prior to commit: https://reviews.

[clang-tools-extra] r329582 - [clang] Use compile-command interpolation to provide commands for header files.

2018-04-09 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Apr 9 08:22:08 2018 New Revision: 329582 URL: http://llvm.org/viewvc/llvm-project?rev=329582&view=rev Log: [clang] Use compile-command interpolation to provide commands for header files. Summary: This uses the inferring wrapper introduced in D45006. Subscribers: klim

[PATCH] D45007: [clangd] Use compile-command interpolation to provide commands for header files.

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329582: [clang] Use compile-command interpolation to provide commands for header files. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://revi

[PATCH] D45442: Parse .h files as objective-c++ if we don't have a compile command.

2018-04-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, klimek. This makes C++/objC not totally broken, without hurting C files too much. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45442 Files

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:290 +: ClangTidyCheck(Name, Context), RemoveStars(Options.get("RemoveStars", 0)), + MinTypeNameLength(Options.get("MinTypeNameLength", 0)) {} alexfh wrote: > alexfh wr

[clang-tools-extra] r329583 - [clangd] Bump v0.0.6 for vscode-clangd.

2018-04-09 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Apr 9 08:37:09 2018 New Revision: 329583 URL: http://llvm.org/viewvc/llvm-project?rev=329583&view=rev Log: [clangd] Bump v0.0.6 for vscode-clangd. Modified: clang-tools-extra/trunk/clangd/clients/clangd-vscode/package.json Modified: clang-tools-extra/trunk/clangd/cl

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-04-09 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. ping Repository: rC Clang https://reviews.llvm.org/D45177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45149: MallocChecker, adding specific BSD calls

2018-04-09 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. ping https://reviews.llvm.org/D45149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r329584 - [CUDA] Revert defining __CUDA_ARCH__ for amdgcn targets

2018-04-09 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Apr 9 08:43:01 2018 New Revision: 329584 URL: http://llvm.org/viewvc/llvm-project?rev=329584&view=rev Log: [CUDA] Revert defining __CUDA_ARCH__ for amdgcn targets amdgcn targets only support HIP, which does not define __CUDA_ARCH__. this is a partial unroll of r329232 /

[PATCH] D45387: [CUDA] Revert defining __CUDA_ARCH__ for amdgcn targets

2018-04-09 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329584: [CUDA] Revert defining __CUDA_ARCH__ for amdgcn targets (authored by yaxunl, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45387?vs=

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Identical to what? `__builtin_va_start` and `__builtin_va_end` specifically are weird because they're builtins which have a signature which can't be expressed in C. vprintf doesn't have that problem. Builtins.def makes the relevant distinction already: a "BUILTIN" is

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D45383#1061780, @efriedma wrote: > Identical to what? `__builtin_va_start` and `__builtin_va_end` specifically > are weird because they're builtins which have a signature which can't be > expressed in C. vprintf doesn't have that problem

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > vprintf is handled using the exact same code-paths. SO, it'll have its 2nd > parameter created with type 'char*&' vprintf is defined in the C standard as "int vprintf(const char *format, va_list arg);"; on Windows, that's equivalent to "int vprintf(const char *forma

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth created this revision. JonasToth added reviewers: alexfh, aaron.ballman, lebedev.ri, hokein. Herald added subscribers: cfe-commits, kbarton, xazax.hun, mgorny, nemanjai, klimek. This check aims to determine values and references that could be declared as const, but are not. The first v

  1   2   3   >