[PATCH] D42645: New simple Checker for mmap calls

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

[clang-tools-extra] r326310 - [clangd] A few minor fixes for STL internal header mapping.

2018-02-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Feb 28 00:56:11 2018 New Revision: 326310 URL: http://llvm.org/viewvc/llvm-project?rev=326310&view=rev Log: [clangd] A few minor fixes for STL internal header mapping. Modified: clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp Modified: clang-tools-extra/tr

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-02-28 Thread Frederic Tingaud via Phabricator via cfe-commits
ftingaud updated this revision to Diff 136245. ftingaud added a comment. Apply clang-format on changelist. https://reviews.llvm.org/D43766 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h clang-tidy/modernize/MakeUniqueCheck.cpp clang-tidy/moder

[clang-tools-extra] r326313 - [clangd] Prefer the definition of a TagDecl (e.g. class) as CanonicalDeclaration.

2018-02-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Feb 28 01:33:15 2018 New Revision: 326313 URL: http://llvm.org/viewvc/llvm-project?rev=326313&view=rev Log: [clangd] Prefer the definition of a TagDecl (e.g. class) as CanonicalDeclaration. Summary: Currently, we pick the first declaration of a symbol in a TU, which is

[PATCH] D43823: [clangd] Prefer the definition of a TagDecl (e.g. class) as CanonicalDeclaration.

2018-02-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 136247. ioeric marked 5 inline comments as done. ioeric added a comment. - Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43823 Files: clangd/index/FileIndex.cpp clangd/index/SymbolCollector.cpp clangd/index/

[PATCH] D43823: [clangd] Prefer the definition of a TagDecl (e.g. class) as CanonicalDeclaration.

2018-02-28 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326313: [clangd] Prefer the definition of a TagDecl (e.g. class) as… (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43823 F

[PATCH] D43823: [clangd] Prefer the definition of a TagDecl (e.g. class) as CanonicalDeclaration.

2018-02-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:260 BasicSymbol = addDeclaration(*ND, std::move(ID)); +else if (isPreferredDeclaration(OriginalDecl, Roles)) + BasicSymbol = addDeclaration(OriginalDecl, std::move(ID)); sa

[PATCH] D43809: Add possibility to specify output stream for CompilerInstance

2018-02-28 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb updated this revision to Diff 136251. krisb added a comment. @teemperor, thanks! All comments are applied. Repository: rC Clang https://reviews.llvm.org/D43809 Files: include/clang/Frontend/CompilerInstance.h lib/CodeGen/CodeGenAction.cpp unittests/Format/FormatTest.cpp unittes

[PATCH] D43809: Add possibility to specify output stream for CompilerInstance

2018-02-28 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb updated this revision to Diff 136252. krisb added a comment. Reverted unintentional changes again. Sorry for that Repository: rC Clang https://reviews.llvm.org/D43809 Files: include/clang/Frontend/CompilerInstance.h lib/CodeGen/CodeGenAction.cpp unittests/Frontend/CMakeLists.txt

[PATCH] D43648: [clangd] Debounce streams of updates.

2018-02-28 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/D43648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43809: Add possibility to specify output stream for CompilerInstance

2018-02-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D43809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D43630: [Driver] Fix search paths on x32

2018-02-28 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. As a heads-up, powerpcspe needs a similar treatment as it suffers from the same problem: cd build-llvm \ CFLAGS=`dpkg-buildflags --get CFLAGS`; \ CFLAGS="$CFLAGS `dpkg-buildflags --get CPPFLAGS`"; \ echo $CFLAGS; \ bin/clang++ -c $CFLAGS -std=c++11 ../lib/Fuzz

[PATCH] D36836: [clang-tidy] Implement sonarsource-function-cognitive-complexity check

2018-02-28 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. In https://reviews.llvm.org/D36836#931995, @lebedev.ri wrote: > - Rebased > - As advised by @aaron.ballman, moved into it's own directory/module. Please > review that, i'm not entirely sure i have done that fully correctly. > > @chandlerc Hi! @aaron.ballman has sugge

[clang-tools-extra] r326314 - [clang-tidy] Add a test for readability-implicit-bool-conversion with bitfields.

2018-02-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Feb 28 02:30:25 2018 New Revision: 326314 URL: http://llvm.org/viewvc/llvm-project?rev=326314&view=rev Log: [clang-tidy] Add a test for readability-implicit-bool-conversion with bitfields. Modified: clang-tools-extra/trunk/test/clang-tidy/readability-implicit-bool-co

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-02-28 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 136261. Herald added a subscriber: a.sidorin. Herald added a reviewer: george.karpenkov. https://reviews.llvm.org/D35068 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analysis/sec

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/modernize-make-unique-cxx11.cpp:5 +#include "unique_ptr.h" +// CHECK-FIXES-NOT: #include + I'd better use positive assertions with the original text. Otherwise the test can pass if the check does any rep

[clang-tools-extra] r326321 - [clang-tidy] Fix 'add_new_check.py --udpate-docs'

2018-02-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Feb 28 04:21:38 2018 New Revision: 326321 URL: http://llvm.org/viewvc/llvm-project?rev=326321&view=rev Log: [clang-tidy] Fix 'add_new_check.py --udpate-docs' Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py Modified: clang-tools-extra/trunk/clang-tidy/ad

[PATCH] D43867: Rename a few checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added reviewers: hokein, sammccall, aaron.ballman. Herald added subscribers: mgorny, klimek. rename_check.py {misc,bugprone}-forwarding-reference-overload rename_check.py {misc,bugprone}-macro-repeated-side-effects rename_check.py {misc,bugprone}-lambda-functio

[PATCH] D43867: Rename a few checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 136275. alexfh added a comment. - Fixed a header guard Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43867 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/ForwardingReferenceOve

[PATCH] D43867: Rename a few checks from misc- to bugprone-.

2018-02-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. When we do this sort of move, do we want to keep the check under its old name for a deprecation period so that we are less likely to break automated scripts and whatnot? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43867

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

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Do you have a way to reproduce the gcc crashes? Repository: rL LLVM https://reviews.llvm.org/D43779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43847: [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith

2018-02-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I need a bit more context because I'm unfamiliar with `absl`. What is this module's intended use? Comment at: clang-tidy/absl/StringFindStartswithCheck.cpp:17-19 + auto stringClassMatcher = anyOf(cxxRecordDecl(hasName("string")), +

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

2018-02-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D43779#1021959, @alexfh wrote: > Do you have a way to reproduce the gcc crashes? Not presently. I'm on debian sid, so gcc4.8 is a lost-for-good relic from ancient past. I'll try to create an debian-oldstable chroot, which still has gcc4.8

[PATCH] D43868: Rename more checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added reviewers: hokein, sammccall, aaron.ballman. Herald added subscribers: mgorny, klimek. clang-tidy/rename_check.py {misc,bugprone}-string-integer-assignment clang-tidy/rename_check.py {misc,bugprone}-string-literal-with-embedded-nul clang-tidy/rename_check

[PATCH] D43867: Rename a few checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D43867#1021956, @aaron.ballman wrote: > When we do this sort of move, do we want to keep the check under its old name > for a deprecation period so that we are less likely to break automated > scripts and whatnot? I haven't done this for the

[PATCH] D43867: Rename a few checks from misc- to bugprone-.

2018-02-28 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 https://reviews.llvm.org/D43867#1021985, @alexfh wrote: > In https://reviews.llvm.org/D43867#1021956, @aaron.ballman wrote: > > > When we do this sort of move, do we want to ke

[PATCH] D43869: [clangd] Support include canonicalization in symbol leve.

2018-02-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, hokein. Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov, klimek. Symbols with different canonical includes might be defined in the same header (e.g. symbols defined in STL ). This patch adds support for mapping fr

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-02-28 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. Thanks Gabor, this looks good to me. Please commit! https://reviews.llvm.org/D30691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D43868: Rename more checks from misc- to bugprone-.

2018-02-28 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: rCTE Clang Tools Extra https://reviews.llvm.org/D43868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41517: mmintrin.h documentation fixes and updates

2018-02-28 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: lib/Headers/mmintrin.h:1292 /// -/// This intrinsic corresponds to the VXORPS / XORPS instruction. +/// This intrinsic corresponds to the XOR instruction. /// craig.topper wrote: > kromanova wrote: > > craig.topper

r326323 - [analyzer] Support for naive cross translation unit analysis

2018-02-28 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Wed Feb 28 05:23:10 2018 New Revision: 326323 URL: http://llvm.org/viewvc/llvm-project?rev=326323&view=rev Log: [analyzer] Support for naive cross translation unit analysis The aim of this patch is to be minimal to enable incremental development of the feature on the top of th

[PATCH] D43870: [clang-tidy] Another batch of checks to rename from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added reviewers: hokein, sammccall, aaron.ballman. Herald added subscribers: xazax.hun, mgorny, klimek. clang-tidy/rename_check.py {misc,bugprone}-suspicious-semicolon clang-tidy/rename_check.py {misc,bugprone}-suspicious-string-compare clang-tidy/rename_check.

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-02-28 Thread Phabricator 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 rC326323: [analyzer] Support for naive cross translation unit analysis (authored by xazax, committed by ). Changed prior to

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-02-28 Thread Phabricator 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 rL326323: [analyzer] Support for naive cross translation unit analysis (authored by xazax, committed by ). Herald added a su

[PATCH] D43870: [clang-tidy] Another batch of checks to rename from misc- to bugprone-.

2018-02-28 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 with a couple of drive-by nits that could be fixed if you wanted to. Comment at: docs/clang-tidy/checks/bugprone-swapped-arguments.rst:6 + + +Finds potenti

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-02-28 Thread Frederic Tingaud via Phabricator via cfe-commits
ftingaud updated this revision to Diff 136286. ftingaud added a comment. Correct case of custom make_unique functions that should still work in c++11. https://reviews.llvm.org/D43766 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h clang-tidy/mode

r326324 - [analyzer] Fix a compiler warning

2018-02-28 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Wed Feb 28 06:01:48 2018 New Revision: 326324 URL: http://llvm.org/viewvc/llvm-project?rev=326324&view=rev Log: [analyzer] Fix a compiler warning Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h Modified: cfe/trunk/include/clang/StaticAnaly

[clang-tools-extra] r326325 - [clangd] A few more fixes for STL header mapping.

2018-02-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Feb 28 06:02:18 2018 New Revision: 326325 URL: http://llvm.org/viewvc/llvm-project?rev=326325&view=rev Log: [clangd] A few more fixes for STL header mapping. Modified: clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp Modified: clang-tools-extra/trunk/clangd

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-02-28 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. teemperor added reviewers: rsmith, v.g.vassilev, chandlerc. The GNU C library includes headers from the `_Builtin_intrinsics` module. As the `_Builtin_intrinsics` module via the `mm_malloc.h` header also includes the `stdlib.h` header from libc, we get a cyclic d

[PATCH] D43852: [OpenMP] Extend NVPTX SPMD implementation of combined constructs

2018-02-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG, with some nits Comment at: include/clang/Driver/Options.td:1428 +def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group, Flags<[CC1Option, NoArgumentUnused]>;

[clang-tools-extra] r326327 - Rename a few checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Feb 28 06:47:20 2018 New Revision: 326327 URL: http://llvm.org/viewvc/llvm-project?rev=326327&view=rev Log: Rename a few checks from misc- to bugprone-. Summary: rename_check.py {misc,bugprone}-forwarding-reference-overload rename_check.py {misc,bugprone}-macro-repeated-s

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. > I don't agree that that's the same thing. The closing brace is still neatly > aligned with the line of the opening brace (which happens to be just the > opening brace). This invariant is not really applicable to switch statements, where code of each "branch" is already

[PATCH] D43015: clang-format: Introduce BreakInheritanceList option

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? Repository: rC Clang https://reviews.llvm.org/D43015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43852: [OpenMP] Extend NVPTX SPMD implementation of combined constructs

2018-02-28 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:3976-3977 + // cuda-mode flag + Args.AddLastArg(CmdArgs, options::OPT_fopenmp_cuda_mode, + options::OPT_fno_openmp_cuda_mode); break; I think most ot

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D42787#994781, @djasper wrote: > What I mean is, users will find it surprising if whether or not a parameter > gets wrapped leads to a different indentation internal to that parameter. I > have not heard of a single user that would be surprised

[PATCH] D42729: clang-format: Fix formatting of function body followed by semicolon

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D42729#994841, @djasper wrote: > - Of course you find all sorts of errors while testing clang-format on a > large-enough codebase. That doesn't mean that users run into them much. > - We have had about 10k clang-format users internally for severa

[PATCH] D43852: [OpenMP] Extend NVPTX SPMD implementation of combined constructs

2018-02-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: include/clang/Driver/Options.td:1428 +def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group, Flags<[CC1Option, NoArgumentUnused]>; +def fno_openmp_cuda_mode : Flag<["-"], "fno-openmp-cuda-mode">, Group, Flags<[NoArgumentUnuse

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D42684#1013005, @djasper wrote: > Please given an explanation of what you are trying to achieve with this > change. Do you intend to set the penalty high so that clang-format does other > things first before falling back to wrapping template dec

[PATCH] D37813: clang-format: better handle namespace macros

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. > Some initial design work has been done, and Krasimir said that he's > interested. No timeline though :( any update or progress maybe? https://reviews.llvm.org/D37813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D42729: clang-format: Fix formatting of function body followed by semicolon

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D42729#1022069, @Typz wrote: > In https://reviews.llvm.org/D42729#994841, @djasper wrote: > > > - Of course you find all sorts of errors while testing clang-format on a > > large-enough codebase. That doesn't mean that users run into them much

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D32525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I think it's possible that this is just a bug/oversight. But I don't fully understand the case where it is not behaving as you expect. Can you give me an example (config setting + code that's not formatted as you expect)? Repository: rC Clang https://reviews.llvm.or

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. But you *do* want extra indentation in the case of: function(a, b + cc); I understand you argument, but I don't agree at the moment. As is (without getting more feedback from others that clang-format is behaving unexpected here), I

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I think this generally looks good, but needs a few more tests. Comment at: include/clang/Format/Format.h:1204 + /// \brief If ``false``, spaces will be removed before constructor initializer + /// colon. When this file is changed,

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-doc/BitcodeWriter.h:37 + static constexpr unsigned SubblockIDSize = 4U; + static constexpr unsigned BoolSize = 1U; + static constexpr unsigned IntSize = 16U; Hmm, you build with asserts enabled, right? I trie

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. The problem I have is really related to the current `AlwaysBreakTemplateDeclarations` behavior, which does not apply to functions. I set it to false, and I get this: template<> void ( const bb

[PATCH] D43015: clang-format: Introduce BreakInheritanceList option

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. If both this and https://reviews.llvm.org/D32525 are submitted, then we also need more tests for the combination of the two parameters. Comment at: include/clang/Format/Format.h:852 + /// \brief Different ways to break inheritance list. + enum BreakI

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D42684#1022093, @Typz wrote: > The problem I have is really related to the current > `AlwaysBreakTemplateDeclarations` behavior, which does not apply to functions. > I set it to false, and I get this: > > template<> > void aaa

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. New options for this would not be acceptable IMO. Too much cost for too little benefit. I'd suggest to first make the change to fall back to the style with a regular block when there are statements other than break after the closing brace. That is always bad, no matter

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 136299. Typz marked 2 inline comments as done. Typz added a comment. Address review comments. Repository: rC Clang https://reviews.llvm.org/D32525 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp lib/Format

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: unittests/Format/FormatTest.cpp:8969 + "barr(1) {}", CtorInitializerStyle); + CtorInitializerStyle.BreakConstructorInitializers = FormatStyle::BCIS_BeforeComma; + verifyFormat("Fooo::Fooo(

[PATCH] D43851: Start setting dllimport/dllexport in setGVProperties

2018-02-28 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola added a comment. getting phab to send an email to cfe-commits https://reviews.llvm.org/D43851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43015: clang-format: Introduce BreakInheritanceList option

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 136300. Typz marked an inline comment as done. Typz added a comment. Address review comments, and rebase on https://reviews.llvm.org/D32525 Repository: rC Clang https://reviews.llvm.org/D43015 Files: docs/ClangFormatStyleOptions.rst include/clang/Format

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-28 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-doc/BitcodeWriter.h:37 + static constexpr unsigned SubblockIDSize = 4U; + static constexpr unsigned BoolSize = 1U; + static constexpr unsigned IntSize = 16U; lebedev.ri wrote: > Hmm, you build with asserts

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2018-02-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 136301. yaxunl added a comment. Revised by John's comments. Added CallArg::copyInto and modified CallArg::getRValue() to return an independent r-value by default. However some cases expecting l-value not copied, therefore I added an optional argument to Call

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-28 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 136303. juliehockett marked 3 inline comments as done. juliehockett added a comment. Running clang-format and fixing newlines https://reviews.llvm.org/D41102 Files: CMakeLists.txt clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWriter.h clang-doc/

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 136305. Typz marked 2 inline comments as done. Typz added a comment. Address review comments Repository: rC Clang https://reviews.llvm.org/D32525 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: unittests/Format/FormatTest.cpp:8969 + "barr(1) {}", CtorInitializerStyle); + CtorInitializerStyle.BreakConstructorInitializers = FormatStyle::BCIS_BeforeComma; + verifyFormat("Fooo::Fooo()\n

[PATCH] D43015: clang-format: Introduce BreakInheritanceList option

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 136306. Typz added a comment. Address review comments of https://reviews.llvm.org/D32525 Repository: rC Clang https://reviews.llvm.org/D43015 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp l

[PATCH] D42684: clang-format: Allow optimizer to break template declaration.

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Indeed, seems to apply to classes as well. Maybe I was mislead by my testing, where I did not get the case (possibly because we use `ConstructorInitializerAllOnOneLineOrOnePerLine=true`, so the continuation indenter only sees "short" class declarations unless breaking the

[PATCH] D42787: clang-format: do not add extra indent when wrapping last parameter

2018-02-28 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D42787#1022081, @djasper wrote: > But you *do* want extra indentation in the case of: > > function(a, >b + >cc); > > > I understand you argument, but I don't agree at the moment. As is (without > getting

[PATCH] D43823: [clangd] Prefer the definition of a TagDecl (e.g. class) as CanonicalDeclaration.

2018-02-28 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE326313: [clangd] Prefer the definition of a TagDecl (e.g. class) as… (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D43823?vs=136247&id=136248#toc Repository:

r326342 - [CUDA] Include single GPU binary, NFCI.

2018-02-28 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Wed Feb 28 09:53:46 2018 New Revision: 326342 URL: http://llvm.org/viewvc/llvm-project?rev=326342&view=rev Log: [CUDA] Include single GPU binary, NFCI. Binaries for multiple architectures are combined by fatbinary, so the current code was effectively not needed. Differenti

[PATCH] D43461: [CUDA] Include single GPU binary, NFCI.

2018-02-28 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326342: [CUDA] Include single GPU binary, NFCI. (authored by Hahnfeld, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D43461?vs=135649&id=1363

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2018-02-28 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Ah, I thought it was somehow possible to create: Constructor(): aa() , bb() {}, but I guess clang-format always inserts a break there. Sorry for chasing you in circ

[PATCH] D43870: [clang-tidy] Another batch of checks to rename from misc- to bugprone-.

2018-02-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- The 'misc-undelegated-constructor' check was renamed to `bugprone-undelegated-constructor + `_

[PATCH] D30170: Function definition may have uninstantiated body

2018-02-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. The issue is still observed in trunk. Other compilers process the tests correctly (checked using https://godbolt.org/). For instance, the code: template struct C20 { friend void func_20() {} // expected-note{{previous definition is here}} }; C20 c20i; void fu

[PATCH] D43839: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Abandon this one, then, please. https://reviews.llvm.org/D43839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43162: [Parser] (C++) Make -Wextra-semi slightly more useful

2018-02-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This is the wrong way to deal with this. The only thing that should ever be controlled by -W flags is whether the warnings in that group appear, not whether warnings in other groups appear. The principle is that -W flags should behave "as if" they filter the diagnostic o

[PATCH] D43839: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. This one is abandoned. The new phab review is here: https://reviews.llvm.org/D43841 https://reviews.llvm.org/D43839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D43162: [Parser] (C++) Make -Wextra-semi slightly more useful

2018-02-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thank you for the feedback! In https://reviews.llvm.org/D43162#1022427, @rsmith wrote: > This is the wrong way to deal with this. The only thing that should ever be > controlled by -W flags is whether the warnings in that group appear, not > whether warnings in othe

[PATCH] D39562: [CodeGen][ObjC] Fix an assertion failure caused by copy elision

2018-02-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I'm planning to work on a new patch this week. https://reviews.llvm.org/D39562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-02-28 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:100 void checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD); + void checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE, const FunctionDecl *FD); voi

[PATCH] D43888: [clang-cl] Implement /X

2018-02-28 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. /X makes cl stop looking in %INCLUDE%. Implement this for clang-cl. As it turns out, the return in ToolChains/MSVC.cpp, AddClangSystemIncludeArgs() for -nostdlibinc is already in the right place (but -nostdlibinc isn't exposed by clan

[clang-tools-extra] r326354 - [Documentation] Split Clang-tidy changes in Release Notes into sections: new checks, new aliases, renamed checks; sort all of them alphabetically. Enforce 80 characters l

2018-02-28 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Feb 28 11:15:49 2018 New Revision: 326354 URL: http://llvm.org/viewvc/llvm-project?rev=326354&view=rev Log: [Documentation] Split Clang-tidy changes in Release Notes into sections: new checks, new aliases, renamed checks; sort all of them alphabetically. Enforce 8

[PATCH] D43888: [clang-cl] Implement /X

2018-02-28 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Nicely tested too :-) https://reviews.llvm.org/D43888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D43839: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh, sorry, somehow I missed that it was abandoned. https://reviews.llvm.org/D43839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43840: [CFG] [analyzer] Fix a crash on finding construction context for implicit constructor conversion.

2018-02-28 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. Should there be a FIXME note saying that other casts should be supported? Repository: rC Clang https://reviews.llvm.org/D43840 ___

[PATCH] D30170: Function definition may have uninstantiated body

2018-02-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/AST/Decl.h:1840 + /// there is one). + /// bool hasBody(const FunctionDecl *&Definition) const; Please remove trailing bla

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Ugh, I hate `inalloca` *so much*. It's still an indirect return, right? It's just that the return-slot pointer has to get stored to the `inalloca` allocation like any other argument? Repository: rC Clang https://reviews.llvm.org/D43842 _

[PATCH] D43804: [analyzer] Enable cfg-temporary-dtors by default?

2018-02-28 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Currently there's no test demonstrating a different behavior from `cfg-temporary-dtors` being set to true?.. Repository: rC Clang https://reviews.llvm.org/D43804 ___ cfe-commits mailing list cfe-commits@lists.ll

r326355 - Fix gcc -Wreturn-type warnings after r326307.

2018-02-28 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Feb 28 11:28:47 2018 New Revision: 326355 URL: http://llvm.org/viewvc/llvm-project?rev=326355&view=rev Log: Fix gcc -Wreturn-type warnings after r326307. Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp URL: http://llvm.org/vie

[PATCH] D43804: [analyzer] Enable cfg-temporary-dtors by default?

2018-02-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. That's right, most analyzer-oriented tests were added explicitly by me to `temporaries.cpp` and `lifetime-extension.cpp` in previous patches, so they didn't need to be changed in this patch. There didn't seem to be many FIXME tests specific to my work before i started doing

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thank you for working on this! Some more review notes. Please look into adding a bit more tests. Comment at: clang-doc/BitcodeWriter.cpp:179 + assert(Inits.size() == RecordIdCount); + for (const auto &Init : Inits) RecordIdNameMap[Init.firs

r326332 - Test commit access: apply clang-format suggestion

2018-02-28 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Wed Feb 28 08:57:33 2018 New Revision: 326332 URL: http://llvm.org/viewvc/llvm-project?rev=326332&view=rev Log: Test commit access: apply clang-format suggestion Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.c

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D43842#1022498, @rjmccall wrote: > Ugh, I hate `inalloca` *so much*. > > It's still an indirect return, right? It's just that the return-slot pointer > has to get stored to the `inalloca` allocation like any other argument? Correct. Repos

[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-02-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:21 +: MakeSmartPtrCheck(Name, Context, "std::make_unique"), + MinimumLanguageVersion(Options.get("MakeUniqueLanguageVersion", + getDefaultMin

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay. In that case, this seems correct, although it seems to me that perhaps `inalloca` is not actually orthogonal to anything else. In fact, it seems to me that maybe `inalloca` ought to just be a bit on the CGFunctionInfo and the individual ABIInfos should be left

[PATCH] D43888: [clang-cl] Implement /X

2018-02-28 Thread Nico Weber via Phabricator via cfe-commits
thakis closed this revision. thakis added a comment. r326357, thanks! https://reviews.llvm.org/D43888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r326357 - [clang-cl] Implement /X

2018-02-28 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Feb 28 11:49:07 2018 New Revision: 326357 URL: http://llvm.org/viewvc/llvm-project?rev=326357&view=rev Log: [clang-cl] Implement /X /X makes cl stop looking in %INCLUDE%. Implement this for clang-cl. As it turns out, the return in ToolChains/MSVC.cpp, AddClangSystemInclude

  1   2   >