[PATCH] D44878: libFuzzer OpenBSD support

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

r328763 - Refactor some code for a warning. NFC.

2018-03-28 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Mar 28 22:14:17 2018 New Revision: 328763 URL: http://llvm.org/viewvc/llvm-project?rev=328763=rev Log: Refactor some code for a warning. NFC. Use range-based for-loops instead of iterators to walk over vectors. Switch the key of the DenseMap so a custom key handler is

[PATCH] D44865: [libc++] Implement P0608R1 - A sane variant converting constructor

2018-03-28 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 140188. lichray added a comment. More tests Repository: rCXX libc++ https://reviews.llvm.org/D44865 Files: include/variant test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44536#1051181, @ahatanak wrote: > I see, so Sema::CheckCompletedCXXClass probably isn't the right place to call > DeclareImplicitDestructor as that could significantly increase the size of > the AST. Right. Again, I'd like Richard to

[PATCH] D44865: [libc++] Implement P0608R1 - A sane variant converting constructor

2018-03-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This LGTM. However, we should add tests for `const bool` and `volatile bool` before committing. Also I would like @mclow.lists input about applying this DR early since LWG hasn't commented on it yet. Repository: rCXX libc++ https://reviews.llvm.org/D44865

[libcxx] r328760 - fix typo in align_const_pair_U_V.pass.cpp

2018-03-28 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Mar 28 20:44:01 2018 New Revision: 328760 URL: http://llvm.org/viewvc/llvm-project?rev=328760=rev Log: fix typo in align_const_pair_U_V.pass.cpp Modified: libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/assign_const_pair_U_V.pass.cpp Modified:

[libcxx] r328758 - Move libc++ pair/tuple assign test to libcxx/ test directory.

2018-03-28 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Mar 28 20:30:00 2018 New Revision: 328758 URL: http://llvm.org/viewvc/llvm-project?rev=328758=rev Log: Move libc++ pair/tuple assign test to libcxx/ test directory. Libc++ implements the pair& operator=(pair) assignment operator using a single template that handles

[PATCH] D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members

2018-03-28 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov closed this revision. GorNishanov added a comment. Fixed: git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328663 91177308-0d34-0410-b5e6-96231b3b80d8 https://reviews.llvm.org/D37115 ___ cfe-commits mailing list

[PATCH] D43927: [Coroutines] Schedule coro-split before asan

2018-03-28 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov accepted this revision. GorNishanov added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D43927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45016: [libcxx] [test] Avoid MSVC truncation warnings.

2018-03-28 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. [libcxx] [test] Avoid MSVC truncation warnings. MSVC emits "warning C4244: 'initializing': conversion from 'int' to 'short', possible loss of data" when it sees pair constructed from (whatever, 4),

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-03-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: rsmith, vsapsai, erik.pilkington, ahatanak. Libc++ needs to know when aligned allocation is supported by clang, but is otherwise unavailable at link time. This patch adds a predefined macro to allow libc++ to do that. IDK if using a

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

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: akyrtzi, arphaman. Herald added subscribers: cfe-commits, ioeric, ilya-biryukov. The FileID/Offset conversion is lossy. The code takes the fileLoc, which loses e.g. the spelling location in some macro cases. Instead, pass the original

[PATCH] D44764: [clangd] Use operator<< to prevent printers issues in Gtest

2018-03-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: unittests/clangd/JSONExprTests.cpp:19 -void PrintTo(const Expr , std::ostream *OS) { - llvm::raw_os_ostream(*OS) << llvm::formatv("{0:2}", E); -} This one I couldn't change to operator<< because there was already one

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I see, so Sema::CheckCompletedCXXClass probably isn't the right place to call DeclareImplicitDestructor as that could significantly increase the size of the AST. Repository: rC Clang https://reviews.llvm.org/D44536

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 140180. malaperle added a comment. Use operator<< where we can Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44764 Files: clangd/Protocol.cpp clangd/Protocol.h unittests/clangd/CodeCompleteTests.cpp

r328754 - [astmatchers] Fix linking issue

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 19:47:28 2018 New Revision: 328754 URL: http://llvm.org/viewvc/llvm-project?rev=328754=rev Log: [astmatchers] Fix linking issue Modified: cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp Modified: cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp

[PATCH] D44764: [clangd] Use a header for common inclusions for tests

2018-03-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44764#1046766, @sammccall wrote: > I understand the template instantiations here are a mess and we need to solve > the problem. However I'm not sure this is the right direction: > > - it violates IWYU, and we expect people consistently to

[PATCH] D45013: Generate warning when over-aligned new call is required but not supported.

2018-03-28 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: vsapsai, mclow.lists. Herald added a subscriber: christof. Currently libc++ silently ignores over-aligned allocation requests made through __libcpp_allocate when aligned new/delete is not available. This patch uses the `diagnose_if`

[PATCH] D45012: [Modules] Skip adding unused module maps to the dependency file

2018-03-28 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added a reviewer: rsmith. Current generation of dependency files when modules is on take into account all parsed module maps found while searching for a specific module. Add a new cc1 flag that allows changing that behavior: only add module maps that actually

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think it's part of an effort to avoid creating implicit declarations for all the special members of every struct we parse from system headers. Repository: rC Clang https://reviews.llvm.org/D44536 ___ cfe-commits

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. BTW if you're interested in this stuff in clangd, there's some greener-field related stuff too: Our goal is to be able to do project-wide fuzzy-find navigation and code completion with the global symbol index. The index implementation in upstream clangd is naive at

r328752 - [analyzer] [testing] Be less verbose by default in integration testing.

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 18:23:54 2018 New Revision: 328752 URL: http://llvm.org/viewvc/llvm-project?rev=328752=rev Log: [analyzer] [testing] Be less verbose by default in integration testing. Modified: cfe/trunk/utils/analyzer/SATestBuild.py Modified:

[libcxx] r328751 - Fix PR36914 - num_get::get(unsigned) incorrectly handles negative numbers.

2018-03-28 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Mar 28 18:18:53 2018 New Revision: 328751 URL: http://llvm.org/viewvc/llvm-project?rev=328751=rev Log: Fix PR36914 - num_get::get(unsigned) incorrectly handles negative numbers. This patch corrects num_get for unsigned types to support strings with a leading `-`

r328750 - [astmatchers] Move a matcher out of internal namespace: blind debugging of MSVC issues

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 18:15:05 2018 New Revision: 328750 URL: http://llvm.org/viewvc/llvm-project?rev=328750=rev Log: [astmatchers] Move a matcher out of internal namespace: blind debugging of MSVC issues Modified: cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp

r328690 - [PATCH] [RISCV] Verify the input value of -march=

2018-03-28 Thread Shiva Chen via cfe-commits
Author: shiva Date: Wed Mar 28 01:29:50 2018 New Revision: 328690 URL: http://llvm.org/viewvc/llvm-project?rev=328690=rev Log: [PATCH] [RISCV] Verify the input value of -march= Summary: This patch doing more check and verify the -march= string and will issue an error if it's a invalid

Re: [clang-tools-extra] r328500 - [clangd] Support incremental document syncing

2018-03-28 Thread Simon Marchi via cfe-commits
On 2018-03-27 01:47 PM, Reid Kleckner wrote: > One of these new tests does not pass on Windows due to assumptions about > absolute path structure. The FileCheck output seems self-explanatory: > > $ "FileCheck" "-strict-whitespace" >

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry for the delay, it took me a while to understand exactly what everything is doing. If I understand right, there's actually no functional change (to match logic or scoring) being proposed here. But some nice fixes indeed! Most of the comments are readability

r328749 - [ast] Do not auto-initialize Objective-C for-loop variables in Objective-C++ in templatized code under ARC

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 17:56:24 2018 New Revision: 328749 URL: http://llvm.org/viewvc/llvm-project?rev=328749=rev Log: [ast] Do not auto-initialize Objective-C for-loop variables in Objective-C++ in templatized code under ARC The AST for the fragment ``` @interface I @end

r328746 - [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 17:51:11 2018 New Revision: 328746 URL: http://llvm.org/viewvc/llvm-project?rev=328746=rev Log: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods Differential Revision: https://reviews.llvm.org/D44707 Modified:

r328747 - [ASTMatchers] Introduce a matcher for matching any given Objective-C selector

2018-03-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Mar 28 17:51:12 2018 New Revision: 328747 URL: http://llvm.org/viewvc/llvm-project?rev=328747=rev Log: [ASTMatchers] Introduce a matcher for matching any given Objective-C selector Incudes a tiny related refactoring. Differential Revision:

[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

2018-03-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 140168. NoQ added a comment. Fix a comment in tests. https://reviews.llvm.org/D44854 Files: lib/Analysis/CFG.cpp lib/StaticAnalyzer/Core/ExprEngineCXX.cpp test/Analysis/cfg-rich-constructors.cpp test/Analysis/cxx17-mandatory-elision.cpp

[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

2018-03-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 140167. NoQ added a comment. Conditional operators, like call-expressions in https://reviews.llvm.org/D44273, may also be glvalues of record type instead of simply being reference-typed. https://reviews.llvm.org/D44854 Files: lib/Analysis/CFG.cpp

Re: r328282 - [analyzer] Trust _Nonnull annotations for system framework

2018-03-28 Thread Alexander Kornienko via cfe-commits
It looks like it was fixed, indeed. After an update I don't see an awful number of crashes any more. Thanks! On Mon, Mar 26, 2018 at 8:05 PM George Karpenkov wrote: > Yeah, I’m pretty sure this was fixed on Friday with > https://reviews.llvm.org/rC328406 > > On Mar 26,

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. A few more nits. Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:114-117 + auto ParentIter = Parents.begin(); + std::string ParentsStr = "'" +

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D44536#1039428, @rjmccall wrote: > Hmm. Sema is lazy about actually creating implicit destructor declarations, > but it's supposed to only do it whenever the destructor is actually used for > something. I'm looking at a similar problem

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

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 140160. sammccall added a comment. Handle the case where no points are awarded (e.g. system headers) and document awards better. Repository: rC Clang https://reviews.llvm.org/D45006 Files: include/clang/Tooling/CompilationDatabase.h

[PATCH] D45002: [test] Conservatively re-enable a FreeBSD/XRay test

2018-03-28 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: test/Driver/XRay/xray-instrument-os.c:2 // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s -// XFAIL: -linux- +// XFAIL: -linux-, -freebsd // REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64 devnexen

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-28 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: lib/CodeGen/CGException.cpp:1541 + } llvm::CallInst *terminateCall = + CGM.getCXXABI().emitTerminateForUnexpectedException(*this, Exn); aheejin wrote: > dschuff wrote: > > Should this be in an else block? No

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

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added subscribers: cfe-commits, ioeric, jkorous-apple, ilya-biryukov, klimek. This uses the inferring wrapper introduced in https://reviews.llvm.org/D45006. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45007 Files:

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-28 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added inline comments. Comment at: include/clang/Format/Format.h:1154-1163 + /// \brief The style of indenting long function or method names wrapped + /// onto the next line. + enum IndentWrappedMethodStyle { +/// Automatically determine indenting style. +

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

2018-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added subscribers: cfe-commits, mgorny, klimek. The wrapper finds the closest matching compile command using filename heuristics and makes minimal tweaks so it can be used with the header. (This is WIP and needs tests) Repository: rC Clang

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-28 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 140156. aheejin marked an inline comment as done. aheejin added a comment. - GNU_CPlusCPlus -> GNU_CPlusPlus Repository: rC Clang https://reviews.llvm.org/D44931 Files: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGCleanup.cpp lib/CodeGen/CGCleanup.h

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-28 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added inline comments. Comment at: lib/CodeGen/CGException.cpp:1541 + } llvm::CallInst *terminateCall = + CGM.getCXXABI().emitTerminateForUnexpectedException(*this, Exn); dschuff wrote: > Should this be in an else block? No need to emit it after

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > What do you think of the name IndentWrappedObjCMethodSignatures as an > alternative to IndentWrappedObjCMethodNames? In Objective-C the method name > might be considered the selector whereas I believe that this option pertains > to formatting of the method

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-28 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. What do you think of the name `IndentWrappedObjCMethodSignatures` as an alternative to `IndentWrappedObjCMethodNames`? In Objective-C the method name might be considered the selector whereas I believe that this option pertains to formatting of the method

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 140155. benhamilton added a comment. Fix typo Repository: rC Clang https://reviews.llvm.org/D45004 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp unittests/Format/FormatTestObjC.cpp Index:

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-03-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > In addition, `memset` can bind anything to the region, so > `getBindingForDerivedDefaultValue()`'s logic needs some adjustment. **The > solution in this patch is certainly not correct.** Yeah, i guess you meant here the thing that i was saying about concrete bindings.

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-03-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Why do you need separate code for null and non-null character? The function's semantics doesn't seem to care. I'd rather consider the case of non-concrete character separately. Because wiping a region with a symbol is not something we currently support; a symbolic default

[PATCH] D45002: [test] Conservatively re-enable a FreeBSD/XRay test

2018-03-28 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: test/Driver/XRay/xray-instrument-os.c:2 // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s -// XFAIL: -linux- +// XFAIL: -linux-, -freebsd // REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64 What

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-28 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Otherwise it looks good to me, although @majnemer would know more about the subtleties of what IR actually gets generated. Comment at: lib/CodeGen/CGCleanup.h:630 static const EHPersonality MSVC_CxxFrameHandler3; + static const EHPersonality

[PATCH] D45005: [clang-format] Set IndentWrappedObjCMethodNames to Always in google style

2018-03-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, klimek, jolesiak. Herald added a subscriber: cfe-commits. Now that we can separately control ObjC method name wrapping and non-ObjC function name wrapping, this diff sets `IndentWrappedObjCMethodNames` to `Always` for the

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak. Herald added subscribers: cfe-commits, klimek. Currently, indentation of Objective-C method names which are wrapped onto the next line due to a long return type is controlled by the style option

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:12093 +break; + } + lebedev.ri wrote: > rjmccall wrote: > > lebedev.ri wrote: > > > rjmccall wrote: > > > > lebedev.ri wrote: > > > > > rjmccall wrote: > > > > > > I think doing this here can

[PATCH] D44968: Generalize NRVO to cover C structs

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D44968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45002: [test] Conservatively re-enable a FreeBSD/XRay test

2018-03-28 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision. lichray added reviewers: devnexen, krytarowski. Herald added subscribers: dberris, emaste. Fixing clang-test on FreeBSD as a follow-up of https://reviews.llvm.org/D43378 to handle the revert happened in r325749. Repository: rC Clang

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-28 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 140144. aheejin marked an inline comment as done. aheejin added a comment. - Rebase & Simplified the if condition Repository: rC Clang https://reviews.llvm.org/D44931 Files: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGCleanup.cpp lib/CodeGen/CGCleanup.h

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-28 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added inline comments. Comment at: lib/CodeGen/CGCXXABI.h:610 +struct CatchRetScope final : EHScopeStack::Cleanup { + llvm::CatchPadInst *CPI; dschuff wrote: > Should be `public`? This code was moved from [[

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Will do stage2 testing next.. Comment at: lib/Sema/SemaExpr.cpp:12087 + case BO_AndAssign: + case BO_OrAssign: +DiagnoseSelfAssignment(S, LHS, RHS, OpLoc, /*IsBuiltin=*/false); lebedev.ri wrote: > rjmccall wrote: > >

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

2018-03-28 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Mar 28 15:09:09 2018 New Revision: 328735 URL: http://llvm.org/viewvc/llvm-project?rev=328735=rev Log: [Basic] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). Modified: cfe/trunk/include/clang/Basic/AddressSpaces.h

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:12093 +break; + } + lebedev.ri wrote: > rjmccall wrote: > > lebedev.ri wrote: > > > rjmccall wrote: > > > > I think doing this here can result in double-warning if the overload > > > >

[PATCH] D44494: [libunwind] Support __register_frame with a full .eh_frame section

2018-03-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: joerg. mstorsjo added a comment. Also, relating to this, @joerg mentioned on irc that one should rather use `__register_frame_info_bases` instead of `__register_frame`. That function is a bit tricky to call though, since it uses a libgcc internal struct `struct

[PATCH] D44968: [ObjC] Generalize NRVO to cover C structs

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Wow, the IR improvements here are amazing. Comment at: lib/CodeGen/CGDecl.cpp:1119 +if ((CXXRD && !CXXRD->hasTrivialDestructor()) || +RD->isNonTrivialToPrimitiveCopy()) { // Create a flag that is used to indicate when

[PATCH] D44494: [libunwind] Support __register_frame with a full .eh_frame section

2018-03-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D44494#1050803, @mstorsjo wrote: > In https://reviews.llvm.org/D44494#1050797, @mstorsjo wrote: > > > This else clause isn't about `.eh_frame` vs `.eh_frame_hdr`, but about > > registering a single FDE (which libunwind's `__register_frame`

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D44747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44987: Disable emitting static extern C aliases for amdgcn target for CUDA

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. LGTM. https://reviews.llvm.org/D44987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44985#1050674, @yaxunl wrote: > In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote: > > > What exactly are you trying to express here? Are you just trying to make > > these external declarations when compiling for the device

[PATCH] D44908: [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328731: [ObjC++] Make parameter passing and function return compatible with ObjC (authored by ahatanak, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D44908: [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328731: [ObjC++] Make parameter passing and function return compatible with ObjC (authored by ahatanak, committed by ). Changed prior to commit: https://reviews.llvm.org/D44908?vs=139935=140137#toc

r328731 - [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Mar 28 14:13:14 2018 New Revision: 328731 URL: http://llvm.org/viewvc/llvm-project?rev=328731=rev Log: [ObjC++] Make parameter passing and function return compatible with ObjC ObjC and ObjC++ pass non-trivial structs in a way that is incompatible with each other.

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/SourceCode.cpp:110 + +llvm::Optional offsetRangeToLocation(SourceManager , + StringRef File, MaskRay wrote: > May I ask a question about the conversion between

[PATCH] D44494: [libunwind] Support __register_frame with a full .eh_frame section

2018-03-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D44494#1050797, @mstorsjo wrote: > This else clause isn't about `.eh_frame` vs `.eh_frame_hdr`, but about > registering a single FDE (which libunwind's `__register_frame` currently > does) vs registering a full `.eh_frame` section (which

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/SemaExpr.cpp:12093 +break; + } + rjmccall wrote: > lebedev.ri wrote: > > rjmccall wrote: > > > I think doing this here can result in double-warning if the overload > > > resolves to a builtin operator.

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 140131. yaxunl marked 2 inline comments as done. yaxunl added a comment. Use getAs instead of dyn_cast as John suggested. https://reviews.llvm.org/D44747 Files: include/clang/Basic/Specifiers.h lib/AST/ItaniumMangle.cpp lib/AST/Type.cpp

[PATCH] D44494: [libunwind] Support __register_frame with a full .eh_frame section

2018-03-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D44494#1050783, @compnerd wrote: > I really don't like this approach. I think that we should introduce a > different entry point for this behavior rather than saying that we go through > the existing interface. Having a reference to the

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. Ping. Open to sugggestions here :) Repository: rC Clang https://reviews.llvm.org/D44536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44494: [libunwind] Support __register_frame with a full .eh_frame section

2018-03-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. I really don't like this approach. I think that we should introduce a different entry point for this behavior rather than saying that we go through the existing interface.

[PATCH] D44987: Disable emitting static extern C aliases for amdgcn target for CUDA

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 140129. yaxunl edited the summary of this revision. yaxunl added a comment. Add a target hook as suggested by John. https://reviews.llvm.org/D44987 Files: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/TargetInfo.cpp lib/CodeGen/TargetInfo.h

[PATCH] D44964: Change order of libclang_rt.profile link for freebsd

2018-03-28 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Could you add a test in test/Driver/instrprof-ld.c? Repository: rC Clang https://reviews.llvm.org/D44964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak. Herald added subscribers: cfe-commits, klimek. Previously, clang-format would incorrectly annotate 0-argument Objective-C selector names as TT_TrailingAnnotation: % echo "-(void)foo;" > /tmp/test.m %

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Friendly ping.. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42893: [libclang] Add clang_File_tryGetRealPathName

2018-03-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D42893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r328725 - [Hexagon] Add support for "new" circular buffer intrinsics

2018-03-28 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Wed Mar 28 12:40:57 2018 New Revision: 328725 URL: http://llvm.org/viewvc/llvm-project?rev=328725=rev Log: [Hexagon] Add support for "new" circular buffer intrinsics These instructions have been around for a long time, but we haven't supported intrinsics for them. The

[PATCH] D44984: [HIP] Add hip file type and codegen for kernel launching

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D44984#1050672, @rjmccall wrote: > You should send an RFC to cfe-dev about adding this new language mode. I > understand that it's very similar to an existing language mode that we > already support, and that's definitely we'll consider, but

[PATCH] D44995: [Driver] Include the Android multiarch includes.

2018-03-28 Thread Dan Albert via Phabricator via cfe-commits
danalbert created this revision. danalbert added a reviewer: srhines. Herald added a subscriber: javed.absar. Most Android headers live in a single directory, but a small handful live in multiarch directories. Repository: rC Clang https://reviews.llvm.org/D44995 Files:

[PATCH] D44994: [clang-format] Ensure wrapped ObjC selectors with 1 arg obey IndentWrappedFunctionNames

2018-03-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, klimek, Typz. Herald added a subscriber: cfe-commits. benhamilton added a reviewer: jolesiak. In https://reviews.llvm.org/D43121, @Typz introduced logic to avoid indenting 2-or-more argument ObjC selectors too far to the

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-03-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 140117. baloghadamsoftware added a comment. ,html removed from release notes. https://reviews.llvm.org/D33537 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/ExceptionEscapeCheck.cpp

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote: > What exactly are you trying to express here? Are you just trying to make > these external declarations when compiling for the device because > `__shared__` variables are actually defined on the host? That

[PATCH] D44984: [HIP] Add hip file type and codegen for kernel launching

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. You should send an RFC to cfe-dev about adding this new language mode. I understand that it's very similar to an existing language mode that we already support, and that's definitely we'll consider, but we shouldn't just agree to add new language modes in patch

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote: > What exactly are you trying to express here? Are you just trying to make > these external declarations when compiling for the device because > `__shared__` variables are actually defined on the host? That

[PATCH] D44987: Disable emitting static extern C aliases for amdgcn target for CUDA

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:4684 + (Context.getTargetInfo().getTriple().getArch() == llvm::Triple::amdgcn)) return; for (auto : StaticExternCValues) { Please add a target hook for this instead of

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. What exactly are you trying to express here? Are you just trying to make these external declarations when compiling for the device because `__shared__` variables are actually defined on the host? That should be handled by the frontend by setting up the AST so that

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Matt, are you OK with the change from amdgcn backend point of view? Thanks. Comment at: lib/Sema/SemaExpr.cpp:1669 +} + } + rjmccall wrote: > You should use `getAs` here (no `const` necessary). It's > possible to declare a

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. LGTM. If `__global__` is supported in C++ structures, you might also need to make sure that member function constants (`::kernel_function`) drop the CC. And it might be a good idea to make sure that `decltype(kernel_function)` doesn't have a problem with it, either,

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:12093 +break; + } + lebedev.ri wrote: > rjmccall wrote: > > I think doing this here can result in double-warning if the overload > > resolves to a builtin operator. Now, it might not

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: test/CodeGenCUDA/device-var-init.cu:121 __device__ void df() { + // AMDGCN: %[[ec:.*]] = addrspacecast %struct.EC addrspace(5)* %ec to %struct.EC* + // AMDGCN: %[[ed:.*]] = addrspacecast %struct.ED addrspace(5)* %ed to %struct.ED*

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: test/CodeGenCUDA/device-var-init.cu:121 __device__ void df() { + // AMDGCN: %[[ec:.*]] = addrspacecast %struct.EC addrspace(5)* %ec to %struct.EC* + // AMDGCN: %[[ed:.*]] = addrspacecast %struct.ED addrspace(5)* %ed to %struct.ED*

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-03-28 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: docs/ShadowCallStack.rst:14 +buffer overflows. It works by saving a function's return address to a +separately allocated 'shadow call stack' in the function prolog and checking the +return address on the stack against the

[PATCH] D44727: [RISCV] Extend getTargetDefines for RISCVTargetInfo

2018-03-28 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Do the macros you're defining here match gcc? Comment at: lib/Basic/Targets/RISCV.cpp:68 + +bool RISCVTargetInfo::hasFeature(StringRef Feature) const { + return llvm::StringSwitch(Feature) asb wrote: > It seems a number of other

r328723 - [MS] Fix bug in method vfptr location code

2018-03-28 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Mar 28 11:23:35 2018 New Revision: 328723 URL: http://llvm.org/viewvc/llvm-project?rev=328723=rev Log: [MS] Fix bug in method vfptr location code We were assuming that vbtable indices were assigned in layout order in our comparison, which is not the case. When a virtual

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 140110. yaxunl retitled this revision from "Disable zeroinitializer for CUDA shared varirable for amdgcn target" to "Remove initializer for CUDA shared varirable". yaxunl edited the summary of this revision. yaxunl added a reviewer: tra. yaxunl added a

  1   2   >