[libunwind] r319300 - Support building libunwind as a DLL

2017-11-29 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Wed Nov 29 00:21:12 2017 New Revision: 319300 URL: http://llvm.org/viewvc/llvm-project?rev=319300=rev Log: Support building libunwind as a DLL Differential Revision: https://reviews.llvm.org/D40483 Modified: libunwind/trunk/CMakeLists.txt

[libunwind] r319299 - [CMake] Use the variable from the right project in install-unwind

2017-11-29 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Wed Nov 29 00:20:57 2017 New Revision: 319299 URL: http://llvm.org/viewvc/llvm-project?rev=319299=rev Log: [CMake] Use the variable from the right project in install-unwind Modified: libunwind/trunk/src/CMakeLists.txt Modified: libunwind/trunk/src/CMakeLists.txt URL:

[PATCH] D40594: [InstCombine] miscompile of __builtin_fmod

2017-11-29 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk created this revision. Motivation: https://bugs.llvm.org/show_bug.cgi?id=34870 I'm totally not sure this is correct https://reviews.llvm.org/D40594 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtins.c Index: test/CodeGen/builtins.c

[PATCH] D40528: add new check to find NSError init invocation

2017-11-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/objc/AvoidNserrorInitCheck.cpp:31 + diag(MatchedExpr->getLocStart(), + "use errorWithDomain:code:userInfo: to create a new NSError"); +} not sure what's the best message here. From apple's document: >

[PATCH] D40564: [clangd] Simplify common JSON-parsing patterns in Protocol.

2017-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Comment at: clangd/Protocol.cpp:56 +assert(*this && "Must check this is an object before calling parse()"); +if (const json::Expr *E = O->get(Prop)) { +

[PATCH] D40508: Replace long type names in IR with hashes

2017-11-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In https://reviews.llvm.org/D40508#938686, @rjmccall wrote: > In https://reviews.llvm.org/D40508#938675, @sepavloff wrote: > > > In https://reviews.llvm.org/D40508#938040, @rjmccall wrote: > > > > > My skepticism about the raw_ostream is not about the design of having

[clang-tools-extra] r319309 - [clangd] Simplify common JSON-parsing patterns in Protocol.

2017-11-29 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Nov 29 03:36:46 2017 New Revision: 319309 URL: http://llvm.org/viewvc/llvm-project?rev=319309=rev Log: [clangd] Simplify common JSON-parsing patterns in Protocol. Summary: This makes the parse() functions about as short as they can be given the current signature, and

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is how I always perceived this option in the first place, so LGTM. But maybe its intention is different, so we should wait for @arphaman's comments. Could you also update comments of `CodeCompleteConsumer::includeGlobals` and

[PATCH] D40310: Restructure how we break tokens.

2017-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1707 + RemainingTokenColumns = Token->getRemainingLength( + NextLineIndex, TailOffset, ContentStartColumn); + Reflow = true; krasimir wrote: > When we're

[PATCH] D40564: [clangd] Simplify common JSON-parsing patterns in Protocol.

2017-11-29 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL319309: [clangd] Simplify common JSON-parsing patterns in Protocol. (authored by sammccall). Changed prior to commit: https://reviews.llvm.org/D40564?vs=124585=124713#toc Repository: rL LLVM

[PATCH] D40310: Restructure how we break tokens.

2017-11-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1749 + } + if (!Reflow) { +// If we didn't reflow into the next line, the only space to consider is nit: Maybe change this to `if (Reflow)` and switch the if-else

[PATCH] D40543: Pass by reference NewQualifiedName in QualifiedRenameRule

2017-11-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: include/clang/Tooling/Refactoring/Rename/RenamingAction.h:79 QualifiedRenameRule(const NamedDecl *ND, - std::string NewQualifiedName) + const std::string ) : ND(ND),

[PATCH] D40310: Restructure how we break tokens.

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

[PATCH] D40060: [clangd] Fuzzy match scorer

2017-11-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/FuzzyMatch.cpp:118 +0x00, 0x00, 0x00, 0x00, // Control characters +0xff, 0xff, 0xff, 0xff, // Punctuation +0x55, 0x55, 0xf5, 0xff, // Numbers->Lower, more Punctuation. I'm not sure if we care,

[PATCH] D34030: Fix the postorder visting of the ClassTemplateSpecializationDecl nodes in the RecursiveASTVisitor.

2017-11-29 Thread Peter Siket via Phabricator via cfe-commits
MontyKutyi added a comment. Ping. https://reviews.llvm.org/D34030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40596: [clangd] New conventions for JSON-marshalling functions, centralize machinery

2017-11-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added subscribers: cfe-commits, klimek. - JSON<->Obj interface is now ADL functions, so they play nicely with enums - recursive vector/map parsing and ObjectMapper moved to JSONExpr and tested - renamed (un)parse to (de)serialize, since text -> JSON is

[PATCH] D40594: [InstCombine] miscompile of __builtin_fmod

2017-11-29 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added reviewers: efriedma, hfinkel. spatel added a comment. I don't know the history of the frem instruction in IR, and the description in http://llvm.org/docs/LangRef.html#frem-instruction is vague. But based on the existing code, I think this is working as intended. If the instruction

[PATCH] D40563: [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context.

2017-11-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Sema/CodeCompleteConsumer.h:284 + llvm::Optional ScopeSpecifier; + Maybe add a brief comment for consistency with other decls? Comment at: lib/Sema/SemaCodeComplete.cpp:4609 +

[PATCH] D39114: [XRay][compiler-rt][Darwin] Minimal XRay build support in Darwin

2017-11-29 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris closed this revision. dberris added a comment. Already commited; closing this revision out now. https://reviews.llvm.org/D39114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40310: Restructure how we break tokens.

2017-11-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D40310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39114: [XRay][compiler-rt][Darwin] Minimal XRay build support in Darwin

2017-11-29 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 124717. dberris added a comment. - [XRay][compiler-rt][Darwin] Use dynamic initialisation as an alternative https://reviews.llvm.org/D39114 Files: compiler-rt/cmake/config-ix.cmake compiler-rt/lib/xray/CMakeLists.txt

[PATCH] D40463: [analyzer] Fix false negative on post-increment of uninitialized variable.

2017-11-29 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp:64 +if (const UnaryOperator *U = dyn_cast(StoreE)) { + str = "The expression of the unary operator is an uninitialized value. " +"The computed value will

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

2017-11-29 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 124726. kosarev added a comment. - Added tests with nested unions. - Rebased. https://reviews.llvm.org/D39455 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/CodeGenTBAA.cpp lib/CodeGen/CodeGenTBAA.h

[PATCH] D40601: [XRay][clang] Introduce -fxray-always-emit-customevents

2017-11-29 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. The -fxray-always-emit-customevents flag instructs clang to always emit the LLVM IR for calls to the `__xray_customevent(...)` built-in function. The default behaviour currently respects whether the function has an `[[clang::xray_never_instrument]]` attribute, and

[PATCH] D40310: Restructure how we break tokens.

2017-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1749 + } + if (!Reflow) { +// If we didn't reflow into the next line, the only space to consider is krasimir wrote: > nit: Maybe change this to `if (Reflow)` and

[PATCH] D40588: [OpenMP] Diagnose undeclared variables on declare target clause

2017-11-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev requested changes to this revision. ABataev added a comment. This revision now requires changes to proceed. I'm unable to reproduce a crash, the test works correctly even without you patch https://reviews.llvm.org/D40588 ___ cfe-commits

r319314 - Restructure how we break tokens.

2017-11-29 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Wed Nov 29 06:29:43 2017 New Revision: 319314 URL: http://llvm.org/viewvc/llvm-project?rev=319314=rev Log: Restructure how we break tokens. This fixes some bugs in the reflowing logic and splits out the concerns of reflowing from BreakableToken. Things to do after this

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-11-29 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. I tried to compile some important libraries for X86 and MIPS64 within Chromium with clang/llvm. I have compared results between LLVM trunk, and LLVM trunk with my patch. There is code size improvement on many libraries, here are some results: - X86 libframe

[PATCH] D40594: [InstCombine] miscompile of __builtin_fmod

2017-11-29 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. Side note: I think there is a different bug here in clang because from what I can tell, we convert the builtin or libcall to 'frem' even when errno could be set by the call. https://reviews.llvm.org/D40044 doesn't address this case because frem is an LLVM instruction

r319318 - Fix 'control reaches end of non-void' warning by using llvm_unreachable.

2017-11-29 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Wed Nov 29 07:09:12 2017 New Revision: 319318 URL: http://llvm.org/viewvc/llvm-project?rev=319318=rev Log: Fix 'control reaches end of non-void' warning by using llvm_unreachable. Modified: cfe/trunk/lib/Format/BreakableToken.cpp Modified:

[PATCH] D40310: Restructure how we break tokens.

2017-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL319314: Restructure how we break tokens. (authored by klimek). Repository: rL LLVM https://reviews.llvm.org/D40310 Files: cfe/trunk/lib/Format/BreakableToken.cpp

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

2017-11-29 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. A couple of late comments. Comment at: clang-tidy/fuchsia/DefaultArgumentsCheck.cpp:39 + return; +} else if (DefaultArgRange.getBegin().isMacroID()) { + diag(D->getLocStart(), No `else` after `return`, please.

r319319 - Follow up of r319317, add the missing header file

2017-11-29 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Wed Nov 29 07:11:53 2017 New Revision: 319319 URL: http://llvm.org/viewvc/llvm-project?rev=319319=rev Log: Follow up of r319317, add the missing header file Modified: cfe/trunk/lib/Driver/ToolChains/Cuda.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Cuda.cpp URL:

[PATCH] D40527: [libclang] Record parsing invocation to a temporary file when requested by client

2017-11-29 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added inline comments. Comment at: tools/libclang/CIndexer.cpp:108 + // Write out the information about the invocation to it. + auto WriteStringKey = [&](StringRef Key, StringRef Value) { +OS << R"(")" << Key << R"(":")"; Nit: Maybe capturing

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

2017-11-29 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. Thanks George for the review. I will start working on the code right away. I've tried to answer the simpler cases. Comment at: tools/scan-build-py/libscanbuild/analyze.py:44 +CTU_FUNCTION_MAP_FILENAME = 'externalFnMap.txt' +CTU_TEMP_FNMAP_FOLDER =

r319269 - Reland "Fix vtable not receiving hidden visibility when using push(visibility)"

2017-11-29 Thread Jake Ehrlich via cfe-commits
Author: jakehehrlich Date: Tue Nov 28 16:54:20 2017 New Revision: 319269 URL: http://llvm.org/viewvc/llvm-project?rev=319269=rev Log: Reland "Fix vtable not receiving hidden visibility when using push(visibility)" I had to reland this change in order to make the test work on windows This change

r319322 - Fix function call to fix build

2017-11-29 Thread Ismail Donmez via cfe-commits
Author: ismail Date: Wed Nov 29 07:18:02 2017 New Revision: 319322 URL: http://llvm.org/viewvc/llvm-project?rev=319322=rev Log: Fix function call to fix build ../tools/clang/lib/Driver/ToolChains/Cuda.cpp:80:18: error: reference to non-static member function must be called; did you mean to call

[PATCH] D40563: [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context.

2017-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 124739. ioeric marked 4 inline comments as done. ioeric added a comment. - Address review comments. https://reviews.llvm.org/D40563 Files: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/SemaCodeComplete.cpp Index: lib/Sema/SemaCodeComplete.cpp

[PATCH] D40563: [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context.

2017-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:4609 + if (SS.isInvalid()) { +CodeCompletionContext CC(CodeCompletionContext::CCC_Name); ilya-biryukov wrote: > ilya-biryukov wrote: > > Why do we alter this code path? > Maybe we

[PATCH] D40453: Add the nvidia-cuda-toolkit Debian package path to search path

2017-11-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC319317: Add the nvidia-cuda-toolkit Debian package path to search path (authored by sylvestre). Repository: rC Clang https://reviews.llvm.org/D40453 Files: lib/Driver/ToolChains/Cuda.cpp Index:

r319317 - Add the nvidia-cuda-toolkit Debian package path to search path

2017-11-29 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Wed Nov 29 07:03:28 2017 New Revision: 319317 URL: http://llvm.org/viewvc/llvm-project?rev=319317=rev Log: Add the nvidia-cuda-toolkit Debian package path to search path Summary: Reported here: http://bugs.debian.org/882505 Patch by Andreas Beckmann Reviewers:

[PATCH] D40527: [libclang] Record parsing invocation to a temporary file when requested by client

2017-11-29 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added inline comments. Comment at: tools/libclang/CIndexer.cpp:131 + if (!File.empty()) +llvm::sys::fs::remove(File); +} Just a thought - since we are not propagating errors from constructor we are not really sure we were able to create the

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 124740. ioeric added a comment. - Clarify comment for includeGlobals() https://reviews.llvm.org/D40562 Files: include/clang/Sema/CodeCompleteConsumer.h lib/Sema/SemaCodeComplete.cpp lib/Sema/SemaLookup.cpp test/CodeCompletion/ignore-global-decls.cpp

[PATCH] D39812: [Driver, CodeGen] pass through and apply -fassociative-math

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

[PATCH] D40463: [analyzer] Fix false negative on post-increment of uninitialized variable.

2017-11-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp:64 +if (const UnaryOperator *U = dyn_cast(StoreE)) { + str = "The expression of the unary operator is an uninitialized value. " +"The computed value will

[PATCH] D40605: Better trade-off for excess characters vs. staying within the column limits.

2017-11-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. When we break a long line like: Column limit: 21 | // foo foo foo foo foo foo foo foo foo foo foo foo The local decision when to allow protruding vs. breaking can lead to this outcome (2 excess characters, 2 breaks): // foo foo foo foo

[PATCH] D40548: [clangd] Prototyping index support and naive index-based global code completion. WIP

2017-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 124745. ioeric added a comment. Herald added a subscriber: klimek. Merged with origin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/ASTIndex.cpp clangd/ASTIndex.h clangd/CMakeLists.txt

r319320 - [OPENMP] General improvement of handling of `teams distribute`

2017-11-29 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Nov 29 07:14:16 2017 New Revision: 319320 URL: http://llvm.org/viewvc/llvm-project?rev=319320=rev Log: [OPENMP] General improvement of handling of `teams distribute` directive, NFC. Some general improvements in support of `teams distribute` directive. Modified:

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

2017-11-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdUnit.cpp:1173 +H.range = L.range; +Ref = getDataBufferFromSourceRange(AST, SR, L); + } malaperle wrote: > malaperle wrote: > > I get the same crash as I mentioned before if I hover on

[PATCH] D39376: [PowerPC] Add implementation for -msave-toc-indirect option - clang portion

2017-11-29 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added inline comments. Comment at: include/clang/Driver/Options.td:1907 def mvsx : Flag<["-"], "mvsx">, Group; +def msave_toc_indirect : Flag<["-"], "msave-toc-indirect">, Group; def mno_vsx : Flag<["-"], "mno-vsx">, Group; hfinkel wrote: > You also

Re: [llvm-dev] LLVM buildmaster is back to work now but two builders remain OFF

2017-11-29 Thread Greg Bedwell via cfe-commits
> Two slaves remain off for now as they produce a lot of warnings and their log files are way too big. I think https://reviews.llvm.org/D40603 will fix this issue. -Greg On 28 November 2017 at 22:13, Galina Kistanova via llvm-dev < llvm-...@lists.llvm.org> wrote: > Hello everyone, > > LLVM

[PATCH] D40476: Switch kryo to use -mcpu=cortex-a57 when invoking the assembler

2017-11-29 Thread Chad Rosier via Phabricator via cfe-commits
mcrosier added a comment. In https://reviews.llvm.org/D40476#936700, @mcrosier wrote: > In https://reviews.llvm.org/D40476#936372, @pirama wrote: > > > Thanks for the review. Now let's just hope the windows bots stay happy :) > > > Actually, I just checked and it looks like falkor and saphira

[PATCH] D39347: Fix __has_unique_object_representations based on rsmith's input

2017-11-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 124769. erichkeane added a comment. Woops, missed an 'svn add' and lost the member ptr test. Back now! https://reviews.llvm.org/D39347 Files: include/clang/AST/ASTContext.h include/clang/AST/Type.h lib/AST/ASTContext.cpp lib/AST/CXXABI.h

[PATCH] D40611: Add has definition AST matcher

2017-11-29 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. Herald added a subscriber: klimek. Adds AST matcher for the definition of a CXXRecordDecl. https://reviews.llvm.org/D40611 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp

[PATCH] D40463: [analyzer] Fix false negative on post-increment of uninitialized variable.

2017-11-29 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:1046 if (V2_untested.isUnknownOrUndef()) { Bldr.generateNode(U, *I, state->BindExpr(U, LCtx, V2_untested)); + lebedev.ri wrote: > dcoughlin wrote: > > Instead of

r319332 - [OPENMP] Do not allow `linear` clauses on non-simd distribute

2017-11-29 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Nov 29 10:20:04 2017 New Revision: 319332 URL: http://llvm.org/viewvc/llvm-project?rev=319332=rev Log: [OPENMP] Do not allow `linear` clauses on non-simd distribute directives. `linear` clause is not allowed on non-simd distribute-based directives. Removed:

[PATCH] D40566: Check if MemberExpr arguments are type-dependent.

2017-11-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi, thanks for working on this! Why don't we just set the TypeDependent bit to false when building the underlying MemberExpr here? Based on the section of the standard you quoted that node shouldn't be considered type-dependent, but it is by clang. I think this

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

2017-11-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/Protocol.h:453 +struct MarkedString { + /** + * MarkedString can be used to render human readable text. It is either a The doc should use /// like the others https://reviews.llvm.org/D35894

[PATCH] D40574: Bounds check argument_with_type_tag attribute.

2017-11-29 Thread Matt Davis via Phabricator via cfe-commits
mattd updated this revision to Diff 124783. mattd added a comment. - Removed the new lines. - Added white space between the data type and pointer character. - Updated the test to check the exact bounds, and over-bounds cases - Combined the diagnostic messages into one via 'select'

[PATCH] D40569: Use default IR alignment for cleanup.dest.slot.

2017-11-29 Thread Jacob Young via Phabricator via cfe-commits
jacobly added a comment. Could someone commit this for me? Thanks. Repository: rC Clang https://reviews.llvm.org/D40569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40574: Bounds check argument_with_type_tag attribute.

2017-11-29 Thread Matt Davis via Phabricator via cfe-commits
mattd marked 6 inline comments as done. mattd added inline comments. Comment at: test/Sema/error-type-safety.cpp:3-4 + +static const int test_void + __attribute__((type_tag_for_datatype(test, void))) = 0; + aaron.ballman wrote: > Is this declaration necessary?

[PATCH] D40527: [libclang] Record parsing invocation to a temporary file when requested by client

2017-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 124788. arphaman added a comment. - Capture OS only. - Guard toolchain path accessor with a mutex. Repository: rC Clang https://reviews.llvm.org/D40527 Files: include/clang-c/Index.h test/Index/record-parsing-invocation.c

[PATCH] D40574: Bounds check argument_with_type_tag attribute.

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7922-7925 +def err_type_tag_out_of_range : Error< + "type tag index %0 is greater than the number of arguments specified">; +def err_arg_tag_out_of_range : Error< + "argument tag index

r319323 - [Driver] Turns out the GNU assembler does support falkor/saphira.

2017-11-29 Thread Chad Rosier via cfe-commits
Author: mcrosier Date: Wed Nov 29 08:42:44 2017 New Revision: 319323 URL: http://llvm.org/viewvc/llvm-project?rev=319323=rev Log: [Driver] Turns out the GNU assembler does support falkor/saphira. Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp cfe/trunk/test/Driver/as-mcpu.c Modified:

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:58 + // Interfaces should have exclusively pure methods. + for (auto method : Node->methods()) { +if (method->isUserProvided() && !method->isPure()) {

[clang-tools-extra] r319325 - [clang-tidy] make readability-simplify-bool-expr completely ignore macros

2017-11-29 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Nov 29 09:16:09 2017 New Revision: 319325 URL: http://llvm.org/viewvc/llvm-project?rev=319325=rev Log: [clang-tidy] make readability-simplify-bool-expr completely ignore macros Modified: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp

[PATCH] D39347: Fix __has_unique_object_representations based on rsmith's input

2017-11-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 124765. https://reviews.llvm.org/D39347 Files: include/clang/AST/ASTContext.h include/clang/AST/Type.h lib/AST/ASTContext.cpp lib/AST/CXXABI.h lib/AST/ItaniumCXXABI.cpp lib/AST/MicrosoftCXXABI.cpp lib/AST/Type.cpp lib/Sema/SemaExprCXX.cpp

[PATCH] D39347: Fix __has_unique_object_representations based on rsmith's input

2017-11-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/ASTContext.cpp:2213 +Field->isBitField() +? Field->getBitWidthValue(Context) +: Context.toBits(Context.getTypeSizeInChars(Field->getType())); erichkeane wrote: > rsmith wrote:

[PATCH] D40563: [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context.

2017-11-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:4609 + if (SS.isInvalid()) { +CodeCompletionContext CC(CodeCompletionContext::CCC_Name); ilya-biryukov wrote: > Why do we alter this code path? Maybe we should add a test or

[PATCH] D39279: Stringizing raw string literals containing newline

2017-11-29 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added a comment. I am sorry I wasn't really clear. What I meant was to do something like this (pseudo-code, dealing only with newlines): if( Str.size() == 0) return; // Calculate all the extra space needed first. typename T::size_type extra_space = 0; bool

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-11-29 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/fuchsia/MultipleInheritanceCheck.cpp:22 +AST_MATCHER(CXXRecordDecl, hasDefinition) { + if (!Node.hasDefinition()) +return false;

[PATCH] D40528: add new check to find NSError init invocation

2017-11-29 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added inline comments. Comment at: docs/clang-tidy/checks/objc-avoid-nserror-init.rst:10 +``errorWithDomain:code:userInfo:`` to create new NSError objects instead +of ``[NSError alloc] init]``. Otherwise it will lead to a warning message +during compilation in Xcode.

[PATCH] D40528: add new check to find NSError init invocation

2017-11-29 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 124818. Wizard marked 3 inline comments as done. Wizard added a comment. address comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40528 Files: clang-tidy/objc/AvoidNserrorInitCheck.cpp clang-tidy/objc/AvoidNserrorInitCheck.h

r319373 - [Coverage] Emit gap areas in braces-optional statements (PR35387)

2017-11-29 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Nov 29 14:25:14 2017 New Revision: 319373 URL: http://llvm.org/viewvc/llvm-project?rev=319373=rev Log: [Coverage] Emit gap areas in braces-optional statements (PR35387) Emit a gap area starting after the r-paren location and ending at the start of the body for the

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please rebase from trunk. I just enforced some order in chaos of Release Notes :-) https://reviews.llvm.org/D40580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r319376 - [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2017-11-29 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Nov 29 14:39:22 2017 New Revision: 319376 URL: http://llvm.org/viewvc/llvm-project?rev=319376=rev Log: [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). Modified: cfe/trunk/include/clang/AST/DeclTemplate.h

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

2017-11-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdUnit.h:320 + +StringRef getDataBufferFromSourceRange(ParsedAST , SourceRange SR, + Location L); I think this can be only in the source file, in a an anonymous

[PATCH] D40611: Add has definition AST matcher

2017-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Commit in r319360 https://reviews.llvm.org/D40611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r319360 - Add the hasDefinition() AST matcher to match class declarations that also have a definition.

2017-11-29 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Nov 29 13:21:51 2017 New Revision: 319360 URL: http://llvm.org/viewvc/llvm-project?rev=319360=rev Log: Add the hasDefinition() AST matcher to match class declarations that also have a definition. Patch by Julie Hockett. Modified:

[PATCH] D40621: MS ABI: Treat explicit instantiation definitions of dllimport function templates as explicit instantiation decls (PR35435)

2017-11-29 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. This matches MSVC's behaviour, and we already do it for class templates since r270897. https://reviews.llvm.org/D40621 Files: lib/Sema/SemaTemplate.cpp test/CodeGenCXX/dllimport.cpp Index: test/CodeGenCXX/dllimport.cpp

r319363 - [EH] Use __CxxFrameHandler3 for C++ EH in MS environments

2017-11-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Nov 29 13:35:34 2017 New Revision: 319363 URL: http://llvm.org/viewvc/llvm-project?rev=319363=rev Log: [EH] Use __CxxFrameHandler3 for C++ EH in MS environments Fixes regression introduced by r319297. MSVC environments still use SEH unwind opcodes but they should use the

[PATCH] D40621: MS ABI: Treat explicit instantiation definitions of dllimport function templates as explicit instantiation decls (PR35435)

2017-11-29 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. Looks good, thanks! https://reviews.llvm.org/D40621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r319297 - Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-29 Thread Martin Storsjö via cfe-commits
On Wed, 29 Nov 2017, Martin Storsjö via cfe-commits wrote: On Wed, 29 Nov 2017, Reid Kleckner wrote: On Wed, Nov 29, 2017 at 12:21 PM, Martin Storsjö wrote: On Wed, 29 Nov 2017, Martell Malone via cfe-commits wrote: Thanks for letting me know Reid.

r319362 - [OPENMP] Allow only loop control variables in distribute simd

2017-11-29 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Nov 29 13:31:48 2017 New Revision: 319362 URL: http://llvm.org/viewvc/llvm-project?rev=319362=rev Log: [OPENMP] Allow only loop control variables in distribute simd directives. According to the OpenMP standard, only loop control variables can be used in linear clauses

[PATCH] D40563: [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context.

2017-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D40563#939555, @arphaman wrote: > Could you please add a test? Any tip on how this should be tested? I couldn't find any existing unit test for either SemaCodeComplete or code completion context (under `clang/unittests`). It might be

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-29 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124810. Nebiroth added a comment. Added verification for llvm::Expected in onDocumentHighlight Removed unused variable in ClangdUnit Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp

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

2017-11-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdUnit.cpp:1029 + SourceLocation LocStart = ValSourceRange.getBegin(); + SourceLocation LocEnd = Lexer::getLocForEndOfToken(ValSourceRange.getEnd(), 0, + SourceMgr,

Re: r319297 - Toolchain: Normalize dwarf, sjlj and seh eh

2017-11-29 Thread Martin Storsjö via cfe-commits
On Wed, 29 Nov 2017, Reid Kleckner wrote: On Wed, Nov 29, 2017 at 12:21 PM, Martin Storsjö wrote: On Wed, 29 Nov 2017, Martell Malone via cfe-commits wrote: Thanks for letting me know Reid. I’ll in work and won’t be able to access the repo

[PATCH] D40574: Bounds check argument_with_type_tag attribute.

2017-11-29 Thread Matt Davis via Phabricator via cfe-commits
mattd marked an inline comment as done. mattd added a comment. Thanks for the approval Aaron. I do not have commit access, would you mind submitting this on my behalf? https://reviews.llvm.org/D40574 ___ cfe-commits mailing list

[clang-tools-extra] r319369 - [Documentation] Sort Clang-tidy changes next way: new modules, new checks, renamed checks, extended checks, new check aliases.

2017-11-29 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Nov 29 14:17:39 2017 New Revision: 319369 URL: http://llvm.org/viewvc/llvm-project?rev=319369=rev Log: [Documentation] Sort Clang-tidy changes next way: new modules, new checks, renamed checks, extended checks, new check aliases. Sort checks in each section

[PATCH] D40611: Add has definition AST matcher

2017-11-29 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added a comment. That'd be great -- thank you! I did request commit rights, so hopefully I'll be able to do it myself next time. https://reviews.llvm.org/D40611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40574: Bounds check argument_with_type_tag attribute.

2017-11-29 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. Thanks, LGTM! https://reviews.llvm.org/D40574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40588: [OpenMP] Diagnose undeclared variables on declare target clause

2017-11-29 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 added a comment. The original case has the variables named "foo1" and foo2". Using "foo1" or "foo2" causes the assert! I update the description. https://reviews.llvm.org/D40588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40588: [OpenMP] Diagnose undeclared variables on declare target clause

2017-11-29 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 updated this revision to Diff 124811. kkwli0 added a comment. The assert occurs in VarOrFuncDeclFilterCCC::ValidateCandidate when clang::Sema::CorrectTypo is called. https://reviews.llvm.org/D40588 Files: lib/Sema/SemaOpenMP.cpp test/OpenMP/declare_target_messages.cpp Index:

[PATCH] D39347: Fix __has_unique_object_representations based on rsmith's input

2017-11-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 124863. erichkeane added a comment. Fix for trailing padding BITS, which obviously won't be merged. https://reviews.llvm.org/D39347 Files: include/clang/AST/ASTContext.h include/clang/AST/Type.h lib/AST/ASTContext.cpp lib/AST/CXXABI.h

[PATCH] D39347: Fix __has_unique_object_representations based on rsmith's input

2017-11-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ASTContext.cpp:2200 + Layout.getBaseClassOffset(Base->getAsCXXRecordDecl()); + CharUnits BaseSize = Context.getTypeSizeInChars(Base); + if (BaseOffset != CurOffset) erichkeane wrote: > rsmith

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2017-11-29 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: docs/clang-tidy/checks/fuchsia-multiple-inheritance.rst:46 + +See the features disallowed in Fuchsia at https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md alexfh wrote: > This is not about the check,

[PATCH] D40567: Always show template parameters in IR type names

2017-11-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. What actual problem is this solving? These IR type names exist only for the convenience of humans reading the IR, and making them long (potentially extremely long) by including template arguments seems likely to hinder that more than it helps.

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-11-29 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Here's a simple test that breaks: $ cat test.cpp namespace ns { void func(); } ns:: // complete $ c-index-test -code-completion-at=test.cpp:5:1 test.cpp FunctionDecl:{ResultType void}{TypedText func}{LeftParen (}{RightParen )} (50) Completion

[PATCH] D39347: Fix __has_unique_object_representations based on rsmith's input

2017-11-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/ASTContext.cpp:2200 + Layout.getBaseClassOffset(Base->getAsCXXRecordDecl()); + CharUnits BaseSize = Context.getTypeSizeInChars(Base); + if (BaseOffset != CurOffset) rsmith wrote: >

  1   2   >