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

2017-09-25 Thread Boris Kolpackov via Phabricator via cfe-commits
boris updated this revision to Diff 116442. boris added a comment. Another attempt to upload a clean diff (also rebased on latest HEAD). https://reviews.llvm.org/D37299 Files: docs/Modules.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td lib/Driver/ToolCh

[PATCH] D36487: Emit section information for extern variables.

2017-09-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Should I restrict the warning to just redeclarations (without definition) > instead? I think just redeclarations. The pattern of a declaration without a section followed by a definition with a section is common, and not really harmful. Comment at

[PATCH] D38209: [Sema] Correct nothrow inherited by noexcept

2017-09-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. As reported in https://bugs.llvm.org/show_bug.cgi?id=33235, a noexcept function was unable to inherit from a nothrow defaulted constructor. Attribute "nothrow" is supposed to be semantically identical to noexcept, and in fact, a number of other places in the code

[PATCH] D38208: Add support for remembering origins to ExternalASTMerger

2017-09-25 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/AST/ExternalASTMerger.cpp:79 + return cast(SearchResultDecl)->getPrimaryContext(); +else + return nullptr; // This type of lookup is unsupported No need for `else` here. Comment at: lib

[PATCH] D38210: [ubsan] Port the function sanitizer to C

2017-09-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. The function sanitizer relies on RTTI to check callee types, but this scheme doesn't work well in languages without the ODR. This patch introduces a simple, best-effort function type encoding which can be used when RTTI isn't available. In this scheme, function types ar

[PATCH] D38209: [Sema] Correct nothrow inherited by noexcept

2017-09-25 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. This sounds right to me and the test looks good. (I'll let an actual compiler dev sign off) https://reviews.llvm.org/D38209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D38211: [ubsan] Test -fsanitize=function with a C program

2017-09-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Herald added a subscriber: kubamracek. Depends on https://reviews.llvm.org/D38210 https://reviews.llvm.org/D38211 Files: test/ubsan/TestCases/TypeCheck/Function/function-c.c Index: test/ubsan/TestCases/TypeCheck/Function/function-c.c ==

[PATCH] D38210: [ubsan] Port the function sanitizer to C

2017-09-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 116453. vsk added a comment. - Remove some noisy changes. https://reviews.llvm.org/D38210 Files: docs/UndefinedBehaviorSanitizer.rst lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h tes

[PATCH] D36973: [libclang] Add support for querying cursor availability

2017-09-25 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn updated this revision to Diff 116456. jklaehn marked an inline comment as done. jklaehn added a comment. Added test for `AvailabilityKind.DEPRECATED`. `NOT_ACCESSIBLE` is never returned by `clang_getCursorAvailability` but only only used in `CodeCompletionResult`. https://reviews.llvm.

[PATCH] D38214: [analyzer] Fix crash on modeling of pointer arithmetic

2017-09-25 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added a subscriber: xazax.hun. This patch attempts to fix analyzer's crash on the newly added test case (see also https://bugs.llvm.org/show_bug.cgi?id=34374). Pointer subtraction appears to be modeled incorrectly in the following example: char* p; long

[PATCH] D36955: [libclang] Visit attributes for function and class templates

2017-09-25 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn added a reviewer: jbcoe. jklaehn added a comment. ping :) https://reviews.llvm.org/D36955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38048: [clangd] Add textDocument/signatureHelp

2017-09-25 Thread Raoul Wols via Phabricator via cfe-commits
rwols updated this revision to Diff 116461. rwols added a comment. - Update doxygen comment to say "signature help" instead of "code complete", - Refactor: put the FillDocumentation member function outside of `CompletionItemsCollector` so that `SignatureHelpCollector` can also use it. - Refactor:

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

2017-09-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. ping :) https://reviews.llvm.org/D37808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38048: [clangd] Add textDocument/signatureHelp

2017-09-25 Thread Raoul Wols via Phabricator via cfe-commits
rwols updated this revision to Diff 116466. rwols added a comment. - Add signature-help.test - Modify formatting.test to make the test pass. The test failed because clangd's response to the initialize request was changed to advertise signature help trigger characters, so the expected content len

[PATCH] D38083: [clangd] Skip informative qualifier chunks.

2017-09-25 Thread Raoul Wols via Phabricator via cfe-commits
rwols accepted this revision. rwols added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D38083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-09-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 116465. lebedev.ri added a comment. - Fixed handling of types > 64 bit (e.g. `__int128`), testcase added - Stage-2 build now fully passes (only one new warning, https://reviews.llvm.org/D38132) - Updated ReleaseNotes.rst Repository: rL LLVM https://re

[PATCH] D38048: [clangd] Add textDocument/signatureHelp

2017-09-25 Thread Raoul Wols via Phabricator via cfe-commits
rwols marked 3 inline comments as done. rwols added inline comments. Comment at: clangd/ClangdLSPServer.cpp:92 "completionProvider": {"resolveProvider": false, "triggerCharacters": [".",">",":"]}, + "signatureHelpProvider": {"triggerCharacters": ["(", ","]},

[PATCH] D38216: [C++17] Fix class template argument deduction for default constructors without an initializer

2017-09-25 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete created this revision. Rakete added a project: clang. As the title says, this makes following code compile: template struct Foo {}; Foo() -> Foo; Foo f; // ok https://reviews.llvm.org/D38216 Files: lib/Sema/SemaDecl.cpp test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.cl

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

2017-09-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi Roman, there are still some comments marked as `not done` from my review. Maybe other reviewers wait for there 'resolution', but from my side there are resolved. One more attempt to get the review rolling. Repository: rL LLVM https://reviews.llvm.org/D36836

[PATCH] D37562: [X86] Lower _mm[256|512]_[mask[z]]_avg_epu[8|16] intrinsics to native llvm IR

2017-09-25 Thread Yael Tsafrir via Phabricator via cfe-commits
ytsafrir added a comment. In https://reviews.llvm.org/D37562#877210, @MatzeB wrote: > Turned out to be code that had been preprocessed in the past. I'll > unpreprocess the xmmintrin.h/emmintrin.h parts now. Could you please update if this has resolved the issue? Repository: rL LLVM https:

[PATCH] D38221: Add CoreOption flag to "-coverage" option to make it available for clang-cl

2017-09-25 Thread Marco Castelluccio via Phabricator via cfe-commits
marco-c created this revision. The -coverage option is not a CoreOption, so it is not available to clang-cl. This patch adds the CoreOption flag to "-coverage" to allow it to be used with clang-cl. https://reviews.llvm.org/D38221 Files: include/clang/Driver/Options.td test/Driver/coverage.

[PATCH] D38179: [clang-tidy] Handle unions in modernize-use-equals-default check

2017-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseEqualsDefaultCheck.cpp:117 + const CXXMethodDecl *Operator) { + const auto *Record = Operator->getParent(); + Please don't use `auto` here or els

[PATCH] D21767: Fix instantiation of friend function templates

2017-09-25 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 116484. sepavloff edited the summary of this revision. sepavloff added a comment. Added regression test for PR34343 Investigation of this defect is presented in https://bugs.llvm.org/show_bug.cgi?id=34343 . https://reviews.llvm.org/D21767 Files: inclu

[PATCH] D37903: Fix assume-filename handling in clang-format.el

2017-09-25 Thread Philipp via Phabricator via cfe-commits
phst added inline comments. Comment at: tools/clang-format/clang-format.el:123 +(defun clang-format-region (start end &optional style assume-file-name) + "Use clang-format to format the code between START and END according to STYLE +using ASSUME-FILE-NAME to locate a style confi

[PATCH] D38225: [clangd] Fix missing "message" key when responding with unsupported method

2017-09-25 Thread Raoul Wols via Phabricator via cfe-commits
rwols created this revision. The language server protocol dictates that a ResponseError should have a [message string][1] describing the error. This adds a simple message to the error and a simple test. [1]: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#response-m

[PATCH] D38075: Fix PR34668 - P0704R1 implementation is too permissive

2017-09-25 Thread Tim Song via Phabricator via cfe-commits
tcanens updated this revision to Diff 116490. tcanens added a comment. Also tweaked preceding comment. https://reviews.llvm.org/D38075 Files: lib/Sema/SemaExprCXX.cpp test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp Index: test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp =

[PATCH] D38226: [XRay][Driver] Do not link in XRay runtime in shared libs

2017-09-25 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. This change ensures that we don't link in the XRay runtime when building shared libraries with clang. This doesn't prevent us from building shared libraris tht have XRay instrumentation sleds, but it does prevent us from linking in the static XRay runtime into a shar

[PATCH] D38214: [analyzer] Fix crash on modeling of pointer arithmetic

2017-09-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Looks good! I guess the accurate thing to do would be to return LocAsInteger of type `intptr_t` of an ElementRegion with index `-1` from SymbolicRegion around `p`. But i'm totally fine with another `UnknownVal` placeholder until this becomes an actual problem. Repository

[PATCH] D38228: Fix clangd when built with LLVM_LINK_LLVM_DYLIB=ON

2017-09-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. For the record, this is the same approach as in https://reviews.llvm.org/rL240104 https://reviews.llvm.org/D38228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D38228: Fix clangd when built with LLVM_LINK_LLVM_DYLIB=ON

2017-09-25 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. Herald added subscribers: ilya-biryukov, mgorny. https://reviews.llvm.org/D38228 Files: clangd/tool/CMakeLists.txt Index: clangd/tool/CMakeLists.txt === --- clangd/tool/CMakeLists.txt +++ cl

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

2017-09-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D30691#878711, @r.stahl wrote: > If either of the FullSourceLocs is a MacroID, the call > SM.getFileEntryForID(XL.getFileID()) will return a null pointer. The null > pointer will crash the program when attempting to call ->getName() on it.

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

2017-09-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 116502. xazax.hun added a comment. Herald added a subscriber: baloghadamsoftware. - Fixed an issue with source locations - Updated to latest trunk https://reviews.llvm.org/D30691 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h include/clang

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

2017-09-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D30691#878830, @r.stahl wrote: > For my purposes I replaced the return statement of the > compareCrossTUSourceLocs function with: > > return XL.getFileID() < YL.getFileID(); > > > A more correct fix would create only one unique diagnostic

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-09-25 Thread Eniko Donatella Toth via Phabricator via cfe-commits
NorenaLeonetti added a comment. In https://reviews.llvm.org/D33826#866145, @lebedev.ri wrote: > In https://reviews.llvm.org/D33826#866133, @NorenaLeonetti wrote: > > > In https://reviews.llvm.org/D33826#861226, @aaron.ballman wrote: > > > > > Have you run this check over any large code bases to s

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-09-25 Thread Eniko Donatella Toth via Phabricator via cfe-commits
NorenaLeonetti updated this revision to Diff 116510. Repository: rL LLVM https://reviews.llvm.org/D33826 Files: clang-tidy/cert/AvoidPointerCastToMoreStrictAlignmentCheck.cpp clang-tidy/cert/AvoidPointerCastToMoreStrictAlignmentCheck.h clang-tidy/cert/CERTTidyModule.cpp clang-tidy/cert

[PATCH] D38231: fixing a bug in mask[z]_set1

2017-09-25 Thread jina via Phabricator via cfe-commits
jina.nahias created this revision. https://reviews.llvm.org/D38231 Files: lib/Headers/avx512vlintrin.h Index: lib/Headers/avx512vlintrin.h === --- lib/Headers/avx512vlintrin.h +++ lib/Headers/avx512vlintrin.h @@ -5761,15 +5761,15

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-09-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 116512. NoQ added a comment. Fix some comments in tests. Devin: ok to commit? I hope i didn't miss anything in my reasoning about boxed expressions. https://reviews.llvm.org/D35216 Files: lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/initializer.cp

[PATCH] D38231: fixing a bug in mask[z]_set1

2017-09-25 Thread jina via Phabricator via cfe-commits
jina.nahias updated this revision to Diff 116513. https://reviews.llvm.org/D38231 Files: lib/Headers/avx512vlintrin.h test/CodeGen/avx512vl-builtins.c Index: test/CodeGen/avx512vl-builtins.c === --- test/CodeGen/avx512vl-builti

[PATCH] D38118: [CodeGen][ObjC] Build the global block structure before emitting the body of global block invoke functions

2017-09-25 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314029: [CodeGen][ObjC] Build the global block structure before emitting the (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D38118?vs=116135&id=116524#toc Repository: rL LL

[PATCH] D36737: [analyzer] Store design discussions in docs/analyzer for future use.

2017-09-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 116520. NoQ added a comment. Update to use `.rst` formatting. https://reviews.llvm.org/D36737 Files: docs/analyzer/DesignDiscussions/InitializerLists.rst Index: docs/analyzer/DesignDiscussions/InitializerLists.rst

[PATCH] D38214: [analyzer] Fix crash on modeling of pointer arithmetic

2017-09-25 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Thanks for the fix! Repository: rL LLVM https://reviews.llvm.org/D38214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32520: Support __fp16 vectors

2017-09-25 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314056: Promote storage-only __fp16 vector operands to float vectors. (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D32520?vs=116275&id=116533#toc Repository: rL LLVM htt

[PATCH] D38203: [Sema] Corrected the warn-on-throw-from-noexcept behavior to include nothrow

2017-09-25 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. Aside from a minor testing nit, LGTM! Thanks! Comment at: test/SemaCXX/warn-throw-out-noexcept-func.cpp:20 + } + void __attribute__((nothrow)) SomeThrow() {//

[PATCH] D38202: Add Documentation to attribute-nothrow. Additionally, limit to functions.

2017-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2692 + let Content = [{ +Clang supports the GNU style ``__attribute__((nothrow))`` attribute as an +equivilent of `noexcept` on function declarations. This attribute informs the Sho

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-09-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Nice! /home/eenitot/new_llvm/llvm/lib/Support/ConvertUTFWrapper.cpp:38:26: warning: do not cast pointers into more strictly aligned pointer types [cert-exp36-c] UTF16 *targetStart = reinterpret_cast(ResultPtr); ^ Hmm, the text is we

[PATCH] D38205: [Sema] Warn on attribute nothrow conflicting with language specifiers

2017-09-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1411 +def warn_nothrow_attr_disagrees_with_exception_specification +: ExtWarn<"Attribute nothrow ignored, it disagrees with language specified " + "exception specificatio

[PATCH] D38231: fixing a bug in mask[z]_set1

2017-09-25 Thread Igor Breger via Phabricator via cfe-commits
igorb accepted this revision. igorb added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D38231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

<    1   2