[PATCH] D40167: In stdbool.h, define bool, false, true only in gnu++98

2017-11-17 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. GCC has meanwhile corrected that with the similar https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=216679 "C++11 explicitly forbids macros for bool, true and false." https://reviews.llvm.org/D40167 Files: clang/lib/Headers/stdbool.h clang/test/Headers/st

r318511 - [MinGW] Define __ARM_DWARF_EH__ for MinGW/ARM

2017-11-17 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Fri Nov 17 00:06:49 2017 New Revision: 318511 URL: http://llvm.org/viewvc/llvm-project?rev=318511&view=rev Log: [MinGW] Define __ARM_DWARF_EH__ for MinGW/ARM Since SVN r318510, the MinGW/ARM configuration defaults to dwarf exception handling. Differential Revision: https:/

[PATCH] D39533: [MinGW] Define __ARM_DWARF_EH__ on MinGW/ARM

2017-11-17 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318511: [MinGW] Define __ARM_DWARF_EH__ for MinGW/ARM (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39533?vs=121244&id=123298#toc Repository: rL LLVM https://reviews.llv

[PATCH] D40167: In stdbool.h, define bool, false, true only in gnu++98

2017-11-17 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. (This code had been introduced with http://llvm.org/viewvc/llvm-project?view=revision&revision=115028 "Define _Bool, bool, true, and false macros in when we're in a GNU-compatible C++ dialect. Fixes rdar://problem/8477819" mentioning: "Fixes rdar://problem/8477819." Bu

[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. https://reviews.llvm.org/D39533 was committed now, so before committing, make sure that the `__ARM_DWARF_EH__` (that was added in that commit) only gets set while dwarf is enabled (which now is the default for mingw/arm but not msvc/arm). Repository: rL LLVM https

r318514 - Use llvm-config.h instead of config.h

2017-11-17 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Nov 17 02:09:02 2017 New Revision: 318514 URL: http://llvm.org/viewvc/llvm-project?rev=318514&view=rev Log: Use llvm-config.h instead of config.h To fix standalone builds broken by r318411 (config.h is private to llvm). Modified: cfe/trunk/lib/Frontend/Precompiled

[PATCH] D39842: Allow to store precompiled preambles in memory.

2017-11-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D39842#927578, @mgorny wrote: > Please revert this commit. You've just broken all the stand-alone builds of > clang. Sorry about that. Should be fixed in https://reviews.llvm.org/rL318514 Repository: rL LLVM https://reviews.llvm.o

[PATCH] D40120: [clang-format] Add text proto filename detection

2017-11-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 123308. krasimir added a comment. - Remove METADATA https://reviews.llvm.org/D40120 Files: lib/Format/Format.cpp Index: lib/Format/Format.cpp === --- lib/Format/Format.cpp +++ lib/Format/F

[PATCH] D40068: Implement more accurate penalty & trade-offs while breaking protruding tokens.

2017-11-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1616 + + if (!DryRun) nit: remove an empty line Comment at: unittests/Format/FormatTest.cpp:9951 + "\n*/", + Style)); + -

[PATCH] D40127: [Driver][ARM] For assembler files recognize -Xassembler or -Wa, -mthumb

2017-11-17 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added inline comments. Comment at: lib/Driver/ToolChain.cpp:549-556 +bool IsIntegratedAssemblerThumb = false; +for (const Arg *A : + Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler)) { + for (StringRef Value : A->getValues()) { +

[PATCH] D40068: Implement more accurate penalty & trade-offs while breaking protruding tokens.

2017-11-17 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: unittests/Format/FormatTest.cpp:9951 + "\n*/", + Style)); + krasimir wrote: > Why didn't this get reformatted as: > ``` > EXPECT_EQ("int a; /* first line\n" > "* s

[PATCH] D40068: Implement more accurate penalty & trade-offs while breaking protruding tokens.

2017-11-17 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 123309. klimek marked an inline comment as done. klimek added a comment. Address review comments. https://reviews.llvm.org/D40068 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/Fo

[PATCH] D40127: [Driver][ARM] For assembler files recognize -Xassembler or -Wa, -mthumb

2017-11-17 Thread Peter Smith via Phabricator via cfe-commits
peter.smith updated this revision to Diff 123310. peter.smith added a comment. Updated diff with an attempt to simplify the check for filetype and mthumb. I've left the existing Args.filtered in expression for now as I couldn't make a better alternative with std::for_any. https://reviews.llvm.

r318515 - Implement more accurate penalty & trade-offs while breaking protruding tokens.

2017-11-17 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Fri Nov 17 03:17:15 2017 New Revision: 318515 URL: http://llvm.org/viewvc/llvm-project?rev=318515&view=rev Log: Implement more accurate penalty & trade-offs while breaking protruding tokens. For each line that we break in a protruding token, compute whether the penalty of bre

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-11-17 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. Also, to add to my previous comment, even if for a moment we ignore the header dependencies and when they are extracted, a modern build system normally tracks other kinds of what can be called "auxiliary dependency information": some form of compiler signature, has

[clang-tools-extra] r318522 - [clang-tidy] Add a check for undelegated copy of base classes

2017-11-17 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Fri Nov 17 04:23:30 2017 New Revision: 318522 URL: http://llvm.org/viewvc/llvm-project?rev=318522&view=rev Log: [clang-tidy] Add a check for undelegated copy of base classes Finds copy constructors where the constructor don't call the copy constructor of the base class. ``` c

[PATCH] D33722: [clang-tidy] Add checker for undelegated copy of base classes

2017-11-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318522: [clang-tidy] Add a check for undelegated copy of base classes (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D33722?vs=121886&id=123319#toc Repository: rL LLVM https:

[clang-tools-extra] r318523 - [clang-tidy] Fix an oversight after renaming a check

2017-11-17 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Fri Nov 17 04:28:58 2017 New Revision: 318523 URL: http://llvm.org/viewvc/llvm-project?rev=318523&view=rev Log: [clang-tidy] Fix an oversight after renaming a check Modified: clang-tools-extra/trunk/clang-tidy/bugprone/BugproneTidyModule.cpp clang-tools-extra/trunk/tes

[PATCH] D39455: [CodeGen] Add initial support for union members in TBAA

2017-11-17 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. Thanks John. Hal, do you see any problems with this patch? Repository: rL LLVM https://reviews.llvm.org/D39455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D39953: [CodeGen] Do not lookup for cached TBAA metadata nodes twice

2017-11-17 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. Indeed, DenseMap invalidates iterators on insertion. But then even the "technically correct" part of these changes make things more fragile while my original concern was reliability and not performance. I particularly don't like the repeating cache assignments. What if

[PATCH] D39955: [Driver] Add a cc1 flag for the new TBAA metadata format

2017-11-17 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 123320. kosarev retitled this revision from "[Driver] Add command-line flags for the new TBAA metadata format" to "[Driver] Add a cc1 flag for the new TBAA metadata format". kosarev added a comment. Removed the clang command-line flag for the new format. h

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. > It's harder as we don't know the distinction between declaration/definition > at merge time. Right now the C++ implementation of this warning actually > checks the attribut

[PATCH] D40120: [clang-format] Add text proto filename detection

2017-11-17 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 https://reviews.llvm.org/D40120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I found some nits, but overall I think this is getting close. Comment at: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:76 range = CL->getSourceRange(); - } - else if (const AllocaRegion* AR = dyn_cast(R)) { + } else if (const AllocaR

r318525 - [clang-format] Add text proto filename detection

2017-11-17 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Fri Nov 17 07:10:49 2017 New Revision: 318525 URL: http://llvm.org/viewvc/llvm-project?rev=318525&view=rev Log: [clang-format] Add text proto filename detection Summary: Adds text proto filename detection. Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits D

[PATCH] D20124: [PCH] Serialize skipped preprocessor ranges

2017-11-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D20124#927967, @cameron314 wrote: > Well, it seems like preamble PCH source location translation is fundamentally > broken. The entry file has a single, positive file ID. The preamble PCH is > treated as an imported module, so it has a

[PATCH] D40120: [clang-format] Add text proto filename detection

2017-11-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318525: [clang-format] Add text proto filename detection (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D40120 Files: cfe/trunk/lib/Format/Format.cpp Index: cfe/trunk/lib/For

[PATCH] D40176: [CodeGen] Collect information about sizes of accesses and access types for TBAA

2017-11-17 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added a project: clang. The information about access and type sizes is necessary for producing TBAA metadata in the new size-aware format. With this patch, https://reviews.llvm.org/D39955 and https://reviews.llvm.org/D39956 in place we should be able to ch

[PATCH] D40089: [clangd] Make completion scores use 0-1 floats internally.

2017-11-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. A few comments based on our discussion. Comment at: clangd/ClangdUnit.cpp:387 std::string sortText() const { std::string S, NameStorage; example Comment at: clangd/ClangdUnit.cpp:416 + + // Produces an integ

[PATCH] D40178: clang-format: [JS] remove trailing lines in arrow functions.

2017-11-17 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. Herald added a subscriber: klimek. clang-format already removes lines trailing at the end of blocks: function x() { foo(); // next line will be removed. } However because JS arrow functions are parsed as expressions, the existing logic to remove empty l

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-11-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 123345. JonasToth marked 18 inline comments as done. JonasToth added a comment. - rebase to master - address review comments from aaron - handle bools correctly https://reviews.llvm.org/D37808 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HI

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-11-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:13 + +#include +#include aaron.ballman wrote: > Including is forbidden by our coding standard. However, it doesn't > appear to be used in the source file, either. Yes,

[PATCH] D39049: [analyzer] Fix wrong calculation of offset in ArrayBoundsV2

2017-11-17 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. > So what are the arguments that are passed to getSimplifiedOffset() in that > case? 0? That does not seem to be correct. yes. so the conclusion is: - this code does not work - this code is untested - this code is not even used in the use cases it was intended

[PATCH] D39611: [CodeGen] change const-ness of complex calls

2017-11-17 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. Ping. https://reviews.llvm.org/D39611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-11-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 123347. JonasToth marked 12 inline comments as done. JonasToth added a comment. - address more comments, especially doc https://reviews.llvm.org/D37808 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp clang-tidy/hicpp/Mult

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-11-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 123349. JonasToth added a comment. - - fix ReleaseNotes https://reviews.llvm.org/D37808 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp clang-tidy/hicpp/MultiwayPathsCovere

r318529 - Fix skipping of flags in getClangStripDependencyFileAdjuster

2017-11-17 Thread Dave Lee via cfe-commits
Author: kastiglione Date: Fri Nov 17 08:27:21 2017 New Revision: 318529 URL: http://llvm.org/viewvc/llvm-project?rev=318529&view=rev Log: Fix skipping of flags in getClangStripDependencyFileAdjuster Summary: The ArgumentsAdjuster returned from `getClangStripDependencyFileAdjuster` will skip depen

[PATCH] D40024: Fix skipping of flags in getClangStripDependencyFileAdjuster

2017-11-17 Thread Dave Lee via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318529: Fix skipping of flags in getClangStripDependencyFileAdjuster (authored by kastiglione). Repository: rL LLVM https://reviews.llvm.org/D40024 Files: cfe/trunk/lib/Tooling/ArgumentsAdjusters.cp

[PATCH] D40178: clang-format: [JS] remove trailing lines in arrow functions.

2017-11-17 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Is this different for C++ lambdas? I would think that we never should add an empty line before the "}" of a child block. https://reviews.llvm.org/D40178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

r318530 - Indent code blocks so they are actually treated as such

2017-11-17 Thread Stephan Bergmann via cfe-commits
Author: sberg Date: Fri Nov 17 08:34:36 2017 New Revision: 318530 URL: http://llvm.org/viewvc/llvm-project?rev=318530&view=rev Log: Indent code blocks so they are actually treated as such Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst Modified: cfe/trunk/docs/ClangFormatStyleOptions.rs

[PATCH] D40180: [clang-tools-extra] Fix small typo in docs/ReleaseNotes.rst

2017-11-17 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. This is mainly a test diff to check the new Herald rule I added in LLVM Phabricator to automatically Cc: cfe-commits on all clang-tools-extra diffs. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40180 Files: docs/ReleaseNotes.rst Index: d

[PATCH] D40068: Implement more accurate penalty & trade-offs while breaking protruding tokens.

2017-11-17 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 123359. klimek added a comment. Just exporting https://reviews.llvm.org/D40068 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestComments.

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:192 + this, "Address of stack-allocated memory is captured"); +SmallString<512> Buf; +llvm::raw_svector_ostream Out(Buf); xazax.hun wrote: > How lo

[PATCH] D38921: [analyzer] LoopUnrolling: update the matched assignment operators

2017-11-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. A nit, otherwise LG! Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:693 SMng); + } else if (Optional BE = P.getAs()) { +S

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2017-11-17 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin created this revision. Fix the problem PR31516 with setting locale on Windows by wrapping _locale_t with a pointer-like class. Reduces 74 test failures in std/localization test suite to 47 test failures (on llvm clang, Visual Studio 2015).

[PATCH] D40182: [clangd] Add parsing and value inspection to JSONExpr.

2017-11-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added a subscriber: ilya-biryukov. This will replace the places where we're using YAMLParser to parse JSON now: - the new marshalling code (T::parse()) should handle fewer cases and require fewer explicit casts - we'll early-reject invalid JSON that YAMLPa

[PATCH] D39505: [OpenMP] Show error if VLAs are not supported

2017-11-17 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 123364. Hahnfeld added a comment. Update changes to be generic. https://reviews.llvm.org/D39505 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/TargetInfo.h include/clang/Sema/Sema.h lib/Basic/TargetInfo.cpp lib/Basic/Target

[PATCH] D39505: [OpenMP] Show error if VLAs are not supported

2017-11-17 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld marked an inline comment as done. Hahnfeld added inline comments. Comment at: include/clang/Basic/TargetInfo.h:944 + /// \brief Whether target supports variable-length arrays. + bool isVLASupported() const { return VLASupported; } + rjmccall wrote: > H

[PATCH] D40178: clang-format: [JS] remove trailing lines in arrow functions.

2017-11-17 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 123367. mprobst added a comment. - handle C++ lambdas - handle preceding empty lines https://reviews.llvm.org/D40178 Files: lib/Format/ContinuationIndenter.cpp lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp unittests/Format/Fo

[PATCH] D40178: clang-format: [JS] remove trailing lines in arrow functions.

2017-11-17 Thread Martin Probst via Phabricator via cfe-commits
mprobst added a comment. In https://reviews.llvm.org/D40178#928645, @djasper wrote: > Is this different for C++ lambdas? I would think that we never should add an > empty line before the "}" of a child block. Actually indeed turns out to be identical for C++ lambdas. Fixed as we discussed off

[PATCH] D40178: clang-format: [JS] remove trailing lines in arrow functions.

2017-11-17 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 123368. mprobst added a comment. - reduce test cases a bit, no need to separate before/after cases https://reviews.llvm.org/D40178 Files: lib/Format/ContinuationIndenter.cpp lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp unitt

[PATCH] D40178: clang-format: [JS] remove trailing lines in arrow functions.

2017-11-17 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. Looks good. There is a chance that some people do not want this in their coding style. But if so, we can add an option later. https://reviews.llvm.org/D40178

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-11-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Perhaps, I don't understand the concept of layered design in this particular case. But I just find it annoying that we need to re-implement the entire OpenCL AST Type structure in Basic. And even if we don't have dependencies on the files physically we still logically

r318536 - [OPENMP] Codegen for `target simd` construct.

2017-11-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Nov 17 09:57:25 2017 New Revision: 318536 URL: http://llvm.org/viewvc/llvm-project?rev=318536&view=rev Log: [OPENMP] Codegen for `target simd` construct. Added codegen support for `target simd` directive. Added: cfe/trunk/test/OpenMP/target_simd_codegen.cpp cfe/

[PATCH] D40178: clang-format: [JS] remove trailing lines in arrow functions.

2017-11-17 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 123370. mprobst added a comment. - document the meaning if Children.size() == 0 in this context. https://reviews.llvm.org/D40178 Files: lib/Format/ContinuationIndenter.cpp lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp unittes

[PATCH] D40178: clang-format: [JS] remove trailing lines in arrow functions.

2017-11-17 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 123371. mprobst added a comment. - prefer !x.empty() over .size() > 0. https://reviews.llvm.org/D40178 Files: lib/Format/ContinuationIndenter.cpp lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestJS.cpp

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-17 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 25 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdServer.cpp:360 + + auto FileContents = DraftMgr.getDraft(File); + assert(FileContents.Draft && malaperle wrote: > Why are you adding this? Is this coming from a

[PATCH] D39457: [OPENMP] Current status of OpenMP support.

2017-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 123373. ABataev added a comment. Updated info about supported constructs. https://reviews.llvm.org/D39457 Files: docs/OpenMPSupport.rst docs/index.rst Index: docs/index.rst === --- docs/i

r318537 - clang-format: remove trailing lines in lamdas and arrow functions.

2017-11-17 Thread Martin Probst via cfe-commits
Author: mprobst Date: Fri Nov 17 10:06:33 2017 New Revision: 318537 URL: http://llvm.org/viewvc/llvm-project?rev=318537&view=rev Log: clang-format: remove trailing lines in lamdas and arrow functions. Summary: clang-format already removes empty lines at the beginning & end of blocks: int x()

[PATCH] D40178: clang-format: [JS] remove trailing lines in arrow functions.

2017-11-17 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318537: clang-format: remove trailing lines in lamdas and arrow functions. (authored by mprobst). Repository: rL LLVM https://reviews.llvm.org/D40178 Files: cfe/trunk/lib/Format/ContinuationIndenter

r318538 - [AST] Partially revert r318341 to fix two broken tests on llvm-clang-x86_64-expensive-checks-win (NFC).

2017-11-17 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Fri Nov 17 10:09:48 2017 New Revision: 318538 URL: http://llvm.org/viewvc/llvm-project?rev=318538&view=rev Log: [AST] Partially revert r318341 to fix two broken tests on llvm-clang-x86_64-expensive-checks-win (NFC). Modified: cfe/trunk/include/clang/AST/Expr.h

[PATCH] D40185: Loosen -Wempty-body warning.

2017-11-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Do not show it when `if` or `else` come from macros. E.g., #define USED(A) if (A); else #define SOME_IF(A) if (A) void test() { // No warnings are shown in those cases now. USED(0); SOME_IF(0); } https://reviews.llvm.org/D40185 Files:

[PATCH] D39964: Change code owner for Clang Static Analyzer to Devin Coughlin.

2017-11-17 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM! Thanks Anna! https://reviews.llvm.org/D39964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D40187: [OpenMP] Initial implementation of code generation for pragma 'teams distribute parallel for' on host

2017-11-17 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 Repository: rL LLVM https://reviews.llvm.org/D40187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D40185: Loosen -Wempty-body warning.

2017-11-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk requested changes to this revision. rnk added a comment. This revision now requires changes to proceed. Why does passing the rparen location for the if condition fix the warning for IF_ELSE? I assumed that would refer to the else clause semicolon. https://reviews.llvm.org/D40185

[clang-tools-extra] r318544 - [clangd] Release the old preamble before building a new one.

2017-11-17 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Nov 17 11:05:56 2017 New Revision: 318544 URL: http://llvm.org/viewvc/llvm-project?rev=318544&view=rev Log: [clangd] Release the old preamble before building a new one. Modified: clang-tools-extra/trunk/clangd/ClangdUnit.cpp Modified: clang-tools-extra/trunk/clang

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-17 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 6 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdUnit.cpp:981 +} + if (isSearchedLocation(FID, Offset)) { malaperle wrote: > I think we need to do a check that the computed SourceRange is valid > (isVal

r318545 - [CodeGen] Compute the objc EH vtable address point using inbounds GEP.

2017-11-17 Thread Ahmed Bougacha via cfe-commits
Author: ab Date: Fri Nov 17 11:46:47 2017 New Revision: 318545 URL: http://llvm.org/viewvc/llvm-project?rev=318545&view=rev Log: [CodeGen] Compute the objc EH vtable address point using inbounds GEP. The object is provided by the objc runtime and is never visible in the module itself, but even so

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-11-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 123392. alexshap added a comment. Herald added a subscriber: a.sidorin. adjust the messages, more uses of auto Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-capt

[PATCH] D39611: [CodeGen] change const-ness of complex calls

2017-11-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D39611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

r318552 - [ObjC][ARC] Honor noescape attribute for -Warc-retain-cycles

2017-11-17 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Nov 17 12:44:25 2017 New Revision: 318552 URL: http://llvm.org/viewvc/llvm-project?rev=318552&view=rev Log: [ObjC][ARC] Honor noescape attribute for -Warc-retain-cycles rdar://35409566 Differential Revision: https://reviews.llvm.org/D40141 Modified: cfe/trunk/lib/

[PATCH] D40141: [ObjC][ARC] Honor noescape attribute for -Warc-retain-cycles

2017-11-17 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked an inline comment as done. Closed by commit rL318552: [ObjC][ARC] Honor noescape attribute for -Warc-retain-cycles (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D40141?vs=123211

[PATCH] D39627: Fix vtable not receiving hidden visibility when using push(visibility)

2017-11-17 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich updated this revision to Diff 123399. jakehehrlich added a comment. 1. Added a ForDefinition parameter to setGlobalVisibility and merged visibility setting behaviors for setGlobalVisibility and setLinkageAndVisibilityForGV 2. Renamed setLinkageAndVisibilityForGV to setLinkageForGV 3.

[PATCH] D40185: Loosen -Wempty-body warning.

2017-11-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. I'll go ahead and land this as requested to unblock things. Thanks for the patch, sorry for the trouble! Comment at: lib/Sema/SemaChecking.cpp:11818 bool StmtLineInvalid; - un

[PATCH] D40185: Loosen -Wempty-body warning.

2017-11-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 123406. rnk added a comment. - minor tweak https://reviews.llvm.org/D40185 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/ParseStmt.cpp clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaStmt.cpp clang/test/SemaCXX/warn-empty-body.cpp Index:

r318556 - Loosen -Wempty-body warning

2017-11-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Nov 17 13:33:28 2017 New Revision: 318556 URL: http://llvm.org/viewvc/llvm-project?rev=318556&view=rev Log: Loosen -Wempty-body warning Do not show it when `if` or `else` come from macros. E.g., #define USED(A) if (A); else #define SOME_IF(A) if (A) void test()

[PATCH] D40185: Loosen -Wempty-body warning.

2017-11-17 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318556: Loosen -Wempty-body warning (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D40185?vs=123406&id=123410#toc Repository: rL LLVM https://reviews.llvm.org/D40185 Files: c

[PATCH] D40194: [libcxxabi][CMake] Provide option to disable installing of the library

2017-11-17 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. Herald added a subscriber: mgorny. This is useful in cases where we only build static library and libc++abi.a is combined with libc++.a into a single archive in which case we don't want to have libc++abi.a installed separately. The same option is already provided by l

[PATCH] D40195: [libunwind][CMake] Provide option to disable instalation of the library

2017-11-17 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. Herald added a subscriber: mgorny. This is useful in cases where we only build static library and libunwind.a is combined with libc++abi.a into a single archive in which case we don't want to have libunwind.a installed separately. The same option is already provided b

[PATCH] D40194: [libcxxabi][CMake] Provide option to disable installing of the library

2017-11-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM. Repository: rL LLVM https://reviews.llvm.org/D40194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D40195: [libunwind][CMake] Provide option to disable instalation of the library

2017-11-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM. Repository: rL LLVM https://reviews.llvm.org/D40195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

r318559 - Fix coverage test on Windows bot

2017-11-17 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Nov 17 13:55:23 2017 New Revision: 318559 URL: http://llvm.org/viewvc/llvm-project?rev=318559&view=rev Log: Fix coverage test on Windows bot Modified: cfe/trunk/test/Driver/coverage.c Modified: cfe/trunk/test/Driver/coverage.c URL: http://llvm.org/viewvc/llvm-project/c

r318562 - [cmake] Use llvm-lit directory when provided for stand-alone build

2017-11-17 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Fri Nov 17 14:21:23 2017 New Revision: 318562 URL: http://llvm.org/viewvc/llvm-project?rev=318562&view=rev Log: [cmake] Use llvm-lit directory when provided for stand-alone build After the recent lit test changes, clang attempts to run its tests via llvm-lit by default. Howev

[PATCH] D40142: [cmake] Use llvm-lit directory when provided for stand-alone build

2017-11-17 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318562: [cmake] Use llvm-lit directory when provided for stand-alone build (authored by mgorny). Changed prior to commit: https://reviews.llvm.org/D40142?vs=123219&id=123419#toc Repository: rL LLVM

[PATCH] D40144: Implement `std::launder`

2017-11-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked an inline comment as done. mclow.lists added inline comments. Comment at: include/new:174 +_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY +constexpr _Tp* launder(_Tp* __p) noexcept { return __p;} +#endif efriedma wrote: > efried

[PATCH] D40198: [CUDA] Tweak CUDA wrappers to make cuda-9 work with libc++

2017-11-17 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. CUDA-9 headers check for specific libc++ version and ifdef out some of the definitions we need if LIBCPP_VERSION >= 3800. https://reviews.llvm.org/D40198 Files: clang/lib/Headers/__clang_cuda_runtim

[PATCH] D40144: Implement `std::launder`

2017-11-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 123422. mclow.lists marked an inline comment as done. mclow.lists added a comment. Move the `launder` function into the main libc++ namespace. Call `__builtin_launder` when available. Check to see when it's available (for gcc and clang) https://reviews.l

[PATCH] D39953: [CodeGen] Do not lookup for cached TBAA metadata nodes twice

2017-11-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think having a primary function that handles the caching logic makes some sense. I think there might be some cases that intentionally don't cache their normal result, though, so it might be harder than you think. Up to you whether you want to continue. Repository

[libcxxabi] r318563 - [CMake][libcxxabi] Support merging objects when statically linking unwinder

2017-11-17 Thread Petr Hosek via cfe-commits
Author: phosek Date: Fri Nov 17 14:49:39 2017 New Revision: 318563 URL: http://llvm.org/viewvc/llvm-project?rev=318563&view=rev Log: [CMake][libcxxabi] Support merging objects when statically linking unwinder When using LLVM unwinder and static unwinder option is set, merge libunwind and libc++ab

[PATCH] D39930: [CMake] Use libc++ and compiler-rt as default libraries in Fuchsia toolchain

2017-11-17 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 123432. Repository: rL LLVM https://reviews.llvm.org/D39930 Files: cmake/caches/Fuchsia-stage2.cmake Index: cmake/caches/Fuchsia-stage2.cmake === --- cmake/caches/Fuchsia-stage2.cmake +++ c

r318567 - Change code owner for Clang Static Analyzer to Devin Coughlin.

2017-11-17 Thread Anna Zaks via cfe-commits
Author: zaks Date: Fri Nov 17 15:19:04 2017 New Revision: 318567 URL: http://llvm.org/viewvc/llvm-project?rev=318567&view=rev Log: Change code owner for Clang Static Analyzer to Devin Coughlin. Differential Revision: https://reviews.llvm.org/D39964 Modified: cfe/trunk/CODE_OWNERS.TXT Modifi

[PATCH] D39964: Change code owner for Clang Static Analyzer to Devin Coughlin.

2017-11-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318567: Change code owner for Clang Static Analyzer to Devin Coughlin. (authored by zaks). Changed prior to commit: https://reviews.llvm.org/D39964?vs=122678&id=123435#toc Repository: rL LLVM https:

[libcxxabi] r318568 - [libcxxabi][CMake] Provide option to disable installing of the library

2017-11-17 Thread Petr Hosek via cfe-commits
Author: phosek Date: Fri Nov 17 15:25:09 2017 New Revision: 318568 URL: http://llvm.org/viewvc/llvm-project?rev=318568&view=rev Log: [libcxxabi][CMake] Provide option to disable installing of the library This is useful in cases where we only build static library and libc++abi.a is combined with l

[PATCH] D40194: [libcxxabi][CMake] Provide option to disable installing of the library

2017-11-17 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318568: [libcxxabi][CMake] Provide option to disable installing of the library (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D40194?vs=123412&id=123439#toc Repository: rL LL

[libunwind] r318569 - [libunwind][CMake] Provide option to disable instalation of the library

2017-11-17 Thread Petr Hosek via cfe-commits
Author: phosek Date: Fri Nov 17 15:29:46 2017 New Revision: 318569 URL: http://llvm.org/viewvc/llvm-project?rev=318569&view=rev Log: [libunwind][CMake] Provide option to disable instalation of the library This is useful in cases where we only build static library and libunwind.a is combined with

[PATCH] D40195: [libunwind][CMake] Provide option to disable instalation of the library

2017-11-17 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318569: [libunwind][CMake] Provide option to disable instalation of the library (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D40195?vs=123413&id=123440#toc Repository: rL L

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-17 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 123446. juliehockett marked 2 inline comments as done. juliehockett added a comment. Updated docs and added tests to check class methods. https://reviews.llvm.org/D40108 Files: clang-tidy/CMakeLists.txt clang-tidy/fuchsia/CMakeLists.txt clang-tid

[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

2017-11-17 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added a comment. In https://reviews.llvm.org/D40108#928224, @Eugene.Zelenko wrote: > > I think it should use project-specific prefix, since it's open source > project. Google may have different coding guidelines for other projects. Reasonable. It makes sense to consider it on a

r318578 - Fix some -Wunused-variable warnings

2017-11-17 Thread Hans Wennborg via cfe-commits
Author: hans Date: Fri Nov 17 16:49:18 2017 New Revision: 318578 URL: http://llvm.org/viewvc/llvm-project?rev=318578&view=rev Log: Fix some -Wunused-variable warnings Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp cfe/trunk/lib/CodeGen/CGStmt.cpp cfe/trunk/lib/CodeGen/CGStmtOpenM

Re: r318536 - [OPENMP] Codegen for `target simd` construct.

2017-11-17 Thread Hans Wennborg via cfe-commits
I think this caused some unused variable warnings: ../tools/clang/lib/CodeGen/CGStmtOpenMP.cpp:360:25: warning: unused variable 'ExtInfo' [-Wunused-variable] FunctionType::ExtInfo ExtInfo; ^ 1 warning generated. [3049/3507] Building CXX object tools/clang/lib/CodeGen/CMak

  1   2   >