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

2018-03-28 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 140046. kito-cheng retitled this revision from "[RISCV] Implement getTargetDefines, handleTargetFeatures and hasFeature for RISCVTargetInfo" to "[RISCV] Extend getTargetDefines for RISCVTargetInfo". kito-cheng edited the summary of this revision. kito-chen

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

2018-03-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328690: [PATCH] [RISCV] Verify the input value of -march= (authored by shiva, committed by ). Changed prior to commit: https://reviews.llvm.org/D44189?vs=139256&id=140049#toc Repository: rC Clang ht

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-03-28 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. I do not know which reviewer to add for this review. Is it possible to give the name of the person that will be able to review this code ? Repository: rC Clang https://reviews.llvm.org/D44609 ___ cfe-commits mailing list c

[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: > I think doing this here can result in double-warning if the overload resolves > to a builtin operator. Now, it might not actually be possible for that

[PATCH] D44975: Change DEBUG() macro to LLVM_DEBUG()

2018-03-28 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola created this revision. Herald added subscribers: cfe-commits, javed.absar, klimek. The DEBUG() macro is too generic so it might clash with other projects. This is going to be deprecated and replaced by LLVM_DEBUG() as soon as https://reviews.llvm.org/D43624 is submitted. This is the comma

[PATCH] D44976: Change DEBUG() macro to LLVM_DEBUG() in clang-tools-extra

2018-03-28 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola created this revision. Herald added subscribers: cfe-commits, ioeric. The DEBUG() macro is too generic so it might clash with other projects. This is going to be deprecated and replaced by LLVM_DEBUG() as soon as https://reviews.llvm.org/D43624 is submitted. This is the command I used to

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-03-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 140061. baloghadamsoftware marked an inline comment as done. baloghadamsoftware added a comment. Comment fixed. https://reviews.llvm.org/D41938 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h lib/StaticAnalyzer/Core/AnalyzerOptions

[PATCH] D44921: [PowerPC] Option for secure plt mode

2018-03-28 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic updated this revision to Diff 140060. https://reviews.llvm.org/D44921 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Arch/PPC.cpp lib/Driver/ToolChains/Arch/PPC.h test/Driver/ppc-features.cpp Index: test/Driver/ppc-features.cpp ===

[PATCH] D44921: [PowerPC] Option for secure plt mode

2018-03-28 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added inline comments. Comment at: include/clang/Driver/Options.td:1941 def mno_vsx : Flag<["-"], "mno-vsx">, Group; +def msecure_plt : Flag<["-"], "msecure-plt">, Group; def mpower8_vector : Flag<["-"], "mpower8-vector">, nemanjai wrote: > Do we not

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-03-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:675-677 + /// is on the right. This is only done if both concrete integers are greater + /// than or equal to the quart

[PATCH] D44921: [PowerPC] Option for secure plt mode

2018-03-28 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. Yes, secure PLT is PowerPC specific feature. https://reviews.llvm.org/D44921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44921: [PowerPC] Option for secure plt mode

2018-03-28 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. GCC supports -mbss-plt to get the legacy behavior. Not sure if anyone actually uses it though. https://reviews.llvm.org/D44921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D44774: [Driver] Allow use of -fsyntax-only together with -MJ

2018-03-28 Thread David Stenberg via Phabricator via cfe-commits
dstenb added a comment. Our legacy frontend does not support -MJ, so when using that frontend for code generation, we invoke clang with -MJ, and at the same use -fsyntax-only to get the improved diagnostics that clang provides. This is idiosyncratic and probably hacky, I know, but it works well

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-03-28 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: include/clang/Sema/CodeCompleteConsumer.h:565 + /// \brief For this completion result correction is required. + Optional Corr = None; + yvvan wrote: > ilya-biryukov wrote: > > Having a string replacement without an actua

[PATCH] D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors"

2018-03-28 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. > If no real code triggers this diagnostic, ... Boost triggers this diagnostic: include/boost/core/noncopyable.hpp:23:9: error: aggregate type has user-declared constructors [-Werror,-Waggregate-ctors] class noncopyable ^ include/boost/iterator

r328705 - [OPENMP] Codegen for ctor|dtor of declare target variables.

2018-03-28 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Mar 28 07:28:54 2018 New Revision: 328705 URL: http://llvm.org/viewvc/llvm-project?rev=328705&view=rev Log: [OPENMP] Codegen for ctor|dtor of declare target variables. When the declare target variables are emitted for the device, constructors|destructors for these variab

[PATCH] D43764: [clang-apply-replacements] Convert tooling::Replacements to tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting.

2018-03-28 Thread Jeremy Demeule via Phabricator via cfe-commits
jdemeule added a comment. Thanks a lot! Can I ask you if I need to do something as I do not have commit access? https://reviews.llvm.org/D43764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

r328708 - clang-cl: s/Enable/Disable/ in help text for /GX-

2018-03-28 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Mar 28 07:57:49 2018 New Revision: 328708 URL: http://llvm.org/viewvc/llvm-project?rev=328708&view=rev Log: clang-cl: s/Enable/Disable/ in help text for /GX- Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td Modified: cfe/trunk/include/clang/Driver/CLCompatOp

[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 140076. yaxunl marked 4 inline comments as done. yaxunl added a comment. Revised by John's comments. Drop CUDA kernel calling convention in DRE. https://reviews.llvm.org/D44747 Files: include/clang/Basic/Specifiers.h lib/AST/ItaniumMangle.cpp lib/AST/T

[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 140079. baloghadamsoftware added a comment. Updated according to the comments. https://reviews.llvm.org/D33537 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/ExceptionEscapeCheck.cpp

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

2018-03-28 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 4 inline comments as done. baloghadamsoftware added inline comments. Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:24-25 + +const TypeVec _throws(const FunctionDecl *Func); +const TypeVec _throws(const Stmt *St, const TypeVec &Caught); +} // n

r328712 - [Diag] Avoid emitting a redefinition note if no location is available.

2018-03-28 Thread Matt Davis via cfe-commits
Author: mattd Date: Wed Mar 28 09:05:05 2018 New Revision: 328712 URL: http://llvm.org/viewvc/llvm-project?rev=328712&view=rev Log: [Diag] Avoid emitting a redefinition note if no location is available. Summary: The "previous definition is here" note is not helpful if there is no location inform

[PATCH] D44901: [Diag] Avoid emitting a redefinition note if no location is available.

2018-03-28 Thread Matt Davis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328712: [Diag] Avoid emitting a redefinition note if no location is available. (authored by mattd, committed by ). Repository: rC Clang https://reviews.llvm.org/D44901 Files: lib/Sema/SemaDecl.cpp

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

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: rjmccall. Herald added a subscriber: tpr. HIP is a language similar to CUDA (https://github.com/ROCm-Developer-Tools/HIP/blob/master/docs/markdown/hip_kernel_language.md ). The language syntax is very similar, which allows a hip program to b

[PATCH] D44970: [XRay][clang] Add flag to choose instrumentation bundles

2018-03-28 Thread Eric Christopher via Phabricator via cfe-commits
echristo added inline comments. Comment at: clang/include/clang/Frontend/CodeGenOptions.h:113 +XRay_None,// Emit none of the instrumentation points. +XRay_FunctionExtents, // Only emit function entry/exit instrumentation + // points. -

[PATCH] D44985: Disable zeroinitializer for CUDA shared varirable for amdgcn target

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: rjmccall. amdgcn does not support zeroinitializer for CUDS shared variable. Patch by Greg Rodgers. Lit test added by Yaxun Liu. https://reviews.llvm.org/D44985 Files: lib/CodeGen/CGDecl.cpp test/CodeGenCUDA/device-var-init.cu Index: t

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

2018-03-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:68 +- New :doc:`bugprone-exception-escape + ` check + .html is not necessary. https://reviews.llvm.org/D33537 ___ cfe-commits mailing list cf

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

2018-03-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a subscriber: gregrodgers. tra added a comment. The changes appear to cover only some of the functionality needed to enable HIP support. Do you have more patches in queue? Having complete picture would help to make sense of the overall plan. I did ask for it in https://reviews.llvm.org

[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 created this revision. yaxunl added a reviewer: rjmccall. Patch by Greg Rodgers. Lit test added by Yaxun Liu. https://reviews.llvm.org/D44987 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/alias.cu Index: test/CodeGenCUDA/alias.cu

r328718 - Fix for LLVM header changes

2018-03-28 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Wed Mar 28 10:45:10 2018 New Revision: 328718 URL: http://llvm.org/viewvc/llvm-project?rev=328718&view=rev Log: Fix for LLVM header changes Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp URL: http://llvm.org/viewvc/llvm

[PATCH] D44985: Disable zeroinitializer for CUDA shared varirable for amdgcn target

2018-03-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: test/CodeGenCUDA/device-var-init.cu:112 +// NVPTX: @_ZZ2dfvE4s_ec = internal addrspace(3) global %struct.EC zeroinitializer +// AMDGCN: @_ZZ2dfvE4s_ec = internal addrspace(3) global %struct.EC undef Hmm. __shared__ shoul

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-03-28 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 140103. Quuxplusone added a comment. Addressed review comments from @rsmith and rebased on master. I still need someone else to land this for me, though. Repository: rC Clang https://reviews.llvm.org/D43322 Files: include/clang/Basic/DiagnosticGrou

[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#1050526, @tra wrote: > The changes appear to cover only some of the functionality needed to enable > HIP support. Do you have more patches in queue? Having complete picture would > help to make sense of the overall plan. > I did ask fo

[PATCH] D44906: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-03-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: clang-tidy/ClangTidy.cpp:490 +CommandLineArguments AdjustedArgs = Args; +AdjustedArgs.emplace_back("-D__clang_analyzer__"); +return Adj

[PATCH] D44988: [Sema] Fix decrement availability for built-in types

2018-03-28 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple created this revision. jkorous-apple added reviewers: speziale.ettore, arphaman. Herald added a subscriber: cfe-commits. C++ [over.built]p4: For every pair (T, VQ), where T is an arithmetic type other than bool, and VQ is either volatile or empty, there exist candidate operator f

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

2018-03-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In https://reviews.llvm.org/D44984#1050557, @yaxunl wrote: > Yes we already have a basic working implementation of HIP compiler due to > Greg's work. That is great, but it's not necessarily true that all these changes will make it into clang/llvm as is. LLVM/Clang is a co

[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 comment.

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&view=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] 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 targe

[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 shado

[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] 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] 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 actuall

[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 (`&A::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] 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 functio

[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 th

[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 &I : StaticExternCValues) { Please add a target hook for this instead of build

[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 shou

[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 s

[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 review

[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] 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 rig

[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: lib/Driver/ToolChain

[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

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&view=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] 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

[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] 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 % ./bin/clan

[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] 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 test/CodeGenC

[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. Havi

[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 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] 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 lib/AST/TypeP

[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] 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 lib

[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 &SourceMgr, + StringRef File, MaskRay wrote: > May I ask a question about the conversion bet

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&view=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 othe

[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&id=140137#toc

[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: https://reviews.

[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 becaus

[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] 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 http://lists.llvm.org/cgi-bin/mailman/listinfo/

[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` cu

[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 the

[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 obje

[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 > > > > resolv

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&view=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.

[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: > > Quuxpluson

[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 [[ https://github.com/llvm-mirror/clang/blob/c

[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] 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 https://reviews.llvm.org/D45

[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 http://lists.llvm.org/c

[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] 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 `IndentWrappedFuncti

[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 Goo

[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 GNU_Wa

[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 outp

[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] 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. If

[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: unit

[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 signature

[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 signatu

[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] 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 lib/

[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 https://revi

[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] 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: clangd/GlobalCompi

[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 nee

[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 w

  1   2   >